Agent skill

Root-Cause Analysis Writer

by assafkip in assafkip/kipi-system

Writes a structured, blameless root-cause analysis for a defect that escaped a test or gate, separating surface from structural causes and linting the result.

MITAuto-check passedDevelopment

Install Root-Cause Analysis Writer

skills CLI
$ npx skills add assafkip/kipi-system --skill rca -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install assafkip/kipi-system rca --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/assafkip/kipi-system.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/kipi-core/skills/rca .claude/skills/rca && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
rca
GitHub stars
112
Token cost
~796 tokens
SKILL.md length
411 words
Files
6 (incl. scripts, references)
Skills in repo
14
Repo updated
First seen
Licence
MIT

At a glance

Writes a structured, blameless root-cause analysis for a defect that escaped a test or gate, separating surface from structural causes and linting the result.

  • Works in 6 steps: Surface vs structural root cause.… → Multi-factor. Use ### Root cause #1, ###… → Cause-type tags. Each structural cause… → …
  • A defect shipped and was caught after the fact
  • SKILL.md covers Before writing, When to write an RCA, Where RCAs land and The rules the lint enforces, plus 3 more sections
  • Runs Python and Shell scripts from its folder

What it does

When a failure gets past a test, a gate or review, a run comes back BLOCKED, or a bug recurs after a fix, the agent writes an RCA to the canonical template in `references/rca-template.md`. The aim is the missing guardrail and why the mistake was easy to make, not who made it. A trivial bug fixed immediately that never escaped a gate does not need one.

A lint, `scripts/rca-lint.py`, enforces the rules: surface versus structural cause, several causes when warranted, a type tag for each such as code-defect, config, missing-test or process, verification shown as a command and its result, and action items as owned checkboxes. An `rca-notify` hook nudges the agent to open an RCA when a command fails. Files go in `rca/` named with a slug and date, and a premortem variant covers high-trust deliverables before they ship.

When your agent uses it

  • A defect shipped and was caught after the fact
  • A bug recurs after a previous fix treated only the symptom
  • A run came back BLOCKED or a deliverable failed validation
  • Running a premortem before shipping a high-trust deliverable

Example prompts

  • “RCA this: the migration passed CI but broke staging.”
  • “Write a postmortem for the duplicate-invoice bug that came back after last month's fix.”
  • “Run a premortem on the quarterly report deliverable before we send it.”

Requirements

  • Python 3 for `scripts/rca-lint.py`

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Surface vs structural root cause. Surface is the trigger (what fired).
  2. Multi-factor. Use ### Root cause #1, ### Root cause #2 when more than
  3. Cause-type tags. Each structural cause carries a type: line, one of
  4. Verification is evidence. Show the command and result ("ran X, got Y") or
  5. Action items are checkboxes with owners. Not prose. An RCA is not finished
  6. Blameless. Describe system, contract, gate, and test failures. Never name

What it can do on your machine

Read from SKILL.md and the folder at commit 16d4724. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (Python and Shell), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Root-Cause Analysis Writer loads about 796 tokens when it runs, and up to ~2k if it reads all its reference files. Until then it costs about 111 tokens; SKILL.md has 411 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~111
When it runs · the whole SKILL.md, loaded when a task matches
~796
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from assafkip/kipi-system at commit 16d4724, republished under its MIT licence (© assafkip). 411 words, ~796 tokens.

Download SKILL.mdSave it as .claude/skills/rca/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
rca
description
Root-cause analysis for code. Use when a defect shipped and was caught after the fact, a run came back BLOCKED or a deliverable failed validation, a bug recurs after a prior fix, or the user says 'rca this', 'root cause this', 'postmortem this', or 'why did this break'. Produces a structured RCA that separates surface from structural cause, demands evidence-backed verification, and tracks action items. Also covers prospective premortems.

RCA Skill

The diagnostic counterpart to forward planning. When a failure gets past a test, a gate, or review, write a root-cause analysis to the canonical template. The goal is never who, it is: what guardrail was missing and why the mistake was easy to make.

Before writing

Read references/rca-template.md. It is the canonical structure and the exact contract the lint enforces. Do not improvise a different shape.

When to write an RCA

  • A defect shipped and a human or a gate caught it after the fact.
  • A run came back BLOCKED, or a deliverable failed validation.
  • A bug recurs after a prior fix (the prior fix treated a symptom).
  • The user says "rca this", "root cause this", "postmortem this", "why did this break".

A trivial bug you fix in the same breath, that never escaped a gate, does not need an RCA. A failure that got past a test, a gate, or review does.

Where RCAs land

q-system/output/rca/rca-<slug>-<YYYY-MM-DD>.md inside a kipi instance, or rca/rca-<slug>-<YYYY-MM-DD>.md in a plain repo. The lint fires on any file named rca-*.md / premortem-*.md or any doc whose H1 starts with # RCA: or # Premortem.

Show full SKILL.md (224 more words)Show less

The rules the lint enforces

  1. Surface vs structural root cause. Surface is the trigger (what fired). Structural is the latent systemic cause (why it was allowed and went uncaught).
  2. Multi-factor. Use ### Root cause #1, ### Root cause #2 when more than one structural cause contributed. Resist a single tidy cause.
  3. Cause-type tags. Each structural cause carries a type: line, one of: code-defect, config, environmental-trigger, missing-test, implicit-contract, process, capacity.
  4. Verification is evidence. Show the command and result ("ran X, got Y") or the passing test. An assertion with no observed output is not verification.
  5. Action items are checkboxes with owners. Not prose. An RCA is not finished until its actions are owned and trackable.
  6. Blameless. Describe system, contract, gate, and test failures. Never name a person as the cause.

The deterministic notify

The rca-notify hook watches command results. When a test or run fails (non-zero exit, or FAIL / BLOCKED / Traceback in the output), it injects a nudge to open an RCA. That is the shoulder-tap. The skill is how you answer it.

Premortem variant

Before shipping a high-trust deliverable, run a premortem instead: assume it already failed in front of the customer and enumerate how. Structure is in the template under "Premortem variant".

Enforcement

scripts/rca-lint.py validates every RCA/premortem doc on write. Bypass a single file with <!-- rca-lint-skip --> (intentional exceptions only).

© assafkip, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts, references) in plugins/kipi-core/skills/rca of assafkip/kipi-system.

  • SKILL.md
  • build-standalone.sh
  • references/rca-template.md
  • scripts/rca-lint.py
  • scripts/rca-notify.py
  • scripts/test_rca_lint.py

Open the folder on GitHubat commit 16d4724

Compare with similar skills

Root-Cause Analysis Writer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Root-Cause Analysis Writer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Root-Cause Analysis Writer this skillassafkip/kipi-system112—~796Automated safety check: PassMIT
Brendangregg Use Tsasickn33/agentic-awesome-skills47k1 repos~2.8kAutomated safety check: PassMIT
GitHub Issue Summaryascend-ai-coding/awesome-ascend-skills174—~1.4kAutomated safety check: PassNone
Post-Incident DebriefVeryGoodOpenSource/vgv-wingspan109—~1.9kAutomated safety check: PassMIT
Post Mortemhanamizuki/solopreneur152—~1.7kAutomated safety check: PassMIT
Post Mortemthananon/9arm-skills3.2k—~3.4kAutomated safety check: PassNone

Similar skills

  • Brendangregg Use Tsa

    sickn33/agentic-awesome-skills

    Methodical performance troubleshooting and root-cause analysis with Brendan Gregg's USE and TSA methods, plus evidence-backed RCA and postmortem reports.

    47k GitHub starsUsed in 1 repo~2.8k tokens
    DevelopmentAuto-check passed
  • GitHub Issue Summary

    ascend-ai-coding/awesome-ascend-skills

    Analyze closed GitHub issues to create troubleshooting case studies with root cause analysis and lessons learned.

    174 GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Post-Incident Debrief

    VeryGoodOpenSource/vgv-wingspan

    Produces a blameless post-incident debrief with timeline, root cause and follow-up actions after an outage, failed release or significant bug, while details are fresh.

    109 GitHub stars~1.9k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Post Mortem

    hanamizuki/solopreneur

    Trace when a bug was introduced, find the root cause commit, understand why it happened, and produce a structured post-mortem report.

    152 GitHub stars~1.7k tokensUpdated 12 days ago
    DevOps & CloudAuto-check passed
  • Post Mortem

    thananon/9arm-skills

    Write the canonical engineering record of a fixed bug — root cause, mechanism, fix, validation, and how it slipped through.

    3.2k GitHub stars~3.4k tokensUpdated 3 mo ago
    DevOps & CloudAuto-check passed
  • After Action Report

    rampstackco/claude-skills

    Run a structured after-action review (postmortem, retrospective) on a launch, incident, or completed project to capture timeline, root cause analysis, contributing factors, and actionable lessons.

    940 GitHub starsUsed in 1 repo~2.5k tokens
    Product & Project ManagementAuto-check passed

More from assafkip/kipi-system

All 14 skills in this repo
  • Deck AI

    assafkip/kipi-system

    Turns a markdown file into a themed, image-rich slide deck exported as PDF, using Slidev for layouts and Unsplash for photos, all run locally.

    112 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check: notes
  • Unified Design Router

    assafkip/kipi-system

    Routes visual design requests to built-in logo, corporate identity, slide, banner, social photo and icon workflows, backed by style data and AI image generation.

    112 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Improve Idea Critique

    assafkip/kipi-system

    Judges a pasted tip, post or video summary against what the kipi system already has, and returns adopt, skip or already-built with the files that back the verdict.

    112 GitHub stars~729 tokensUpdated yesterday
    Auto-check passed
  • Fable Discipline

    assafkip/kipi-system

    Teaches staged, verifiable coding habits for multi-file tasks and ships a hook that blocks tests from touching live data.

    112 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Architecture Review

    assafkip/kipi-system

    Surfaces architectural friction in real code — shallow modules, tight coupling, untested seams — and proposes deepening refactors using Ousterhout's deep-module principle (small interface hiding a…

    112 GitHub stars~817 tokensUpdated yesterday
    Auto-check passed
  • Audhd Executive Function

    assafkip/kipi-system

    AUDHD executive function accommodations. An agent skill from assafkip/kipi-system.

    112 GitHub stars~3.3k tokensUpdated yesterday
    Auto-check passed

Questions about Root-Cause Analysis Writer

What does Root-Cause Analysis Writer do?

Writes a structured, blameless root-cause analysis for a defect that escaped a test or gate, separating surface from structural causes and linting the result. md`. The aim is the missing guardrail and why the mistake was easy to make, not who made it.

When should I use Root-Cause Analysis Writer?

Root-Cause Analysis Writer fits situations like: A defect shipped and was caught after the fact; A bug recurs after a previous fix treated only the symptom; A run came back BLOCKED or a deliverable failed validation; running a premortem before shipping a high-trust deliverable.

How do I install Root-Cause Analysis Writer in Claude Code?

Run `npx skills add assafkip/kipi-system --skill rca -a claude-code`. Or copy the skill folder (plugins/kipi-core/skills/rca in assafkip/kipi-system) into .claude/skills/rca in your project. Claude Code loads it when a task matches its description.

How do I install Root-Cause Analysis Writer in Codex?

Run `npx skills add assafkip/kipi-system --skill rca -a codex`. Or copy the skill folder (plugins/kipi-core/skills/rca in assafkip/kipi-system) into .agents/skills/rca in your project. Codex loads it when a task matches its description.

Can I use Root-Cause Analysis Writer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add assafkip/kipi-system --skill rca -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rca, .gemini/skills/rca, .github/skills/rca and .opencode/skills/rca in your project.

What does Root-Cause Analysis Writer need to run?

Going by SKILL.md and its folder, Root-Cause Analysis Writer needs Python and a shell for the scripts in its folder. Our summary lists: Python 3 for `scripts/rca-lint.py`.

Does Root-Cause Analysis Writer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Root-Cause Analysis Writer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Root-Cause Analysis Writer use?

Root-Cause Analysis Writer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Root-Cause Analysis Writer use?

About 796 tokens (SKILL.md is roughly 3.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.2k tokens, read only when the agent opens those files.

What are the alternatives to Root-Cause Analysis Writer?

Skills that share tags, products or a category with Root-Cause Analysis Writer: Brendangregg Use Tsa (sickn33/agentic-awesome-skills, 47k stars), GitHub Issue Summary (ascend-ai-coding/awesome-ascend-skills, 174 stars), Post-Incident Debrief (VeryGoodOpenSource/vgv-wingspan, 109 stars) and Post Mortem (hanamizuki/solopreneur, 152 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Root-Cause Analysis Writer?

assafkip (a GitHub user) maintains it in assafkip/kipi-system, which has 112 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 7, 2026.

Source: assafkip/kipi-system on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.