fix: strip skills prefix from bare skill plugin export#738
fix: strip skills prefix from bare skill plugin export#738danielmeppiel merged 4 commits intomicrosoft:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes incorrect skills/skills/ directory nesting when exporting plugin bundles for bare-skill dependencies referenced via virtual paths like skills/<name>, aligning packed output with plugin.json expectations and the plugin host directory convention.
Changes:
- Normalize bare-skill slugs derived from dependency
virtual_pathby stripping leadingskills/prefixes before emitting bundle paths. - Add unit + end-to-end regression tests to ensure
apm pack --format pluginplaces bare skills underskills/<skill-name>/(no duplicatedskills/).
Show a summary per file
| File | Description |
|---|---|
src/apm_cli/bundle/plugin_exporter.py |
Adds _normalize_bare_skill_slug() and uses it in _collect_bare_skill() to prevent skills/skills/ nesting for virtual_path="skills/<name>". |
tests/unit/test_plugin_exporter.py |
Adds regression coverage for slug normalization and for the full plugin export path to ensure no duplicated skills/ directory is produced. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
sergio-sisternes-epam
left a comment
There was a problem hiding this comment.
Good fix! The extracted _normalize_bare_skill_slug() helper is clean, handles cross-platform backslash normalization, and the e2e test through export_plugin_bundle adds solid regression coverage.
Minor observation (non-blocking): the while loop for stripping repeated skills/ prefixes is defensive -- in practice the prefix only appears once. A single if would suffice, but it's harmless as-is.
Approving -- thanks @zeel2104!
Description
Fix duplicated
skills/skills/nesting inapm pack --format pluginfor bare skill dependencies referenced through virtual paths likeskills/<name>.The exporter now normalizes bare-skill slugs before writing bundle paths, so dependencies such as
github/awesome-copilot/skills/javascript-typescript-jestpack toskills/javascript-typescript-jest/as expected. Added regression coverage for both the collector helper and the end-to-end plugin export path.Fixes #719
Type of change
Testing