Hook audit

From redpanda-data/ui-harness · View interactive version

Hook audit is an AI agent skill from the GitHub repository redpanda-data/ui-harness. Analyze hook effectiveness + session retro from collected metrics. Use when user asks to audit hooks, invokes `/hook-audit`, wants to identify silent/over-aggressive/under-enforced hooks, or asks for a retro / team analytics across recent sessions.

How to use this skill

Skill file

Hook audit

Step 0: Gather context

Run Bash commands before proceed:

Metrics dir: ~/.claude/hook-metrics/

Your task

Analyze hook effectiveness across all session metrics. Read every JSON in ~/.claude/hook-metrics/. Produce report:

1. Hook activity

Each hook fired >=1 across sessions:

2. Silent hooks

List hook scripts in .claude/hooks/ with zero entries in any metrics file. Prune candidates -- never trigger or not wired to logging.

3. Over-aggressive hooks

High block counts hurt productivity:

4. Enforcement gaps

Cross-ref CLAUDE.md rules vs hook activity:

5. Recommendations

From data:

6. Retro analytics (session flow)

Broader than hook-level. Pull from session JSONL + git log same window as metrics.

Output per-metric: current value, 7-day trend (up/down/flat), actionable next step.

Mode flags

$ARGUMENTS:

Output format

Structured report. Tables where data fit. End with prioritized action list (max 5). If <5 session files, note data limited, recs preliminary.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.