Skip to content

[BUG] apm pack ignores the declared skills: subset filter on git dependencies — bundles the entire upstream repo, or silently bundles nothing #1999

Description

@desaiuditd

Describe the bug

When an apm.yml dependency declares a skills: subset filter on a git dependency, apm install correctly deploys
only the named skills to harness directories (.agents/skills/, .claude/skills/, etc.). apm pack (default
--format plugin) does not respect the same filter: depending on local cache state, it either bundles the entire
upstream repository for that dependency, or silently omits the dependency's skills entirely.

To Reproduce

Manifest (apm.yml):

dependencies:
  apm:
    - git: mattpocock/skills
      ref: bc4cf90
      skills:
        - productivity/grill-me
        - productivity/grilling

Steps and results, all run against the same manifest:

  1. apm install — correct. Only .agents/skills/grill-me and .agents/skills/grilling deployed (verified by listing
    .agents/skills/ directly; also matches apm.lock.yaml's skill_subset field).
  2. apm pack (no other commands in between) — bundles the entire mattpocock/skills repository under
    build/<pkg>/skills/: every top-level category in the upstream repo (tdd, teach, deprecated, zoom-out,
    writing-great-skills, handoff, triage, and roughly 20 others), not just the 2 declared skills.
  3. apm install → manually rm -rf apm_modulesapm pack — bundles zero skills from mattpocock/skills. No
    warning or error is emitted; the bundle is simply missing that dependency's content.
  4. apm installapm pruneapm pack — same result as step 2. apm prune does not remove or touch the cache for
    this dependency, since it's still referenced in apm.yml (just with a narrower skills: list).

Expected behavior

apm pack should bundle exactly the skills recorded as deployed for the active target (matching what apm install
already deploys and what apm.lock.yaml's skill_subset / deployed_files record), regardless of whether the raw
apm_modules/<owner>/<repo>/ cache happens to be present.

Actual behavior

apm pack reads directly from the raw, unfiltered apm_modules/<owner>/<repo>/skills/ cache directory rather than from
the filtered, already-deployed output. When that cache is missing, there is no fallback, and the bundle silently omits
the dependency instead of erroring or re-resolving it.

Environment (please complete the following information):

  • apm --version reported 0.23.1
  • pyhton --version reported 3.14.6
  • macOS, zsh.

Impact

Any package that declares a filtered skills: subset on a git dependency cannot produce a correct plugin bundle via
apm pack today. This blocks using apm pack as a distribution path for packages with OSS skill dependencies scoped to
a subset of a larger upstream repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/distributionInstallers (curl/PowerShell/Brew/Scoop), self-update, devcontainer, codespaces.area/lockfileLockfile schema, per-file provenance, integrity hashes, drift detection.priority/highShips in current or next milestonestatus/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).type/bugSomething does not work as documented.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions