ワンクリックで
trace-review
Analyze recent execution traces to find recurring patterns, failures, and optimization opportunities.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Analyze recent execution traces to find recurring patterns, failures, and optimization opportunities.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | trace-review |
| description | Analyze recent execution traces to find recurring patterns, failures, and optimization opportunities. |
| when_to_use | Reach for this after `/trace-compile`, when investigating a session with a high error rate, or when looking for recurring patterns that haven't yet been turned into SEPL proposals. Do NOT use for compiling raw traces — use `/trace-compile` instead. Do NOT use for proposing fixes — use `/trace-evolve` instead. |
| disable-model-invocation | true |
| paths | [".claude/traces/*.jsonl"] |
| allowed-tools | ["Read","Bash","Glob"] |
| logical | report enumerates recurring failures, file hotspots, and session-health trend with recommendations |
Analyze execution traces stored in ~/.claude/traces/ to identify patterns across sessions.
stat -c '%Y %n' ~/.claude/traces/*.jsonl 2>/dev/null | sort -rn | head -5 | cut -d' ' -f2- to find the 5 most recent sessionstype, timestamp, and type-specific fields~/.claude/traces/type, timestamp, and type-specific fieldsbash: command, exit_code, output_preview, cwdfile: tool (Write/Edit), file_path, cwdsession_end: bash_commands, file_operations, errors, unique_files_modified## Trace Review (last N sessions)
### Recurring Failures
- [pattern]: happened N times across M sessions
### File Hotspots
- [file]: modified N times (consider: tests? refactor? stability?)
### Session Health Trend
- Avg error rate: N%
- Avg commands/session: N
- Trend: improving/stable/degrading
### Recommendations
- [actionable suggestion based on patterns]
Input: 5 most-recent JSONL files in ~/.claude/traces/ containing 23 bash entries with exit_code != 0 for npm test and 11 file entries touching src/auth/middleware.ts.
Output:
## Trace Review (last 5 sessions)
### Recurring Failures
- `npm test` exit 1: 23 occurrences across 4 sessions — same assertion failure in auth.test.ts
### File Hotspots
- src/auth/middleware.ts: modified 11 times (consider: missing test for session-timeout branch)
### Session Health Trend
- Avg error rate: 18%
- Avg commands/session: 47
- Trend: degrading
### Recommendations
- Add an assertion-level test for the session-timeout branch before further edits to middleware.ts
Input: traces show low error rate but rg and grep commands repeated 6+ times per session against the same paths with empty output.
Output:
## Trace Review (last 5 sessions)
### Recurring Failures
- (none above threshold)
### File Hotspots
- (no file modified ≥3 times)
### Session Health Trend
- Avg error rate: 3%
- Avg commands/session: 62
- Trend: stable
### Recommendations
- Wasted-turn pattern: 6+ near-duplicate rg/grep queries per session. Vary search terms or consult `codegraph_search` first.
Use when the user describes a multi-step feature or refactor and you need to decide whether to handle it solo, dispatch a parallel `/fan-out`, or run a `/worktree-team` planner→generator→reviewer pipeline. Outputs a routing recommendation with the reasoning behind it.
Use whenever the user asks to apply the same operation to many independent files or components — bulk migration, batch refactor across controllers, parallel exploration of unrelated subsystems. Dispatches one subagent per file with a shared prompt template, then collects the results.
Use to toggle the safe-mode flag at .claude/safe-mode. The flag is written automatically by consecutive-failure-guard once tool failures hit FORGE_SAFE_MODE_THRESHOLD (default 5), and block-destructive.sh denies every Bash/Write/Edit while it exists. /safe-mode off clears the flag, logs the exit, and prompts /postmortem; /safe-mode on enters manually; /safe-mode status reports current state.
Run the 5-stage Token Transformation Pipeline (TRAE §5.2.2) over the current session state — Collection, Ranking, Compression, Budgeting, Assembly. Emits a concrete next-action recommendation (/compact, /lean-md, or /progress-log + fresh session) instead of a generic warning.
Audit or scaffold a CLAUDE.md against the Karpathy 4-section structure (Think Before Coding · Simplicity First · Surgical Changes · Goal-Driven Execution). Companion to /lean-md — structure audit, not size trim.
Print every policy enforcement point declared in plugins/diagnostics/registry/policies.json — id, verdict, plugin, hook event, severity, bypass — grouped by verdict. Single discoverable index of what the harness blocks, anchors, nudges, or logs at runtime.