extend-harness
Installation
SKILL.md
Extend the Harness
1. Never hand-edit generated configs
.claude/settings.json and hooks/hooks.json generated. Edit skill-manifest.json, regenerate:
bash scripts/generate-hook-configs.sh --apply
bash scripts/generate-hook-configs.sh --check # drift check (lefthook runs this pre-push)
2. Add a new rule (grep-expressible)
Per-edit checks live as sourceable libs under .claude/hooks/checks/ and run through the PostToolBatch dispatcher (post-tool-batch.sh) -- one process per parallel tool batch on Claude; Codex re-expands them to per-call wrappers via the generator.
- First ask: can Biome/Ultracite express it? Single-element lint rules belong in the Biome config, not a hook (see the delegation header in
checks/accessibility-check.lib.sh). Hooks are for cross-element, cross-file, workflow, or LLM-behavior rules. - Write
checks/my-check.lib.shexposingrun_my_check()-- start from an existing*.lib.shas template -- plus a thin.claude/hooks/my-check.shwrapper (copy any 450-byte sibling). - Add the wrapper filename to the matcher block in
skill-manifest.json(usuallyPostToolUse.Edit|Write). - Regenerate:
bash scripts/generate-hook-configs.sh --apply. - Test: feed synthetic edit event on stdin: