Nexus: Skill for Claude Code

.claude/skills/devflow/agents/rca/SKILL.md

root-cause-analysis is a skill for Claude Code from MT-gar/Nexus. It costs 45 tokens per session (872 once invoked), scanned A, original, MIT.

A code-level investigation workflow that uses defect details, logs, error information, code reading, and past cases to explain why a bug happened. Its root-cause analysis report identifies the cause, evidence, affected areas, and suggested fix.

In plain words
What is it for?
Use it to trace an error to code, assess which modules, callers, and users are affected, search a knowledge base for similar cases, and produce a report for a fixer.
Why use it?
It reduces guesswork when diagnosing defects and records which code path and mechanism caused the problem. If evidence is missing, it reports that more information is needed instead of inventing a cause.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is MT-gar/Nexus's own configuration. It tells Claude Code how to work on Nexus itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Nexus configures →

View source ↗ MT-gar/Nexus
Reuse

Borrowing it

Nothing to install: this file belongs to MT-gar/Nexus. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/MT-gar/Nexus/main/.claude/skills/devflow/agents/rca/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/MT-gar/Nexus

Made for: Claude Code.

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 root-cause-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/mt-gar/nexus/rca/github.svg)](https://agentmods.dev/skills/mt-gar/nexus/rca)
Your own site
<a href="https://agentmods.dev/skills/mt-gar/nexus/rca"><img src="https://agentmods.dev/badge/skills/mt-gar/nexus/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 root-cause-analysis

Your own site · 80×15
<a href="https://agentmods.dev/skills/mt-gar/nexus/rca"><img src="https://agentmods.dev/badge/skills/mt-gar/nexus/rca.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 872 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.00045 $0.00872
Opus 5.5 $0.00018 $0.00349
Sonnet 5.5 $0.00009 $0.00174
Haiku 4.5 $0.00005 $0.00087

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

Security

Grade A, and why

root-cause-analysis 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 1mo 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.

.claude/skills/devflow/agents/rca/SKILL.md · 68 lines

What it actually says

Skill:root-cause-analysis(代码根因定位)

1. 业务用途

对聚合后的规范缺陷进行代码级根因定位:结合日志/错误信息定位可疑代码路径,确认根因机制与影响面(波及模块、调用方、用户),产出结构化 RCA 报告。通过检索研发知识库复用既往根因结论(轻量 RAG),避免重复排查。对应 8 步闭环的"工具调用"环节。

2. 输入输出 Schema

输入:

{ defect_id: string, defect_title: string, defect_description: string,
  severity: string, 可选的日志/堆栈: string }

输出(RCA 报告消息):

{ 根因: { 代码位置: string, 机制解释: string, 证据: string },
  影响面: { 模块: string[], 调用方: string[], 用户影响: string },
  修复建议: string,
  参考知识: Array<{ knowledge_id, title, 相似度 }> }

3. 调用触发条件

  • manager 创建"根因定位"任务(RCA 报告作为修复任务的输入规格)
  • 修复失败回退时重新定位(补充信息后重试)

4. 依赖工具

工具 用途
list_defects 读取缺陷详情
search_knowledge 知识库检索(root-cause/fix-pattern 标签命中既往案例)
update_defect 回写 rca_task_id、状态置 fixing
claim_task / update_task / wait_for_work 任务生命周期
客户端原生能力 代码库搜索/阅读、日志查询(grep、git log/blame)

5. 失败重试 / 降级机制

  • 信息不足(缺复现/日志)→ 任务置 blocked,报告 manager 补充信息,不瞎猜根因
  • 知识库命中既往根因 → 直接复用并标注引用,仍验证当前代码位置是否一致
  • 降级:无法访问代码库时输出"基于日志证据的根因假设 + 待验证清单",由 fixer 验证

6. 安全权限边界

  • ✅ 允许:只读操作(list_defects / search_knowledge / 代码阅读)
  • ❌ 禁止:修改代码、执行发布、审批操作、update_defect 中修改 severity 之外的业务字段(仅允许回写 rca_task_id 与状态)
  • ⚠️ RCA 报告中的敏感信息(密钥/用户数据)脱敏后再发消息

7. 多场景复用价值

  • 代码缺陷根因定位(本场景)
  • 告警根因定位(监控指标异常 → 关联服务与代码 — 零人工运维方向)
  • 故障排查助手(任何"现象 → 根因"的分析场景,配合知识库复用)

8. 与多 Agent 协作链路

triage-agent ──缺陷看板──▶ devflow-manager ──RCA 任务──▶ rca-agent
rca-agent ──RCA 报告──▶ devflow-manager ──修复任务(附 RCA)──▶ fixer-agent

RCA 报告是修复任务的输入规格;通过 search_knowledge 与 retro-agent 沉淀的知识库形成"经验复用"回路。

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. 1mo ago First seen · 68 lines · 45 tokens per session scan A e090b5cb2dc1

Subscribe to this mod's changes

root-cause-analysis is a skill published in the GitHub repository MT-gar/Nexus (2 stars, last pushed 1mo ago), licensed MIT. It adds 45 tokens to every session and 872 once invoked, about $0.0002 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-09-20.

Related

Other skills, from other repositories

systematic-debugging

Use when debugging a failing test, build error, or runtime issue that isn't immediately obvious. Guides a 4-phase root cause analysis instead of random fix attempts.

open-metadata/OpenMetadata · 37 tokens

log-error-digest

Analyze log files to troubleshoot errors, identify peak error periods, and produce error clustering, frequency statistics, and time distribution reports. Supports JSON, syslog, and Nginx formats with automatic detection. Use when a user uploads a .log file and asks to analyze errors, find patterns, debug issues, or…

zebbern/claude-code-guide · 71 tokens

cwv-optimizer

Diagnose and fix Core Web Vitals issues on AEM Edge Delivery Services pages. Goes deeper than generic CWV advice by understanding EDS-specific performance patterns including the 100KB LCP budget, E-L-D loading phases, block rendering behavior, and third-party script impact. Produces specific fixes for LCP, CLS, and…

adobe/skills · 112 tokens

incident-response-incident-response

Coordinate production incident triage, mitigation, investigation, recovery, and follow-up. Use when responding to outages or other incidents that require structured operational coordination.

rmyndharis/antigravity-skills · 36 tokens

ci-fixer

CI failures - read error, minimal fix, verify.

sipyourdrink-ltd/bernstein · 15 tokens

diagnosing-missing-recordings

Diagnoses why a session recording is missing or was not captured. Use when a user asks why a session has no replay, why recordings aren't appearing, or wants to troubleshoot session replay capture issues for a specific session ID or across their project. Covers SDK diagnostic signals, project settings, sampling…

PostHog/posthog · 76 tokens