Codexqa Rootcause Analyzer logo

Codexqa Rootcause Analyzer

Organization
openqa-cn
codexqa-rootcause-analyzer

Diagnoses exception root causes from stack traces, logs, call-chain dumps, and debug output using the CodexQA CLI for structured repo analysis. Use when the user mentions codexqa-rootcause-analyzer, exception RCA, crash analysis, AI code diagnosis, stack diagnosis, 异常根因, 堆栈诊断, 崩溃分析, 异常诊断, or asks to turn an exception into a root-cause report. Not structure/impact analysis (that is codexqa-code-analyzer), not SAST + Agent LLM Detection code-risk scan reports (that is codexqa-defect-analyzer), and not CodexQA evidence-pack HTML review (that is codexqa-code-reviewer). Former skill name: root-cause-diagnosis.

Overview

Publisheropenqa-cn
Repositorycodexqa
Skill namecodexqa-rootcause-analyzer
Stars
233
Forks
3
Bundled files
33
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 33 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by openqa-cn on GitHub. Read the source before you install it.

Installation

Install the Codexqa Rootcause Analyzer AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/openqa-cn/codexqa/tree/main/skills/codexqa-rootcause-analyzer
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/openqa-cn/codexqa.git /tmp/codexqa
mkdir -p .claude/skills
cp -r /tmp/codexqa/skills/codexqa-rootcause-analyzer .claude/skills/codexqa-rootcause-analyzer
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Codexqa Rootcause Analyzer in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Codexqa Rootcause Analyzer on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Codexqa Rootcause Analyzer is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Root Cause Diagnosis

Turns exception evidence into an English root-cause report. Structured understanding of the business codebase comes from the CodexQA CLI; this skill diagnoses on top of that analysis.

CLI: node {baseDir}/scripts/diagnose.ts ($SKILL_SCRIPT). Task data: {baseDir}/data/{taskId}/.

README.md / README.zh-CN.md / HOW_IT_WORKS.md / KNOWN_LIMITATIONS.md (and their .zh-CN twins) are human-facing. Do not load them at runtime.

Boundaries

NeedSkill
Symbol-graph change impact, callers, test gaps, entry riskcodexqa-code-analyzer
Exception RCA from stacks/logs on top of CLI analysisthis skill
SAST + Agent LLM Detection → report_scan.*codexqa-defect-analyzer
CodexQA evidence-pack + Agent LLM judgment → bilingual REVIEW-REPORT.htmlcodexqa-code-reviewer

Split of work

LayerOwns
TypeScript (draft-report)First-level English headings, extracted facts (facts.json), mechanical storyGaps
ModelReport narrative inside those headings, using only cited facts
TypeScript (write-report)Reject missing headings and story gaps. Do not reject on section length

Do not put exception-class fix wording in scripts/draft_report.ts. Mechanical defects stay in TypeScript; causal truth in this business domain stays with the model.

Happy path

run is seconds. Wall-clock is LLM round-trips. Do not load references/, other skills, --help, or scripts/*.ts before run. Do not invent Class#search:1 for → Class tails. Do not count 字 or trim to a hint.

  1. Collect exception evidence and the code location. Write an exception file if needed.
  2. One process: run (or submit --with-analyze) with --exception/--exception-file plus --git/--branch, --file, or --dir. Bare flags without run still run. Uploaded files and non-git folders are copied into data/<taskId>/repo and git-inited there only. Do not invent a git remote. Do not git init in the user's original path.
  3. run writes brief.json, facts.json, and a heading-only report.draft.md. It does not author or persist report.md. parse-exception is already done; skip unless parsed.json is missing.
  4. If stdout has facts / factsPath, fill report.draft.md from facts.json in one pass (Report rules below). If codexqa.ready=true and brief exists but facts are missing, draft-report --task-id then fill. Do not read analysis.json when brief/facts exist. Do not open ~/.codexqa/.
  5. write-report --from-draft. If stdout has storyGaps, edit the draft once from that output and retry. Do not retry to shrink length.
  6. Show one English paragraph from stdout chat.en (the first line of Executive summary) plus paths to report.md / report.en.md / report.html. If chat.en is empty, use that summary line. Do not paste the full document.
  7. Observe stdout/meta timings after every CLI step. If a step is abnormally slow, diagnose that delay and fix it before continuing RCA.
  8. Skill defects (mandatory): if a step is wrong, truncates, skips a rule, or is flaky, first encode the rule in TypeScript (scripts/*.ts + tests/*.test.ts) so later runs cannot regress. Keep an Agent-only note in this file only when the check cannot be decided without an LLM (for example: whether a causal sentence is true in this business domain). After the TS fix, re-run or draft-report before filling the report.

Abbreviated class-only → Foo frames expand to hinted types ending with Foo before staying weak.

Report rules (mandatory)

English Markdown only. Same eight ## headings as references/report-template.md. No extra top-level headings. Do not write a Chinese report.

The Target column is a prompt hint for the model, not a write-report reject. Keep the report complete even if a section exceeds the hint.

SectionTarget (hint)Must contain
Executive summary100what failed, in-repo root, literal Confidence: high|medium|low
Symptom and exception facts100type, message gist, primary Class#method:line
Mapped call path300entry → each hop → extracted branch then-call → throw; mark weak frames
Root cause300earliest wrong contract in this repo, why that path ran; cite Class#method. Include race/contend only when facts.raceEvidence is true
Trigger100throw site; not the root cause
Contributing factors100factors grounded in facts (swallowKey, evidenceGaps); do not invent swallow / race / weak-frame claims
Suggested fix and verification100one fix + one verify; do not apply code
Confidence and gaps100use facts.confidence (high/medium); never write Confidence: high when facts say medium; one gap

Mapped call path and Root cause must tell the story: entry, hops, branch, and throw. Mention race/contend only when facts.raceEvidence is true. Cite catch-all swallow only when facts.swallowKey is set. Mark hypothesis when facts.lineDrift is non-empty; do not invent line-drift or weak-frame claims without facts. A slogan or a bare A→B→C is invalid. Do not paste facts.json as the report.

When facts.lineDrift is non-empty, Root cause must mark hypothesis. Trigger must cite the throw class and say it is not the root. Root must cite the throw class and (if extracted) the branch else-call.

write-report storyGaps (edit the draft once if rejected):

GapSectionRequired text
missing-confidenceExecutive summaryConfidence:
confidence-overstatedExecutive summarydo not write Confidence: high when facts.confidence is medium
mapped-missing-branch-thenMapped call pathfacts.branch.thenCall
mapped-missing-throwMapped call paththrow class from facts.throwKey
mapped-invented-weakMapped call pathdrop "weak frame" wording when facts.weakCount is 0
root-missing-branch-elseRoot causefacts.branch.elseCall
root-missing-throwRoot causethrow class
root-missing-raceRoot causeraced/race/contend — only when facts.raceEvidence=true
root-invented-raceRoot causeremove race/contend when facts.raceEvidence is false
root-missing-hypothesis-on-driftRoot causehypothesis when facts.lineDrift is non-empty
root-invented-line-driftRoot causedrop line-drift claims when facts.lineDrift is empty
contributing-missing-swallowContributing / Rootcite facts.swallowKey (or swallow wording) when set
contributing-invented-swallowContributing / Rootdrop swallow/catch-all claims when facts.swallowKey is null
trigger-missing-throwTriggerthrow class
trigger-missing-not-rootTriggernot the root (or not root)

Citations: one Class#method (or file:line) per causal claim. No SQL dumps, no numbered evidence lists, no whole-class pastes.

Chat: one English paragraph + paths to report.md / report.en.md. Do not paste the full document.

Entry

bash
node "$SKILL_SCRIPT" run --exception-file "$PATH" --dir "$LOCAL_DIR"
# uploaded business file (non-git OK; stack sibling sources in the same folder are bundled):
#   node "$SKILL_SCRIPT" run --exception-file "$PATH" --file /abs/path/OrderService.java
# remote:
#   node "$SKILL_SCRIPT" run --exception "$TEXT" --git "$GIT_URL" --branch "$BRANCH"
# already-open IDE / cwd:
#   node "$SKILL_SCRIPT" run --exception "$TEXT"
# stepwise (debug only):
node "$SKILL_SCRIPT" submit --exception-file "$PATH" --dir "$LOCAL_DIR"
node "$SKILL_SCRIPT" ensure-codexqa --task-id $TASK_ID --with-analyze
# fill data/<id>/report.draft.md from facts.json, then:
node "$SKILL_SCRIPT" write-report --task-id $TASK_ID --from-draft

Load order

Load each reference at most once, and never before run. Links from this file are one level deep.

FileWhen to load
references/workflow.mdStepwise debug, or facts missing after run
references/codexqa.mdBefore ensure-codexqa / analyze-frames when run did not index
references/exception-parse.mdBefore interpreting parsed.json when facts/brief are missing
references/report-template.mdBefore filling report.draft.md, only if Report rules above are not already in context

RCA rules

  • Distinguish trigger (the throw), root cause (earliest incorrect state/contract in this repo), and contributors.
  • Do not treat the last stack frame as the root cause.
  • Every causal claim cites Class#method or file:line. Do not add extra evidence lists.
  • Missing graph → hypothesis + how to verify. Never invent call edges.
  • After a real ensure-codexqa attempt with ready=false, grep is allowed and evidence is weak.

CodexQA (CLI only)

Install if missing: npm install -g @openqa-cn/codexqa --registry https://registry.npmjs.org/. Talk to the codexqa binary only (index / query / stats / repos). Do not copy engine or skill source into this skill. Details: references/codexqa.md.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Codexqa Rootcause Analyzer AI skill do?

Diagnoses exception root causes from stack traces, logs, call-chain dumps, and debug output using the CodexQA CLI for structured repo analysis. Use when the user mentions codexqa-rootcause-analyzer, exception RCA, crash analysis, AI code diagnosis, stack diagnosis, 异常根因, 堆栈诊断, 崩溃分析, 异常诊断, or asks to turn an exception into a root-cause report. Not structure/impact analysis (that is codexqa-code-analyzer), not SAST + Agent LLM Detection code-risk scan reports (that is codexqa-defect-analyzer), and not CodexQA evidence-pack HTML review (that is codexqa-code-reviewer). Former skill name: root-c...

Why use Codexqa Rootcause Analyzer on TypingMind?

Because you install it once and use it with any model. Codexqa Rootcause Analyzer is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Codexqa Rootcause Analyzer in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/openqa-cn/codexqa/tree/main/skills/codexqa-rootcause-analyzer. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Codexqa Rootcause Analyzer?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Codexqa Rootcause Analyzer?

As many as you like. As long as a model supports skills, you can use Codexqa Rootcause Analyzer with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Codexqa Rootcause Analyzer AI skill free?

Yes. It is published on GitHub by openqa-cn under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇