self-rca

self-rca is a skill for Claude Code, Codex from kirodotdev/KiroCrew. It costs 72 tokens per session (1,026 once invoked), scanned A, original, Apache-2.0.

A self-review procedure for an AI coding assistant after it makes a mistake or is corrected. It requires a concrete account of the failure, five rounds of cause analysis, and a lasting lesson or safeguard.

In plain words
What is it for?
Use it after giving incorrect, fabricated, or off-target information to identify the failure and improve the assistant's future checks.
Why use it?
It replaces a vague apology with an examination of what went wrong, why the error was not noticed, and why no process prevented it.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it after giving incorrect, fabricated, or off-target information to identify the failure and improve the assistant's future checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kirodotdev/kirocrew/self-rca
About the project

Kiro Crew is a persistent development workspace where agents continue multi-step software work across sessions, schedules, and connected interfaces. Developers use it locally or remotely through a desktop app, web dashboard, CLI, Slack, or Discord, with unattended tasks and recurring jobs. The catalogue contains skills and instructions for working with this workspace.

kirodotdev/KiroCrew · 4,449 stars · on GitHub · kiro.dev

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.

Any agent
npx skills add kirodotdev/KiroCrew --skill self-rca
Clone the repo
git clone --depth 1 https://github.com/kirodotdev/KiroCrew

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for self-rca

README.md
[![agentmods](https://agentmods.dev/badge/skills/kirodotdev/kirocrew/self-rca/github.svg)](https://agentmods.dev/skills/kirodotdev/kirocrew/self-rca)
Your own site
<a href="https://agentmods.dev/skills/kirodotdev/kirocrew/self-rca"><img src="https://agentmods.dev/badge/skills/kirodotdev/kirocrew/self-rca/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for self-rca

Your own site · 80×15
<a href="https://agentmods.dev/skills/kirodotdev/kirocrew/self-rca"><img src="https://agentmods.dev/badge/skills/kirodotdev/kirocrew/self-rca.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,026 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00072 $0.01026
Opus 5.5 $0.00029 $0.00410
Sonnet 5.5 $0.00014 $0.00205
Haiku 4.5 $0.00007 $0.00103

Measured 8d ago against content hash fd0c470f0c85, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

self-rca 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 8d 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.

skills/self-rca/SKILL.md · 76 lines

How it starts

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

Self-RCA — blameless analysis of your own failure

An apology is not a correction. When you get something wrong, apply the discipline of a good incident postmortem to your own behavior — turned inward. Do this instead of "sorry, let me try again." Keep it tight; this is a correction, not a performance.

When this fires

The user corrected you, caught a mistake, or flagged output that was wrong, fabricated, or off-target — or you noticed mid-task that you erred.

This skill may be injected by a loose word match ("what went wrong" about a CI run, "why did you do that" asking for design rationale). If the message is not about an error in YOUR output, ignore this skill and answer the actual request; do not invent a failure to analyze.

Do this, briefly

1. Name the failure concretely

One or two sentences, no hedging. If you fabricated something, say "I fabricated X." If you assumed, say "I assumed X without checking." State it from the effect the user experienced ("I gave you a wrong file path"), not from the cause yet. Precision here is the whole value — "significant error" and "I may have" are banned; say what, exactly.

2. Five Whys — three axes, not one

Ask "why" until you reach a systemic cause you can actually change — "I answered from memory instead of reading the file," not "I need to be more careful" (a wish, not a cause). Answer all three, the way a postmortem must cover cause, detection, and resolution:

  • Cause: why did the wrong output happen?
  • Self-detection: why didn't you catch it before the user did? (What check would have flagged it?)
  • Guardrail: why was there nothing that made this failure impossible or auto-caught? (Missing verification step, no "say I don't know" fallback.)

Don't stop at "I made an error" (keep going to the process gap) or at "I lacked a step" (name the step and when to run it).

3. Separate what you knew, assumed, and invented

Three buckets for the failed output: what you had real grounds for, what you inferred, and what you generated with no basis. Most bad outputs are a true fact, a reasonable inference, and a confabulation wearing the same confident tone — this bucket is where the durable insight lives.

Read the full file on GitHub · 76 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. 8d ago Changed · +12 lines fd0c470f0c85
  2. 11d ago First seen · 64 lines · 72 tokens per session scan A d73b573e7d4f

Subscribe to this mod's changes

self-rca is a skill published in the GitHub repository kirodotdev/KiroCrew (4,449 stars, last pushed today), licensed Apache-2.0. It adds 72 tokens to every session and 1,026 once invoked, about $0.0003 per session on Opus 5.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-10-05.

Related

Other skills, from other repositories

cost-efficiency-analyzer

Analyzes cost structure, cost efficiency, and expense management from P&L data. Use when the user asks about costs, expenses, COGS, operating expenses, cost ratios, cost control, spending efficiency, margin compression from cost side, or wants to understand where money is going. Also use for "are we spending too…

awslabs/agentcore-samples · 98 tokens

sector-rotation

Identify which market sectors to overweight or underweight based on current macro conditions and sector performance data.

awslabs/agentcore-samples · 22 tokens

trend-analysis

Analyze price and volume trends for one or more stocks to determine momentum direction and key technical levels.

awslabs/agentcore-samples · 21 tokens

deploying-to-staging-environment

Use when deploying changes to staging across relay, relay-dashboard, and relay-cloud repos - coordinates multi-repo branch syncing using git worktrees, automatically triggers staging deployments via GitHub Actions.

AgentWorkforce/relay · 44 tokens

writing-relayflows

Use when authoring a Relayflows flow (@relayflows/surface / @relayflows/sdk, the journal-based v2 engine — the CLI is flows, package versions 2.0.x) in TypeScript or YAML/JSON. Covers the three-rung ladder (run/llm/agent), the resident verbs (human/dispatch/done), verification gates, TypeScript vs YAML authoring…

AgentWorkforce/relay · 184 tokens

browser-testing-with-screenshots

Use when testing web applications with visual verification - automates Chrome browser interactions, element selection, and screenshot capture for confirming UI functionality.

AgentWorkforce/relay · 32 tokens