diff --git a/careful/SKILL.md b/careful/SKILL.md index 5f9aea3f23..5be51119c3 100644 --- a/careful/SKILL.md +++ b/careful/SKILL.md @@ -15,7 +15,7 @@ hooks: - matcher: "Bash" hooks: - type: command - command: "bash ${CLAUDE_SKILL_DIR}/bin/check-careful.sh" + command: "bash ${CLAUDE_PLUGIN_ROOT}/bin/check-careful.sh" statusMessage: "Checking for destructive commands..." --- diff --git a/careful/SKILL.md.tmpl b/careful/SKILL.md.tmpl index dd8f0ded1d..47ea5139d2 100644 --- a/careful/SKILL.md.tmpl +++ b/careful/SKILL.md.tmpl @@ -15,7 +15,7 @@ hooks: - matcher: "Bash" hooks: - type: command - command: "bash ${CLAUDE_SKILL_DIR}/bin/check-careful.sh" + command: "bash ${CLAUDE_PLUGIN_ROOT}/bin/check-careful.sh" statusMessage: "Checking for destructive commands..." sensitive: true --- diff --git a/freeze/SKILL.md b/freeze/SKILL.md index abab021c71..2dc1ddd8ea 100644 --- a/freeze/SKILL.md +++ b/freeze/SKILL.md @@ -16,12 +16,12 @@ hooks: - matcher: "Edit" hooks: - type: command - command: "bash ${CLAUDE_SKILL_DIR}/bin/check-freeze.sh" + command: "bash ${CLAUDE_PLUGIN_ROOT}/bin/check-freeze.sh" statusMessage: "Checking freeze boundary..." - matcher: "Write" hooks: - type: command - command: "bash ${CLAUDE_SKILL_DIR}/bin/check-freeze.sh" + command: "bash ${CLAUDE_PLUGIN_ROOT}/bin/check-freeze.sh" statusMessage: "Checking freeze boundary..." --- diff --git a/freeze/SKILL.md.tmpl b/freeze/SKILL.md.tmpl index 42329c41c1..28a87c59a0 100644 --- a/freeze/SKILL.md.tmpl +++ b/freeze/SKILL.md.tmpl @@ -16,12 +16,12 @@ hooks: - matcher: "Edit" hooks: - type: command - command: "bash ${CLAUDE_SKILL_DIR}/bin/check-freeze.sh" + command: "bash ${CLAUDE_PLUGIN_ROOT}/bin/check-freeze.sh" statusMessage: "Checking freeze boundary..." - matcher: "Write" hooks: - type: command - command: "bash ${CLAUDE_SKILL_DIR}/bin/check-freeze.sh" + command: "bash ${CLAUDE_PLUGIN_ROOT}/bin/check-freeze.sh" statusMessage: "Checking freeze boundary..." sensitive: true --- diff --git a/guard/SKILL.md b/guard/SKILL.md index 289b4f9397..c00a0c7ed4 100644 --- a/guard/SKILL.md +++ b/guard/SKILL.md @@ -16,17 +16,17 @@ hooks: - matcher: "Bash" hooks: - type: command - command: "bash ${CLAUDE_SKILL_DIR}/../careful/bin/check-careful.sh" + command: "bash ${CLAUDE_PLUGIN_ROOT}/../careful/bin/check-careful.sh" statusMessage: "Checking for destructive commands..." - matcher: "Edit" hooks: - type: command - command: "bash ${CLAUDE_SKILL_DIR}/../freeze/bin/check-freeze.sh" + command: "bash ${CLAUDE_PLUGIN_ROOT}/../freeze/bin/check-freeze.sh" statusMessage: "Checking freeze boundary..." - matcher: "Write" hooks: - type: command - command: "bash ${CLAUDE_SKILL_DIR}/../freeze/bin/check-freeze.sh" + command: "bash ${CLAUDE_PLUGIN_ROOT}/../freeze/bin/check-freeze.sh" statusMessage: "Checking freeze boundary..." --- diff --git a/guard/SKILL.md.tmpl b/guard/SKILL.md.tmpl index fe385c98c7..27a6a2e812 100644 --- a/guard/SKILL.md.tmpl +++ b/guard/SKILL.md.tmpl @@ -16,17 +16,17 @@ hooks: - matcher: "Bash" hooks: - type: command - command: "bash ${CLAUDE_SKILL_DIR}/../careful/bin/check-careful.sh" + command: "bash ${CLAUDE_PLUGIN_ROOT}/../careful/bin/check-careful.sh" statusMessage: "Checking for destructive commands..." - matcher: "Edit" hooks: - type: command - command: "bash ${CLAUDE_SKILL_DIR}/../freeze/bin/check-freeze.sh" + command: "bash ${CLAUDE_PLUGIN_ROOT}/../freeze/bin/check-freeze.sh" statusMessage: "Checking freeze boundary..." - matcher: "Write" hooks: - type: command - command: "bash ${CLAUDE_SKILL_DIR}/../freeze/bin/check-freeze.sh" + command: "bash ${CLAUDE_PLUGIN_ROOT}/../freeze/bin/check-freeze.sh" statusMessage: "Checking freeze boundary..." sensitive: true --- diff --git a/investigate/SKILL.md b/investigate/SKILL.md index 30feccd0e0..764010a371 100644 --- a/investigate/SKILL.md +++ b/investigate/SKILL.md @@ -24,12 +24,12 @@ hooks: - matcher: "Edit" hooks: - type: command - command: "bash ${CLAUDE_SKILL_DIR}/../freeze/bin/check-freeze.sh" + command: "bash ${CLAUDE_PLUGIN_ROOT}/../freeze/bin/check-freeze.sh" statusMessage: "Checking debug scope boundary..." - matcher: "Write" hooks: - type: command - command: "bash ${CLAUDE_SKILL_DIR}/../freeze/bin/check-freeze.sh" + command: "bash ${CLAUDE_PLUGIN_ROOT}/../freeze/bin/check-freeze.sh" statusMessage: "Checking debug scope boundary..." --- @@ -622,7 +622,7 @@ Output: **"Root cause hypothesis: ..."** — a specific, testable claim about wh After forming your root cause hypothesis, lock edits to the affected module to prevent scope creep. ```bash -[ -x "${CLAUDE_SKILL_DIR}/../freeze/bin/check-freeze.sh" ] && echo "FREEZE_AVAILABLE" || echo "FREEZE_UNAVAILABLE" +[ -x "${CLAUDE_PLUGIN_ROOT}/../freeze/bin/check-freeze.sh" ] && echo "FREEZE_AVAILABLE" || echo "FREEZE_UNAVAILABLE" ``` **If FREEZE_AVAILABLE:** Identify the narrowest directory containing the affected files. Write it to the freeze state file: diff --git a/investigate/SKILL.md.tmpl b/investigate/SKILL.md.tmpl index 3004300e20..133d95a1fe 100644 --- a/investigate/SKILL.md.tmpl +++ b/investigate/SKILL.md.tmpl @@ -24,12 +24,12 @@ hooks: - matcher: "Edit" hooks: - type: command - command: "bash ${CLAUDE_SKILL_DIR}/../freeze/bin/check-freeze.sh" + command: "bash ${CLAUDE_PLUGIN_ROOT}/../freeze/bin/check-freeze.sh" statusMessage: "Checking debug scope boundary..." - matcher: "Write" hooks: - type: command - command: "bash ${CLAUDE_SKILL_DIR}/../freeze/bin/check-freeze.sh" + command: "bash ${CLAUDE_PLUGIN_ROOT}/../freeze/bin/check-freeze.sh" statusMessage: "Checking debug scope boundary..." --- @@ -72,7 +72,7 @@ Output: **"Root cause hypothesis: ..."** — a specific, testable claim about wh After forming your root cause hypothesis, lock edits to the affected module to prevent scope creep. ```bash -[ -x "${CLAUDE_SKILL_DIR}/../freeze/bin/check-freeze.sh" ] && echo "FREEZE_AVAILABLE" || echo "FREEZE_UNAVAILABLE" +[ -x "${CLAUDE_PLUGIN_ROOT}/../freeze/bin/check-freeze.sh" ] && echo "FREEZE_AVAILABLE" || echo "FREEZE_UNAVAILABLE" ``` **If FREEZE_AVAILABLE:** Identify the narrowest directory containing the affected files. Write it to the freeze state file: diff --git a/scripts/resolvers/review.ts b/scripts/resolvers/review.ts index cbc8053ce4..e559a85f9d 100644 --- a/scripts/resolvers/review.ts +++ b/scripts/resolvers/review.ts @@ -946,7 +946,7 @@ curl -s -o /dev/null -w '%{http_code}' http://localhost:4000 2>/dev/null || echo Read the \`/qa-only\` skill from disk: \`\`\`bash -cat \${CLAUDE_SKILL_DIR}/../qa-only/SKILL.md +cat \${CLAUDE_PLUGIN_ROOT}/../qa-only/SKILL.md \`\`\` **If unreadable:** Skip with "Could not load /qa-only — skipping plan verification." diff --git a/ship/SKILL.md b/ship/SKILL.md index f3bfd6269b..c7ac79240f 100644 --- a/ship/SKILL.md +++ b/ship/SKILL.md @@ -1509,7 +1509,7 @@ curl -s -o /dev/null -w '%{http_code}' http://localhost:4000 2>/dev/null || echo Read the `/qa-only` skill from disk: ```bash -cat ${CLAUDE_SKILL_DIR}/../qa-only/SKILL.md +cat ${CLAUDE_PLUGIN_ROOT}/../qa-only/SKILL.md ``` **If unreadable:** Skip with "Could not load /qa-only — skipping plan verification." @@ -2484,7 +2484,7 @@ After the PR is created, automatically sync project documentation. Read the `document-release/SKILL.md` skill file (adjacent to this skill's directory) and execute its full workflow: -1. Read the `/document-release` skill: `cat ${CLAUDE_SKILL_DIR}/../document-release/SKILL.md` +1. Read the `/document-release` skill: `cat ${CLAUDE_PLUGIN_ROOT}/../document-release/SKILL.md` 2. Follow its instructions — it reads all .md files in the project, cross-references the diff, and updates anything that drifted (README, ARCHITECTURE, CONTRIBUTING, CLAUDE.md, TODOS, etc.) diff --git a/ship/SKILL.md.tmpl b/ship/SKILL.md.tmpl index 76e4873d6d..6572a9f626 100644 --- a/ship/SKILL.md.tmpl +++ b/ship/SKILL.md.tmpl @@ -621,7 +621,7 @@ After the PR is created, automatically sync project documentation. Read the `document-release/SKILL.md` skill file (adjacent to this skill's directory) and execute its full workflow: -1. Read the `/document-release` skill: `cat ${CLAUDE_SKILL_DIR}/../document-release/SKILL.md` +1. Read the `/document-release` skill: `cat ${CLAUDE_PLUGIN_ROOT}/../document-release/SKILL.md` 2. Follow its instructions — it reads all .md files in the project, cross-references the diff, and updates anything that drifted (README, ARCHITECTURE, CONTRIBUTING, CLAUDE.md, TODOS, etc.) diff --git a/test/gen-skill-docs.test.ts b/test/gen-skill-docs.test.ts index a555104d1d..8fc1e32b4f 100644 --- a/test/gen-skill-docs.test.ts +++ b/test/gen-skill-docs.test.ts @@ -213,6 +213,22 @@ describe('gen-skill-docs', () => { expect(browseTmpl).toContain('{{PREAMBLE}}'); }); + test('skill templates do not reference legacy CLAUDE_SKILL_DIR hook paths', () => { + for (const skill of ALL_SKILLS) { + const tmplPath = path.join(ROOT, skill.dir, 'SKILL.md.tmpl'); + const content = fs.readFileSync(tmplPath, 'utf-8'); + expect(content).not.toContain('CLAUDE_SKILL_DIR'); + } + }); + + test('generated skills do not reference legacy CLAUDE_SKILL_DIR hook paths', () => { + for (const skill of ALL_SKILLS) { + const mdPath = path.join(ROOT, skill.dir, 'SKILL.md'); + const content = fs.readFileSync(mdPath, 'utf-8'); + expect(content).not.toContain('CLAUDE_SKILL_DIR'); + } + }); + test('generated SKILL.md contains operational self-improvement (replaced contributor mode)', () => { const content = fs.readFileSync(path.join(ROOT, 'SKILL.md'), 'utf-8'); expect(content).not.toContain('Contributor Mode');