AGENT SKILL

extend-harness

Extend the harness: shell rules, Claude Code mods, severity tiers, and analytics.

License 许可
MIT
最近更新
2026-11-13
Stars
★ 4
Forks
1

01 前言 Front Matter

name
extend-harness
description
Extend the harness: shell rules, Claude Code mods, severity tiers, and analytics.
disable-model-invocation
true

02 资源文件 2

03 SKILL.md 正文

Edit manifests/libraries, not generated configs. REFERENCE.md: severities, options, parser contracts, debugging.

Claude mods: MODS.md. Cross-runtime enforcement stays in settings hooks.

Evidence bar

Compose existing skills before adding. Justify rules with a real failure or unmet contract; prove clean -> violation -> clean.

Add rule

  1. Prefer Biome/Ultracite; hooks cover cross-element/file, workflow, agent behavior.
  2. Copy .claude/hooks/checks/*.lib.sh: one run_* function and thin .claude/hooks/*.sh wrapper.
  3. Register in skill-manifest.json, usually PostToolUse.Edit|Write.
  4. Add focused evals/ fixture; prove RED -> GREEN.
  5. Regenerate and test:
bash scripts/generate-hook-configs.sh --apply
echo '{"hook_event_name":"PostToolUse","tool_name":"Edit","tool_input":{"file_path":"/tmp/x.ts"}}' | bash .claude/hooks/my-check.sh

Use hook_warn for style, hook_block correctness, hook_block_strict security, hook_info observation. Prefer skill-scoped hooks for one vertical.

Implementation

  • Manifest objects carry permission/async filters; retain stdin guards: Codex drops Claude-only filters.
  • Structure: Biome/AST; judgment: review.
  • Sync toolchain bans with hooks/frontend-skills.rules.

Audit/debug

/hook-audit --all: latency/firing/zero-fire; HOOK_DEBUG=1 HOOKS_FAIL_CLOSED=1 claude: missing hooks; claude --safe-mode: isolate customization. /doctor latency is a P95 budget failure.

Done

Manifest owns matcher; executable script sources _hook-lib.sh, parses stdin, filters paths, documents escape; fixture proves RED -> GREEN; generator --check and bash evals/run.sh pass.

04 同仓库更多 Skills