root-cause

A debugging process that identifies the cause of a failure before changing code.

In plain words
What is it for?
It helps investigate bugs, errors, and regressions by reproducing them, testing possible causes, applying a targeted fix, and rerunning the check.
Why use it?
It replaces guesswork with a repeatable failing test or reproduction, evidence from logs or tools, and verification that the fix resolves the original problem.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/missingpackage/nightshift/root-cause
Any agent
npx skills add MissingPackage/nightshift --skill root-cause
Clone the repo
git clone --depth 1 https://github.com/MissingPackage/nightshift

Made for: Claude Code, Codex.

Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 825 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00068 $0.00825
Opus 5 $0.00034 $0.00413
Sonnet 5 $0.00014 $0.00165
Haiku 4.5 $0.00007 $0.00082

Measured yesterday against content hash 307a8e20e825, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

root-cause scanned grade A with 1 finding 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 yesterday.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

2. **Collect observations yourself.** Logs, `curl`, `kubectl logs/exec`, DB queries, playwright, re-running the failing command, reading the SDK source in `.venv`. Ask the user to observe only what genuinely requires a h
skills/root-cause/SKILL.md · 49 lines

How it starts

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

Root Cause Before Fixes

Overview

A fix without a named cause is a bet placed with the user's time. This contract exists because symptom-patching cost real projects days (a voice-pipeline saga: same bug "fixed" five times; a CMS integration: the same console error re-pasted four times in ten minutes).

Core principle: no edit until you can say "the failure happens because X, and here is the evidence."

Loop first (2026-08-12): for any non-trivial bug, the first artifact is the feedback loop, not the hypothesis — a tight pass/fail reproduction that goes red on THIS bug, then minimized. With that loop in hand the cause will be found; without it, hypotheses are bets. The fix is verified by re-running the loop (inside a goal, the verifier re-runs it too — the repro outlives the session).

The contract

  1. State the hypothesis and its evidence. One sentence each. If you have no evidence, name the observation that would discriminate between candidate causes — then go collect it.
  2. Collect observations yourself. Logs, curl, kubectl logs/exec, DB queries, playwright, re-running the failing command, reading the SDK source in .venv. Ask the user to observe only what genuinely requires a human (audio quality, physical devices).
  3. Framework/SDK suspected → current docs first. Read the library's current documentation (context7 / dedicated MCP / --help) before archaeology in your own code. Version-check: the installed version, not your memory of the API.
  4. Cause unknown → one change at a time. Verify each change against the original reproduction before the next. Batched speculative changes destroy attribution ("troppe variabili in gioco" = this rule was skipped).
  5. Declare the verification. After the fix: how you re-ran the original failure and what you observed. If you could not re-verify, say so explicitly — never imply a fix is confirmed.

Red flags — STOP, you are symptom-patching

  • You are about to edit code and cannot complete: "it fails because ___, shown by ___".
  • Your explanation contains "probably" / "should" with no observation behind it.
  • You are asking the user to reload/re-test/paste something a tool of yours can observe.
  • This is the second fix attempt for the same symptom.
  • You are adding a guard/retry/try-except around the place where the error appears.

Read the full file on GitHub · 49 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. yesterday First seen · 49 lines · 68 tokens per session scan A 307a8e20e825

Subscribe to this mod's changes

root-cause is a skill published in the GitHub repository MissingPackage/nightshift (2 stars, last pushed 16d ago), licensed MIT. It adds 68 tokens to every session and 825 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

baton-setup

One-time setup and health check for fable-baton. Use when the user asks to set up, configure, verify, or troubleshoot fable-baton - sets the default model to "best" (Fable 5 with Opus fallback) in /.claude/settings.json and verifies the plugin is fully installed.

realgarit/fable-baton · 69 tokens

licensing-tiers-data-governance

Implement subscription tiers with field-level access control, feature gating, rate limiting, and compliance tracking. Design data governance systems that enforce different access levels, retention policies, and regulatory requirements based on user subscription tier (Free, Pro, Enterprise).

sunnypatneedi/claude-starter-kit · 56 tokens

data-infrastructure-at-scale

Build data infrastructure that scales from prototype to production. Use when architecting data pipelines, choosing data stores, planning for high throughput, or migrating to distributed systems. Covers caching, replication, sharding, message queues, and data lake architecture.

sunnypatneedi/claude-starter-kit · 56 tokens

data-provenance

Track data lineage and provenance from source to consumption. Use when auditing data flows, debugging data quality issues, ensuring compliance (GDPR, SOX), or understanding data dependencies. Covers lineage tracking, impact analysis, data catalogs, and metadata management.

sunnypatneedi/claude-starter-kit · 56 tokens

multi-source-data-conflation

Merge and reconcile data from multiple sources into a unified view. Use when integrating APIs, consolidating databases, building data warehouses, or creating master data. Covers entity resolution, conflict resolution, data quality, and real-time vs batch conflation.

sunnypatneedi/claude-starter-kit · 57 tokens

software-architecture

Design scalable software systems with proven architectural patterns (MVC, microservices, event-driven), SOLID principles, system design trade-offs, and architectural decision records (ADRs).

sunnypatneedi/claude-starter-kit · 38 tokens