post-mortem

A diagnostic guide for finding defects in the instructions and tools that produced an outcome. A post-mortem is a structured review after a problem, and this one can optionally prepare a GitHub issue for the Rosetta project.

In plain words
What is it for?
Use it to review prompts, workspace files, local rules, skills, workflows, and tooling after a bad result, then write reusable prevention rules.
Why use it?
It helps identify the underlying instruction or configuration problem instead of changing only the resulting file. It also assigns the defect to the part of the system that caused it.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/griddynamics/rosetta/post-mortem
Any agent
npx skills add griddynamics/rosetta --skill post-mortem
Clone the repo
git clone --depth 1 https://github.com/griddynamics/rosetta

Made for: Claude Code, Codex.

Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,076 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00017 $0.02076
Opus 5 $0.00009 $0.01038
Sonnet 5 $0.00003 $0.00415
Haiku 4.5 $0.00002 $0.00208

Measured 3d ago against content hash 8eedc34de3dd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

post-mortem scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

instructions/r2/core/skills/post-mortem/SKILL.md · 135 lines

How it starts

The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.

<post_mortem>

<core_concepts>

  • All Rosetta prep steps MUST be FULLY completed, load-context skill loaded and fully executed
  • Explicit user invocation only; never auto-runs. Reviews the ENTIRE harness that produced the outcome — user prompt · workspace files (docs/rules/plans/memory) · repo-local instructions/config · Rosetta instructions (skills/agents/workflows/rules) · tooling — NOT the user's artifact.
  • Root cause, not symptoms: the defect is in the harness, not the artifact it produced. Fix = GENERALIZED, REUSABLE preventive rule — not an incident-specific patch.
  • Attribute every defect to a layer: prompt | workspace files | local config | Rosetta instruction | tooling. Most failures are local; do NOT default to blaming Rosetta.
  • Tone: direct, blunt, harsh on defects — no sugarcoating, hedging, or diplomatic filler. Call broken prompts, files, and instructions broken. Critique the harness, never people.
  • 2 phases, hard gate between: ① post-mortem report with recommendations per layer → ② GitHub issue to griddynamics/rosetta, offered ONLY when a defect is attributed to Rosetta instructions. ② NEVER starts without explicit opt-in.
  • Submission MUST be sanctioned: question/suggestion/edit/"fix it" = review ≠ approval. Unclear answer ≠ "no" → ASK AGAIN directly. Re-asking is allowed and expected; unsanctioned submitting is not.
  • Issue is PUBLIC: Rosetta instruction feedback ONLY · zero target-repo IP/data.
  • Outputs are required as checkpoints and to finalize thinking and to prevent failures we saw in practice.
  • Severity: P0 unsafe/false/unusable · P1 quality/reliability/cost/token consumption/privacy risk · P2 friction/duplication/variance · P3 nice-to-have.

</core_concepts>

① Post-mortem (always), strictly in this order:

  1. Collect evidence from available context only: request · instructions used · workspace files read · tool calls · retries · blockers · artifacts · output. Run not in context → ask for it; NEVER invent history.
  2. OUTPUT evidence inventory — available vs missing. ONLY THEN proceed.
  3. Assess every layer: prompt clarity/completeness · inferred-vs-told requirements · workspace files (stale, wrong, missing, contradictory) · repo-local instructions/config · Rosetta instruction ambiguity/gaps · execution errors · repeated same-approach retries · duplicated effort · tooling/context friction · validation gaps · user-input timing · handoff quality (per subagent if multi-agent).
  4. OUTPUT candidate issue list — one line each, suspected layer. ONLY THEN proceed.
  5. Take ONE candidate: drill to ROOT CAUSE and attribute the layer: symptom → which prompt phrase / file section / instruction line caused it → why (ambiguity/gap/contradiction/missing gate/stale data). Quote the source; state expected vs actual behavior. Ambiguous → ask 1-3 clarifying questions, do not guess.
  6. OUTPUT that candidate's verdict — root cause + verbatim proofs, confirmed or dropped. ONLY THEN take the next candidate: repeat 5-6 until none remain.
  7. ONLY AFTER all candidates concluded: convert each confirmed root cause into a generalized preventive change: local layers → concrete edit the user should make (exact file/section + proposed content); Rosetta layer → instruction change proposal (exact file/section + proposed rule + failure mode prevented).
  8. OUTPUT recommended changes per layer. ONLY THEN proceed.
  9. Store generalized rules in AGENT MEMORY.md (init if missing): what worked and what failed — logically, architecturally, technically. Concise, organized, reusable.
  10. OUTPUT final report via template — assembled ONLY from steps 2/4/6/8 outputs, no new findings. Material/recurring issues only; uncertain → label low-confidence. RECOMMEND local fixes to the user; apply NOTHING.

② GitHub issue (only if ≥1 defect attributed to Rosetta instructions; otherwise state "nothing Rosetta-attributable" and stop):

  1. GATE A: ask directly — "File the Rosetta-attributed finding(s) as a GitHub issue to griddynamics/rosetta?" Clear no → stop ②. Unclear/partial answer → RE-ASK directly until clear yes/no. NEVER proceed on silence or assumption.
  2. ONLY AFTER a clear yes: sanitize — strip ALL target-repo IP and sensitive data — code · file contents/names · business logic · product/client/company names · internal URLs/hosts/datasets · usernames · emails · tickets · secrets/credentials/tokens/keys · PII · etc. Unavoidable refs → <project>, <file>. Keep: Rosetta component, release, IDE/agent, model.
  3. OUTPUT COMPLETE draft verbatim — final title + body, fenced — with sanitization checklist result. ONLY THEN proceed.
  4. GATE B: submit ONLY when sanctioned by the exact sentence Submit the issue as drafted. Question → answer it, then RE-ASK. Comment/edit → revise → re-OUTPUT full draft → RE-ASK. Unclear → ask directly "Approve submission, or revise?". Loop until sanctioned or declined.
  5. ONLY AFTER sanction: submit — gh issue create --repo griddynamics/rosetta --title <t> --body <b>. gh missing/unauthed → hand user the draft + https://github.com/griddynamics/rosetta/issues/new; NO other channels.
  6. Report issue URL. Change NOTHING else — this skill fixes nothing.

Read the full file on GitHub · 135 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 135 lines · 17 tokens per session scan A 8eedc34de3dd

Subscribe to this mod's changes

post-mortem is a skill published in the GitHub repository griddynamics/rosetta (341 stars, last pushed 5d ago), licensed Apache-2.0. It adds 17 tokens to every session and 2,076 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.