From cc-bridle
Show hook execution timing from hook-timer.jsonl. Highlights slow hooks over 500ms.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cc-bridle:hook-timerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Read `~/.claude/cc-bridle/hook-timer.jsonl` and display:
Read ~/.claude/cc-bridle/hook-timer.jsonl and display:
node -e "
const fs = require('fs');
const os = require('os');
const path = require('path');
const timerFile = path.join(os.homedir(), '.claude', 'cc-bridle', 'hook-timer.jsonl');
if (!fs.existsSync(timerFile)) {
console.log('No hook timing data recorded yet.');
process.exit(0);
}
const lines = fs.readFileSync(timerFile, 'utf8').trim().split('\n').filter(Boolean);
const records = lines.map(l => { try { return JSON.parse(l); } catch(_) { return null; } }).filter(Boolean);
// Aggregate by hook_name
const byHook = {};
for (const r of records) {
const key = r.hook_name || 'unknown';
if (!byHook[key]) byHook[key] = [];
byHook[key].push(r.duration_ms);
}
const THRESHOLD = 500;
console.log('=== Hook Execution Timing ===');
console.log('hook_name | avg (ms) | max (ms) | min (ms) | status');
console.log('----------------|----------|----------|----------|--------');
for (const [hookName, durations] of Object.entries(byHook)) {
const avg = Math.round(durations.reduce((a, b) => a + b, 0) / durations.length);
const max = Math.max(...durations);
const min = Math.min(...durations);
const status = max > THRESHOLD ? '要最適化' : 'OK';
console.log(\`\${hookName.padEnd(16)}| \${String(avg).padEnd(9)}| \${String(max).padEnd(9)}| \${String(min).padEnd(9)}| \${status}\`);
}
const slowHooks = Object.entries(byHook).filter(([, durations]) => Math.max(...durations) > THRESHOLD);
if (slowHooks.length > 0) {
console.log('\n=== Slow Hooks (要最適化) ===');
slowHooks.forEach(([hookName, durations]) => {
const max = Math.max(...durations);
console.log(\` \${hookName}: 最大 \${max}ms(閾値: \${THRESHOLD}ms)\`);
});
console.log('\n遅い hook は処理を分割するか、非同期化することを検討してください。');
}
"
The warning threshold can be customized in ~/.claude/cc-bridle/config.json:
{
"hook_timer_threshold_ms": 500
}
Hooks exceeding this threshold will emit a warning to stderr during execution and will be highlighted as "要最適化" in this report.
npx claudepluginhub rozwer/cc-bridle --plugin cc-bridleAnalyzes 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.
Profiles WordPress runtime performance via WP-CLI profile command, reporting stage timings (bootstrap, main_query, template) and top 5 slowest hooks. Offers install if package missing.
Inspects and queries Claude Code hook event logs from .claude/logs JSONL files. Subcommands list sessions, timelines, tool traces, agent lifecycles, team activity, stats, coverage, and daily summaries.