npx skills add ...
npx skills add zernie/vigiles --skill edit-spec
Edit a vigiles .spec.ts to change a compiled instruction file (CLAUDE.md / AGENTS.md) — add, modify, or remove a rule, section, command, or key file. 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.
npx skills add zernie/vigiles --skill edit-spec
Edit a .spec.ts file to update the project's instruction files. The spec is the source of truth — CLAUDE.md and AGENTS.md are compiled build artifacts that must not be edited directly.
$ARGUMENTS — What the user wants to change. Examples:
Look for spec files in the repo root:
CLAUDE.md.spec.ts — source for CLAUDE.mdAGENTS.md.spec.ts — source for AGENTS.md*.spec.ts matching instruction filesIf no spec exists: if there's a hand-written CLAUDE.md, suggest the
adopt-spec skill; otherwise suggest npx vigiles init to scaffold one.
Read the spec file. It's a TypeScript file that exports a claude() call with these fields:
Based on what the user asked for:
Adding a rule (this absorbs the old generate-rule skill):
enforce() — a linter rule can back it. Check the project's linter configs
(ESLint, Ruff, Clippy, Pylint, RuboCop, Stylelint) for a matching rule; also
consider an architectural tool (ast-grep, Dependency Cruiser, Steiger). If
uncertain whether a rule exists, ask the user rather than guessing.check() — a filesystem structural convention ("every X needs a Y"). Only
for file-pairing; never for code content.guidance() — can't be mechanically enforced (subjective conventions,
process rules, migration context).enforce(): use the real linter rule name (e.g. eslint/no-console,
@typescript-eslint/no-explicit-any, ruff/T201).rules object with a kebab-case key derived from the intent,
preserving alphabetical order if the existing rules are alphabetical. Import
any new builders needed (e.g. check and every for the first check()).Updating a section:
sections. Sections are plain strings or tagged template literals with file(), cmd(), ref() for verified references# or ## headers inside sections — they break the document structureAdding a key file or command:
keyFiles or commands. The compiler verifies these exist at compile timepackage.jsonkeyFiles entry is a POINTER: what the file is for, so a reader knows
whether to open it. The explanation of how it works belongs in that file's own
header comment, where it is read when someone is actually in the file. An
instruction file is loaded on EVERY request, so a paragraph here is paid for
every turn, forever, by every reader — including the ones who never touch that
file.vigiles audit reports that
number as Always-loaded instructions, so check it when you touch this list.After editing the spec, run:
This regenerates the compiled instruction file(s). Review the output for any errors:
stale-file — a key file path doesn't existstale-command — a command isn't in package.jsoninvalid-rule — a linter rule doesn't exist or is disabledsection-has-header — a section contains # headers (break into separate named sections)If the vigiles plugin is installed (/plugin marketplace add zernie/vigiles then /plugin install vigiles@vigiles, or npx vigiles init), the PostToolUse hook recompiles automatically after you save the spec.
enforce() would need a linter-config edit or a plugin install (a cost), or if it could fail a clean CI, say so and let the user choose — don't change linter config or flip on strict / workflow gating on your own. A pure win (a rule that's already enabled) you can just apply. The strengthen skill owns guidance() → enforce() upgrades.enforce() rules are verified — the compiler checks the rule exists AND is enabled in your linter config# or ## headers — use separate named sections insteadnpx vigiles compilenpx vigiles lint