ai-instructions: Skill for Cursor

.cursor/skills/root-cause-analysis/SKILL.md

root-cause-analysis is a skill for Cursor from lsampaioweb/ai-instructions. It costs 76 tokens per session (607 once invoked), scanned A, original, MIT.

A read-only process for finding the verified underlying cause of errors from logs, exceptions, stack traces, or terminal failures. It traces the failure to the responsible code and checks relevant configuration and dependencies.

In plain words
What is it for?
Use it to investigate application crashes, failing commands, exception traces, configuration problems, dependency issues, and permanent fixes.
Why use it?
It separates the actual cause from symptoms and avoids temporary workarounds that may hide the problem. The process requires stating the cause and how the failure happens before proposing code changes.

Skill for Cursor

Written for Cursor: installed under .cursor/.

This is lsampaioweb/ai-instructions's own configuration. It tells Cursor how to work on ai-instructions 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 ai-instructions configures →

Reuse

Borrowing it

Nothing to install: this file belongs to lsampaioweb/ai-instructions. 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/lsampaioweb/ai-instructions/main/.cursor/skills/root-cause-analysis/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/lsampaioweb/ai-instructions

Made for: Cursor.

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/lsampaioweb/ai-instructions/root-cause-analysis/github.svg)](https://agentmods.dev/skills/lsampaioweb/ai-instructions/root-cause-analysis)
Your own site
<a href="https://agentmods.dev/skills/lsampaioweb/ai-instructions/root-cause-analysis"><img src="https://agentmods.dev/badge/skills/lsampaioweb/ai-instructions/root-cause-analysis/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/lsampaioweb/ai-instructions/root-cause-analysis"><img src="https://agentmods.dev/badge/skills/lsampaioweb/ai-instructions/root-cause-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 607 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.00076 $0.00607
Opus 5.5 $0.00030 $0.00243
Sonnet 5.5 $0.00015 $0.00121
Haiku 4.5 $0.00008 $0.00061

Measured 1mo ago against content hash 08b000dda3f9, 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.

.cursor/skills/root-cause-analysis/SKILL.md · 72 lines

How it starts

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

Root Cause and Permanent Fixes

Arguments

  • Required: error logs, stack traces, or terminal output.

1. Trace the Failure

  1. Trace analysis: Parse the stack trace or log to isolate the originating line, class, and feature package.
  2. Context verification: Check the active environment configuration, dependency manifests, or runtime properties when systemic context is missing.
  3. Diagnostics: Run targeted checks, such as terminal commands or file searches, to verify framework behavior, documented defects, or version-specific edge cases.

2. Resolution Rules

  • State the verified Root Cause and failure mechanism before writing or proposing any code modifications.
  • Do not apply temporary workarounds.
  • Do not bypass visibility modifiers.
  • Do not suppress exceptions.
  • Do not inject unapproved dependencies.
  • Code fixes must adhere to packaging conventions and data-access patterns defined by the active project architecture.
  • Code fixes must respect dependency boundaries and detected runtime version constraints.
  • Correct broken interface contracts when they cause the failure.
  • Align data schemas when schema mismatch causes the failure.
  • Fix lifecycle and boundary violations when they cause the failure.

3. Safety Guards

  • Execution boundary: Apply code fixes only after presenting the plan and receiving the user's explicit confirmation.
  • Safety Gate: Never generate speculative code fixes when the root cause cannot be verified with high confidence.
  • Truncated/Ambiguous Logs: If the log is truncated or missing critical details, stop and prompt for the specific missing block.
  • Fallback Output: If unresolved, output:
    • List of attempted verification steps.
    • Precise technical uncertainties remaining.
    • The single next decisive diagnostic action for the developer to execute.

4. Review Plan Layout

Use this exact markdown schema:

Scope

  • Target: <error logs, stack traces, or terminal output>
  • Mode: <read-only | apply-after-confirmation>

Read the full file on GitHub · 72 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. 1mo ago Changed · +22 lines · +29 tokens per session 08b000dda3f9
  2. 2mo ago First seen · 50 lines · 47 tokens per session scan A 750f88d2d535

Subscribe to this mod's changes

root-cause-analysis is a skill published in the GitHub repository lsampaioweb/ai-instructions (1 stars, last pushed 5d ago), licensed MIT. It adds 76 tokens to every session and 607 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-08-31.

Related

root-cause-analysis compared with skills from other repositories

root-cause-analysis next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
root-cause-analysislsampaioweb/ai-instructionsSkill15d agoMITA76Cursor
systematic-debuggingopen-metadata/OpenMetadataSkill16kyesterdayApache-2.0A37Claude Code
log-error-digestzebbern/claude-code-guideSkill4.7k3d agoMITA71Claude Code, Codex
cwv-optimizeradobe/skillsSkill319yesterdayApache-2.0A112Claude Code
ci-fixersipyourdrink-ltd/bernsteinSkill1.2kyesterdayApache-2.0A15Claude Code, Codex
incident-response-incident-responsermyndharis/antigravity-skillsSkill1.9k23d agoMITA36Claude Code
triaging-web-analytics-supportPostHog/posthogSkill41kyesterdaynoneA151Claude Code, Codex