Skip to content

codeassembly-agents install silently installs skills with missing bundled helpers #648

Description

@williamthorsen

Problem

codeassembly-agents install copies a skill's SKILL.md into the platform skill directory even when the skill's declared bundled helper (e.g., kb-retrieve.mjs) is absent from dist/content/. The bundle is absent whenever the user hasn't run pnpm run build (or has run a clean and forgotten to rebuild).

The installed skill is then broken: when the LLM follows SKILL.md and tries to node "$(dirname "$SKILL_PATH")/<helper>.mjs", the file doesn't exist on disk.

Reproduction

  1. Fresh clone of the repo, or after a clean.
  2. Run install without building first (e.g., pnpm run install from packages/agents without pnpm run build).
  3. ls ~/.claude/skills/kb-retrieve/ — only SKILL.md is present; no kb-retrieve.mjs.
  4. Invoke /kb-retrieve <query> from Claude Code — the helper invocation fails because the .mjs is missing.

Expected behavior

Install should detect that a skill's expected helper bundle is missing and either:

  • error out with a clear message pointing the user at pnpm run build, or
  • run the build itself before installing (less surprising than silent breakage).

Notes

The detection target is "any helper bundle declared as a targets entry in packages/agents/scripts/bundle-skill-helpers.ts". Today the install command (packages/agents/src/lib/installer.ts) has no awareness of the bundle pipeline; the two are coupled only by convention.

Discovered during design of #637 (kb-add skill).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions