Skip to content

fix(cli): skills check fails closed, and the installer installs skills itself - #784

Open
matt82198 wants to merge 4 commits into
mainfrom
fix/doctor-skills-check-fail-closed
Open

fix(cli): skills check fails closed, and the installer installs skills itself#784
matt82198 wants to merge 4 commits into
mainfrom
fix/doctor-skills-check-fail-closed

Conversation

@matt82198

Copy link
Copy Markdown
Owner

Why

doctor.js treated a missing ~/.claude/skills/power|buildsystem as a WARN and returned passed: true, so a green doctor could still mean the orchestrator had no skills to invoke. Claude Code only scans ~/.claude/skills/ (or a project's .claude/skills/) — a skill left in the scaffolded ./skills/ is undiscoverable.

The install text was also backwards: bin/cli.js told users to copy from ~/.claude/skills/ to the project, the opposite of what makes skills discoverable.

Then the deeper point: the installer was printing instructions and hoping. It now does the install.

What changed

Doctor — skills check fails closed; the hint names the actual source directory (only when it exists) plus the restart step.

ScaffolderinstallSkills() copies each skills/*/ into the skills home:

  • Idempotent: a skill whose SKILL.md matches byte-for-byte is reported as already-installed.
  • Never clobbers: a skill that DIFFERS is preserved and warned about, so adopters who customize one don't lose it to a re-scaffold. --force overwrites.
  • --no-skills opts out; a symlinked skills home is refused (same guard as the pre-push hook install).
  • AESOP_SKILLS_HOME redirects the target so tests never touch the real ~/.claude.

DependenciesinstallDependencies() sits behind --install-deps so scaffolding stays offline-safe. requirements.txt / requirements-dev.txt now ship with the scaffold; they previously had no way to reach a target at all. Both are added to the re-scaffold allowlist, which otherwise reads its own output as unexpected files and refuses to re-run.

Also repairs a broken README code fence that swallowed the following section, and syncs package-lock.json (stale at 0.7.0 against package.json's 0.7.2).

Tests

tests/cli-skills-install.test.mjs — 7 cases: skills land in the skills home, --no-skills opts out, re-scaffold is idempotent, a modified skill survives without --force and is replaced with it, dependency manifests ship, and the real ~/.claude is provably untouched.

Full Node suite 322/322.

matt82198 and others added 4 commits August 11, 2026 15:00
… path

doctor.js treated a missing ~/.claude/skills/power|buildsystem as a WARN and
returned passed:true, so a green doctor could still mean the orchestrator had
no skills to invoke. Claude Code only scans ~/.claude/skills/ (or a project's
.claude/skills/) -- the scaffolded ./skills/ directory is never discovered, so
an uncopied skill is an unusable one. The check now fails closed and the hint
names the actual source directory (only when it exists) plus the restart step.

The install text was also backwards: bin/cli.js told users to copy FROM
~/.claude/skills/ TO the project, which is the opposite of what makes skills
discoverable. All four next-steps blocks and the README now give the correct
direction. Also repairs a broken README code fence that swallowed the
following section.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Scaffolding printed instructions for installing skills and then relied on the
adopter to run them. Since Claude Code only discovers skills under
~/.claude/skills/, anyone who skipped that step got a fleet whose orchestrator
could not be invoked -- and, until the preceding commit, a doctor that called
it green. The installer now does the install itself.

installSkills() copies each scaffolded skills/*/ into the skills home and is
idempotent: a skill whose SKILL.md matches byte-for-byte is reported as
already-installed, and one that DIFFERS is preserved and warned about rather
than silently overwritten -- adopters who customize a skill do not lose it to a
re-scaffold. --force overwrites, --no-skills opts out, and a symlinked skills
home is refused (same guard as the pre-push hook install). AESOP_SKILLS_HOME
redirects the target so tests never touch the real ~/.claude.

installDependencies() stays behind --install-deps so scaffolding remains
offline-safe; it runs npm install and pip install -r requirements.txt in the
target and degrades to a warning rather than aborting the scaffold.
requirements.txt / requirements-dev.txt now ship with the scaffold (they had no
way to reach a target before) and are added to the re-scaffold allowlist, which
otherwise reads its own output as unexpected files and refuses to re-run.

package-lock.json version was stale at 0.7.0 against package.json's 0.7.2.

Tests: tests/cli-skills-install.test.mjs (7 cases). Full Node suite 322/322.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ck-fail-closed

# Conflicts:
#	README.md
#	bin/CLAUDE.md
#	tools/CLAUDE.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant