Skip to content

SP-348: Add command to retrieve single skill files#385

Open
Thomas Neumüller (tneum-celonis) wants to merge 7 commits into
mainfrom
SP-348-skill-retrieve-command
Open

SP-348: Add command to retrieve single skill files#385
Thomas Neumüller (tneum-celonis) wants to merge 7 commits into
mainfrom
SP-348-skill-retrieve-command

Conversation

@tneum-celonis

@tneum-celonis Thomas Neumüller (tneum-celonis) commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a new asset-registry skills get command for downloading skill files registered in the asset registry. By default it fetches SKILL.md for the given --path; pass --file <relative> to retrieve any reference file bundled with the skill, and --output <dir> to choose a destination directory (defaults to cwd).

Also refactors a few small bits along the way:

  • Extracts a shared trimSlashes helper in src/core/utils/path.ts (used by both the service and the URL-building code).
  • FileService.writeBufferToPath now reuses writeBufferToFileWithGivenName for the actual write, and a new private ensureDir helper replaces every fs.mkdirSync(..., { recursive: true, mode: ... }) call in the file.

Relevant links

Checklist

  • I have self-reviewed this PR
  • I have tested the change and proved that it works in different scenarios
  • I have updated docs if needed

@tneum-celonis Thomas Neumüller (tneum-celonis) marked this pull request as ready for review June 24, 2026 14:05
Comment thread tests/commands/asset-registry/asset-registry-skills-get.spec.ts Outdated
if (!filePath) {
return base;
}
return `${base}/${encodePathSegments(filePath)}`;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think except for the last trailing slash of the full url, path.join can actually do the job itself?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

path.join does more than we want here imo because it also collapses ...

@sonarqubecloud

Copy link
Copy Markdown

Comment thread docs/user-guide/asset-registry-commands.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants