Use when a judged benchmark or acceptance scenario fails and you need the cause before editing. Reads the judge's rendering, the raw transcript, the primitive the agent saw and the scenario, then reports a classified diagnosis without fixing.
70
86%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
When a scenario fails, the natural reflex is to edit the primitive and re-run. That is guessing. A judged run leaves four artefacts behind — the judge's rendering, the raw transcript the agent's CLI wrote for itself, the snapshot of the primitive the agent read, and the scenario definition — and together they carry the actual chain of cause and effect: what the agent saw, what it did, what it emitted, what the judge measured. This skill enforces an evidence-first diagnosis so each iteration moves on facts, not hopes.
Harnesses differ. Names and paths in this file are examples; the four artefact kinds are the constant. Match by kind, never by file name.
<step_by_step>
Locate the run and its four artefacts
find <run-dir> -name '*.jsonl'..claude/skills/, .codex/skills/, .cursor/skills/,
.opencode/skills/).run-1, run-2, attempt-1).
Diagnose each failed attempt, not only the first.Read the judge's rendering end to end
Read the raw agent transcript
jq -r 'select(.type=="response_item") | .payload | select(.type=="function_call" or .type=="custom_tool_call") | .name' <file> | sort | uniq -c | sort -rn
(arguments are in .payload.arguments / .payload.input; the agent's
own text is in response_item lines of type message with role
assistant, its reasoning in lines of type reasoning).jq -r 'select(.message.content|type=="array") | .message.content[] | select(.type=="tool_use") | .name' <file> | sort | uniq -c | sort -rn
(the agent's own text and thinking are assistant lines whose content
blocks are of type text / thinking).
Another CLI needs another selector; read one line of the file and write
the equivalent query rather than skipping the histogram.Read the scenario definition
Read the primitive — BOTH copies, side by side
There are two different copies of the same primitive, in two different locations. You MUST read both and compare them. Confusing them leads to the wrong classification.
Do NOT read the project's own installed copy — the one the IDE loads for your session — and call that the snapshot. It is the current source under another path, and it tells you nothing about what the failing agent saw.
After reading both, diff (a) vs (b):
The classification depends on what (a) said vs. what the agent actually emitted — not on what (b) currently says.
Re-derive the verdict
Match symptoms to the failure-mode taxonomy (next section). Pick the most likely mode based on the quoted evidence. If two modes fit equally, list both; do not collapse them.
Decide whether an interview is the next evidence step
cd <run workspace> && CODEX_HOME=<run home>/.codex codex exec resume <uuid> "<question>"
(<uuid> is the tail of the rollout filename; open the question with
"Do not invoke any skill; answer from memory").cd <run workspace> && HOME=<run home> claude -p --resume <uuid> "<question>"
(<uuid> is the transcript filename without its extension).
Resolve a symlinked run directory with readlink before using it as a
path. The workspace outlives the run, so the session can be resumed in
place.Write the diagnostic report (template below). Every claim cites a quoted line from step 2/3/4/5.
</step_by_step>
A symptom-to-cause map. Use the symptom column to match what you observed; the cause column gives the most likely root cause; the fix-direction column points the next iteration at a real lever, not a guess. Do not invent new modes unless the evidence rules out every one listed.
MD-PRIOR-BULLETS (markdown-prior-wins-over-instruction)
1., 2., …); the
agent emits bulleted dashes (- **X** —) for option lists with rich
descriptions.HEADING-INSTEAD-OF-ITEM
### Variant A, ### Variant B, or **1. Title** (bold
heading).### Variant A is wrong; demonstrate the correct shape with the EXACT
surface form expected.STALE-SKILL-IN-SANDBOX
SKILL-NOT-MOUNTED
COMPOSITE-DELEGATION-BYPASS
PERSONA-MISMATCH
TEST-FITTING-PERSONA
CAPABILITY-CLAIMED-UNAVAILABLE
CROSS-PACK-REFERENCE-MISSING
Produce exactly this structure. Every bullet ends with a (<file>:<line-range>)
citation.
# Diagnostic Report: <scenario-id>
## Run inspected
- Run dir: <path>
- Verdict line: "<paste>"
- Failed checklist items (id + critical?): <list>
## Evidence collected (paths)
- judge's rendering — <path>, <bytes>, <line count>
- raw transcript — <path>; tool-call histogram:
<paste the histogram verbatim>
- primitive snapshot — <path>, <bytes>
- scenario definition — <path>
## Judge's rendering vs transcript
- <each capability or "I did X" claim from the session log: "claimed …; transcript shows …" with the decisive line quoted> (<transcript path>:<line>)
## Agent's last assistant turn (verbatim, ≤30 lines)<paste>(:-)
ad81ae6
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.