Problem
installSkillEntry (packages/agents/src/commands/install.ts) assumes a rendered skill directory always materializes on disk. When renderSkillDirectory returns zero entries — which happens for any content/skills/ support directory whose only contents are dotfiles or _partials/ — writeRenderedSkillDir creates nothing, and the immediately following injectMarkersInDirectory calls readdir on the never-created destination and throws an ENOENT that names neither the directory nor the empty-render cause.
Reproduce by leaving an otherwise-empty support directory (e.g. one holding only a .DS_Store) under content/skills/: install aborts and the install-smoke suite fails with the opaque error.
Proposed solution
Guard the empty-render case in installSkillEntry: when the rendered directory has zero entries, skip it — write no destination, attempt no marker injection, and record no manifest entry. Cleanup of any previously installed copy falls to the existing orphan-prune pass.
Not pursued: a fallback error at the marker-injection layer. With the guard in place, marker injection is never reached for an empty render, so such an error would name a cause that can no longer occur.
Acceptance criteria
Must have
Problem
installSkillEntry(packages/agents/src/commands/install.ts) assumes a rendered skill directory always materializes on disk. WhenrenderSkillDirectoryreturns zero entries — which happens for anycontent/skills/support directory whose only contents are dotfiles or_partials/—writeRenderedSkillDircreates nothing, and the immediately followinginjectMarkersInDirectorycallsreaddiron the never-created destination and throws anENOENTthat names neither the directory nor the empty-render cause.Reproduce by leaving an otherwise-empty support directory (e.g. one holding only a
.DS_Store) undercontent/skills/:installaborts and theinstall-smokesuite fails with the opaque error.Proposed solution
Guard the empty-render case in
installSkillEntry: when the rendered directory has zero entries, skip it — write no destination, attempt no marker injection, and record no manifest entry. Cleanup of any previously installed copy falls to the existing orphan-prune pass.Not pursued: a fallback error at the marker-injection layer. With the guard in place, marker injection is never reached for an empty render, so such an error would name a cause that can no longer occur.
Acceptance criteria
Must have
installcompletes without error when acontent/skills/support directory renders to zero installable entries; the directory is skipped — no destination written, no marker injection attempted, no manifest entry recorded.