debug

A step-by-step helper for finding and fixing software problems, with checks for errors, reproduction, diagnosis, fixes, and verification.

In plain words
What is it for?
Use it to investigate reported errors, reproduce failures, isolate their causes, apply fixes, and create regression tests that help prevent repeats.
Why use it?
It gives debugging a repeatable process instead of relying on guesses when a feature, build, or runtime behaves incorrectly.

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/wellapp-ai/well/debug
Any agent
npx skills add WellApp-ai/Well --skill debug
Clone the repo
git clone --depth 1 https://github.com/WellApp-ai/Well

Made for: Claude Code, Codex.

Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,654 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00021 $0.02654
Opus 5 $0.00010 $0.01327
Sonnet 5 $0.00004 $0.00531
Haiku 4.5 $0.00002 $0.00265

Measured 2d ago against content hash 16481079f2e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

debug 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 2d 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-rules/skills/debug/SKILL.md · 499 lines

How it starts

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

Debug Skill

Diagnose and fix issues systematically. Enhanced with MCP integrations for deeper analysis and automatic regression test generation.

When to Use

  • Auto-invoked by qa-commit skill on RED verdict
  • Error messages appearing in console/terminal
  • Feature not working as expected
  • Build/runtime failures
  • "Something is broken" situations

Modes

Mode Trigger Context Provided
Auto qa-commit RED verdict Failed G#N/AC#N, error messages
Manual User invokes User describes issue

The Enhanced Flow

Phase 0: Context Loading (if auto-invoked)
    ↓
Phase 0.5: Jidoka Escalation Check ──→ [Tier 2/3] ──→ ESCALATE to human
    ↓ [Tier 1]
Phase 1: Gather (ReadLints, Browser MCP, Context7)
    ↓
Phase 2: Reproduce (Browser MCP)
    ↓
Phase 3: Isolate (Known Issues DB query)
    ↓
Phase 4: Diagnose
    ↓
Phase 5: Fix
    ↓
Phase 6: Verify ──→ [FAIL] ──→ Phase 8 ──→ Phase 0.5
    ↓ [PASS]
Phase 7: Harden (generate regression test)
    ↓
Phase 8: Update Jidoka Counters (reset on success)

Phase 0: Context Loading (Auto-Invoke Only)

When invoked from qa-commit, receive context:

## Debug Context (from qa-commit)

**Failed Criteria:**
- [G#N or AC#N]: [Description]

**Verification Report:**
- ReadLints errors: [list]
- Shell errors: [list]
- Browser errors: [list if applicable]

**Expected Behavior:**
[From QA Contract]

**Actual Behavior:**
[Observed during verification]

Skip this phase if manually invoked.


Phase 0.5: Jidoka Escalation Check (NEW)

Before attempting fix, check escalation tier to determine if human intervention is needed.

Track Error History

Maintain error_history across debug invocations:

Field Description
error_signature Hash of error type + location
count Times this exact error seen
fixes_attempted List of fix descriptions

Tier Evaluation

Tier Condition Action
Tier 1 error_count < 3 Continue to Phase 1 (normal debug)
Tier 2 error_count >= 3 (same error) ESCALATE to human
Tier 3 total_errors >= 5 (any) ESCALATE to human

Read the full file on GitHub · 499 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. 2d ago First seen · 499 lines · 21 tokens per session scan A 16481079f2e0

Subscribe to this mod's changes

debug is a skill published in the GitHub repository WellApp-ai/Well (340 stars, last pushed 25d ago), licensed MIT. It adds 21 tokens to every session and 2,654 once invoked, about $0.0001 per session on Opus 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-30.

Related

Other skills, from other repositories

auto-reader-ocr

Extract text from images/PDFs (Arabic-first, manga-aware Japanese, 13+ languages auto-detected), translate between 100+ languages, and pull structured fields from invoices/receipts/IDs via the Auto-Reader OCR API. Use when the user shares a document image or PDF to read, translate, or extract data from — or asks for…

Samqra/auto-reader-ocr · 101 tokens

nextjs-pages-router

Set up tRPC in Next.js Pages Router with createNextApiHandler, createTRPCNext, withTRPC HOC, SSR via ssr option and ssrPrepass, SSG via createServerSideHelpers with getStaticProps, and server-side helpers for getServerSideProps prefetching.

trpc/trpc · 67 tokens

non-json-content-types

Handle FormData, file uploads, Blob, Uint8Array, and ReadableStream inputs in tRPC mutations. Use octetInputParser from @trpc/server/http for binary data. Route non-JSON requests with splitLink and isNonJsonSerializable() from @trpc/client. FormData and binary inputs only work with mutations (POST).

trpc/trpc · 75 tokens

scalar-docs

Skill for writing and updating scalar.config.json — Scalar Docs configuration reference for users and LLMs.

scalar/scalar · 24 tokens

release-notes

Generate GitHub release notes for the Membrane api-gateway repo by collecting the commits between the last release and master, grouping them into Features / Improvements / Fixes / Security / Dependencies, and linking each to its PR. Use whenever the user wants to draft, extract, or write release notes / a changelog /…

membrane/api-gateway · 124 tokens

smoke-test

Run smoke tests against a deployed or local app based on your git diff. Each test uses Skyvern browser tools (navigate, act, validate, screenshot) with Chrome DevTools MCP as fallback. Posts screenshot evidence as PR comments.

Skyvern-AI/skyvern · 50 tokens