Describe the bug
When running apm pack --format plugin, the resulting build artifact contains a duplicated skills/skills/ directory structure instead of the expected skills/. The plugin.json declares "skills": ["skills/"], but the pack command places the skill folders one level too deep, resulting in skills/skills/<skill-name>/SKILL.md instead of skills/<skill-name>/SKILL.md.
To Reproduce
Steps to reproduce the behavior:
- Run command
apm pack
- With parameters
--format plugin inside a project containing an apm.yml with dependencies.apm pointing to a GitHub-hosted skill (e.g. github/<org>/<repo>/skills/<skill-name>)
- Inspect the build output directory:
build/<name>-<version>/
- See error: the skills are placed under
build/<name>-<version>/skills/skills/<skill-name>/ instead of build/<name>-<version>/skills/<skill-name>/
Expected behavior
The packed plugin should produce the following structure:
build/halo-angular-1.0.0/
├── plugin.json
└── skills/
└── javascript-typescript-jest/
└── SKILL.md
Actual behavior
build/halo-angular-1.0.0/
├── plugin.json
└── skills/ ← declared in plugin.json as "skills": ["skills/"]
└── skills/ ← duplicated nesting introduced by apm pack
└── javascript-typescript-jest/
└── SKILL.md
Environment
- OS: Linux (Debian GNU/Linux 13 trixie, dev container)
- APM Version: 0.8.11 (81082e2)
- VSCode Version: 1.115.0
Logs
apm pack --format plugin exits with code 0 (no error reported), making the issue silent. The malformed output is only discoverable by inspecting the build directory manually.
apm.yml:
name: halo-angular
version: 1.0.0
description: APM project for halo-angular
author: Antonin Rouxel
dependencies:
apm:
- github/awesome-copilot/skills/javascript-typescript-jest
mcp: []
scripts: {}
Generated plugin.json:
{
"name": "halo-angular",
"version": "1.0.0",
"description": "APM project for halo-angular",
"author": {
"name": "Antonin Rouxel"
},
"skills": [
"skills/"
]
}
Additional context
The root cause appears to be that apm pack resolves the skill destination path as skills/ (from plugin.json) and then copies the skill folders into a subdirectory also named skills/, resulting in double nesting. The pack command should either flatten the resolved path or not append an extra skills/ segment when the destination folder is already named skills/.
Describe the bug
When running
apm pack --format plugin, the resulting build artifact contains a duplicatedskills/skills/directory structure instead of the expectedskills/. Theplugin.jsondeclares"skills": ["skills/"], but the pack command places the skill folders one level too deep, resulting inskills/skills/<skill-name>/SKILL.mdinstead ofskills/<skill-name>/SKILL.md.To Reproduce
Steps to reproduce the behavior:
apm pack--format plugininside a project containing anapm.ymlwithdependencies.apmpointing to a GitHub-hosted skill (e.g.github/<org>/<repo>/skills/<skill-name>)build/<name>-<version>/build/<name>-<version>/skills/skills/<skill-name>/instead ofbuild/<name>-<version>/skills/<skill-name>/Expected behavior
The packed plugin should produce the following structure:
Actual behavior
Environment
Logs
apm pack --format pluginexits with code0(no error reported), making the issue silent. The malformed output is only discoverable by inspecting the build directory manually.apm.yml:Generated
plugin.json:{ "name": "halo-angular", "version": "1.0.0", "description": "APM project for halo-angular", "author": { "name": "Antonin Rouxel" }, "skills": [ "skills/" ] }Additional context
The root cause appears to be that
apm packresolves the skill destination path asskills/(fromplugin.json) and then copies the skill folders into a subdirectory also namedskills/, resulting in double nesting. The pack command should either flatten the resolved path or not append an extraskills/segment when the destination folder is already namedskills/.