/vigiles:adopt-spec <path to CLAUDE.md, defaults to CLAUDE.md>from vigiles
Generates a typed CLAUDE.md.spec.ts from an existing hand-written CLAUDE.md or AGENTS.md, preserving all rules and commands non-destructively.
Ships in vigiles. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Start a typed CLAUDE.md.spec.ts from an existing hand-written CLAUDE.md (or AGENTS.md). This is the non-destructive adoption path — you keep your existing instruction file as the starting point and get type safety going forward.
Say that this skill is running. Start your first reply with one line: Running the adopt-spec skill on <file>. The user should see that adoption started, and on which file, without opening the tool output.
Adoption is the safe, faithful on-ramp — never an upgrade in disguise. These are non-negotiable:
keyFiles field — see the guideline under Step 3.CLAUDE.md / AGENTS.md. Only write the new .spec.ts. Never auto-compile over the file — switching it to spec-managed is a separate, explicit step the user runs with a diff to review.guidance() as guidance(). Upgrading to enforce() has a cost (config/plugins, possible false positives) and is a separate opt-in step — the strengthen skill. Adoption is not turning on strict / workflow gating.vigiles eject <file> hands the file back as plain hand-owned markdown anytime — it's never a one-way door. Tell the user this.vigiles lint with the same engine: <!-- vigiles:enforce ... --> for a linter rule, <!-- vigiles:file <path> --> for a file, <!-- vigiles:cmd "<command>" --> for a script (every mark: docs/verifying-instruction-files.md#inline-marks in the vigiles repository).Read the target instruction file (default: CLAUDE.md in the repo root). If the user specified a path, use that.
Also check if vigiles is installed: look for vigiles in package.json devDependencies. If not, suggest:
npm install -D vigiles
Identify these sections in the markdown:
`npm run build` — description or - `command` — description`src/foo.ts` — description listing important files. Never becomes keyFiles (deprecated); see the guideline under Step 3### headings with **Enforced by:**, **Claimed (unverified):** or **Guidance only** annotationsFor each rule, classify it:
**Enforced by:** \linter/rule`→enforce("linter/rule", "why")`**Claimed (unverified):** \linter/rule`→enforce("linter/rule", "why")` too — the last compile could not verify it; the next one will say why**Enforced by:** \code-review`or similar non-linter →guidance("...")`**Guidance only** → guidance("...")Create CLAUDE.md.spec.ts (or the appropriate name based on the source file) with this structure:
import {
instructionFile,
enforce,
guidance,
file,
cmd,
ref,
prose,
} from "vigiles/spec";
export default instructionFile({
sections: {
// Prose sections here
},
// No `keyFiles`: the field is deprecated (removed next major). A "Key Files"
// list in the original file is NOT carried over as a map — see the
// guideline below.
commands: {
// Commands here
},
rules: {
// Rules here
},
});
Important guidelines:
file() refs in sections where file paths appear in backticks — this enables stale reference detectionkeyFiles. The field is deprecated and removed in the next major (vigiles lint warns as deprecated-key-files). For a "Key Files" / file-map section in the original, apply the migration recipe (docs/rules/deprecated-key-files.md in the vigiles repository) and show the user, per entry, where it goes — the first that fits: (1) the file's header, the docs or the path already say it (or the path no longer exists) → delete it; (2) a fact about that one file → that file's header comment; (3) a rule for working in one folder → that folder's nested CLAUDE.md (its own <folder>/CLAUDE.md.spec.ts); (4) nothing else would lead an agent to the file → a one-line file() pointer in the section where the decision that needs it is written. Where each entry goes is the user's call; that the map does not become keyFiles is not. Until they decide, carry the list over as a plain prose section so adoption stays faithfulscripts/check.sh fails on Y") gets that path as a file() ref inside the rule's text, so lint fails when the script is renamed or deleted. Say so in the conversion summary. If the user keeps the file hand-written instead, offer the same check as a <!-- vigiles:file <path> --> line under the rulecmd() refs for any npm run commands mentioned in sections**Enforced by:** \code-review`rules toguidance()` — code review is not a mechanical enforcement// TODO: classify as enforce() or guidance() comment**Why:** text as the second argument to enforce() or guidance()ref() for cross-referencesRun:
npm run build
npx vigiles compile CLAUDE.md.spec.ts
Compare the compiled output against the original file. Key differences are expected (formatting, section ordering), but all rules, commands, and prose content should be preserved (a file map is the exception — see the keyFiles guideline above).
Show the user:
npx vigiles compilenpx vigiles lintAsk if they want you to write the file. If yes, also suggest adding to .gitignore or updating CI to run vigiles compile and vigiles lint.
If the user wants CI integration, suggest adding to their GitHub Actions workflow:
- name: Compile specs
run: npx vigiles compile
- name: Verify references + integrity
run: npx vigiles lint
Or using the vigiles GitHub Action:
- uses: zernie/vigiles@v1
with:
command: lint
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub zernie/vigiles --plugin vigiles6 skills in this plugin
/debug-my-harnessDiagnose why an agent harness misbehaved by reading the local flight-recorder ledger (.vigiles/runs.jsonl) — which skills fired or got hijacked, which hooks blocked or wrongly allowed, which subagent tool-contract violations happened, and how a skill's trigger rate moved. Use when asked why a skill stopped firing, why a hook didn't block, why the wrong skill ran, or to debug/investigate what the harness actually did. NOT for writing new rules (use strengthen) or editing the spec (use edit-spec)./edit-specEdit a vigiles .spec.ts to change a compiled instruction file (CLAUDE.md / AGENTS.md) — add, modify, or remove a rule, section, command, or file pointer (including a request to add a "key file" — the keyFiles field is deprecated). Use whenever you need to change a CLAUDE.md/AGENTS.md that carries a vigiles hash (edit the spec, never the artifact), including adding a new enforce()/check()/guidance() rule./linter-docsOther plugins' skills for the same job