From frontend-skills
Manages a frontend-skills hook harness: add rules, tune severity (block/warn/nudge/info/block-strict/diagnostic), debug hook firing, and view analytics.
How this skill is triggered — by the user, by Claude, or both
Slash command
/frontend-skills:extend-harnessThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
`.claude/settings.json` and `hooks/hooks.json` generated. Edit `skill-manifest.json`, regenerate:
.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)
my-check.sh in .claude/hooks/ -- start from any existing *-check.sh as template.skill-manifest.json (usually PostToolUse.Edit|Write).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
| Function | Exit | Claude sees | Logged | Use when |
|---|---|---|---|---|
hook_block | 2 | systemMessage | JSONL | Must fix before continuing |
hook_block_strict | 2 | [STRICT] prefix | JSONL | Security-critical, no escape hatch |
hook_warn | 0 | systemMessage | JSONL | Should fix, but proceed |
hook_nudge | 0 | [nudge] prefix | JSONL | Pattern suboptimal most cases |
hook_info | 0 | -- | JSONL | Telemetry only, no UI |
hook_emit_diagnostic | 0 or 2 | LSP JSON with range + fix | JSONL | Machine-parseable with auto-fix |
Default hook_warn for style, hook_block for correctness, hook_info for observation.
Grep can't express nested interactives, exhaustive switches, or useState-object-ref leaks reliably. AST-level patterns: handle in code review for now, or file issue for future Biome custom-rule integration. Don't fake with fragile multi-line regex -- too many false positives.
/frontend-skills-stats
Reports per-hook P50/P95 latency, blocks/warns/nudges/infos per rule, zero-fire candidates (prune), over-aggressive hooks (soften). Needs >=5 session summaries in ~/.claude/hook-metrics/.
HOOK_DEBUG=1 HOOKS_FAIL_CLOSED=1 claude
Then: tail -f /tmp/hook-session-*/debug.log. Fail-closed turns crash-into-silent-exit into crash-into-visible-block.
skill-manifest.json lists script under correct event+matcherbash scripts/generate-hook-configs.sh --check exits 0chmod +x)_hook-lib.sh, parses input, filters extension, handles escape hatchevals/ if non-trivialbash evals/run.sh passesnpx claudepluginhub redpanda-data/ui-harness --plugin frontend-skillsAnalyzes frontend-skills hook harness latency, rule violations, zero-fire hooks, and session trends. Use for hook profiling, manifest drift checks, and identifying over-aggressive or silent hooks.
Guides creating and managing Claude Code skills per Anthropic best practices: structure, triggers, YAML frontmatter, hooks, enforcement levels, skill-rules.json, debugging activation.
Guides creating and managing Claude Code skills with auto-activation, covering the two-hook architecture, skill-rules.json configuration, and guardrail/domain skill types.