debugging

A method for finding the real cause of software defects and failures using observations and repeatable tests.

In plain words
What is it for?
Use it to investigate failing tests, incorrect output, intermittent bugs, production incidents, and regressions with an unknown cause.
Why use it?
It prevents premature fixes by requiring the problem to be reproduced, narrowed down, and proven before declaring it solved.

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/avmnu-sng/sutra/debugging
Any agent
npx skills add avmnu-sng/sutra --skill debugging
Clone the repo
git clone --depth 1 https://github.com/avmnu-sng/sutra

Made for: Claude Code, Codex.

Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,187 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.00045 $0.02187
Opus 5 $0.00023 $0.01094
Sonnet 5 $0.00009 $0.00437
Haiku 4.5 $0.00005 $0.00219

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

Security

Grade A, and why

debugging 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.

plugins/sutra/skills/debugging/SKILL.md · 203 lines

How it starts

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

Debugging

Find the defect by evidence, not by intuition. A bug is a gap between what the code does and what you believe it does; debugging is the disciplined closing of that gap. Trace before you theorize -- read the actual behavior first, and let every step be driven by an observation you can point at, never by a hunch about which layer "feels wrong."

Work the steps in order. The order is load-bearing: reproduce before you change anything, localize before you explain the mechanism, and prove causation before you declare victory.

When to use / When not to

  • Use when a test is red for an unknown reason, a system is misbehaving in production, output is wrong, something is intermittent, or a change broke something and you do not yet know what.
  • Do not use for known, mechanical fixes (a typo, a clear null check a reviewer already pointed at) where there is no isolation work to do. This is for defects whose cause is not yet established.

0. If it is on fire, stop the bleeding first

A live production incident is not a debugging session. A running system serving users is not a debugger -- you cannot single-step it, and every minute spent root-causing is a minute of user-facing damage. Contain first, investigate after.

Contain. Reach for the fastest reversible lever that stops the harm:

  • Roll back to the last known-good release.
  • Flip the feature flag off for the broken path.
  • Divert or shed traffic (drain the bad instance, fail over, rate-limit).
  • Disable the offending job, consumer, or integration.

Pick the lever with the smallest blast radius that actually stops the bleeding. Rollback is usually safest because it is reversible and well-understood; a forward "quick fix" pushed under pressure is itself an unreviewed change.

Preserve evidence before you wipe state. Capture logs, a stack trace, the current config, and a snapshot of the bad state before the rollback erases it. You still have to root-cause afterward, and the incident is your best reproduction.

Read the full file on GitHub · 203 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 · 203 lines · 45 tokens per session scan A 23f84f84fcc3

Subscribe to this mod's changes

debugging is a skill published in the GitHub repository avmnu-sng/sutra (2 stars, last pushed 1mo ago), licensed MIT. It adds 45 tokens to every session and 2,187 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

rulesync

Generates and syncs AI rule configuration files (.cursorrules, CLAUDE.md, copilot-instructions.md) across 20+ coding tools from a single source. Use when syncing AI rules, running rulesync commands, importing or generating rule files, or managing shared AI coding configurations.

dyoshikawa/rulesync · 64 tokens

establishing-project-context

Use when the user asks to establish shared project language, or project work exposes a conflicting, renamed, or deprecated domain term that needs active semantic modeling. Routine small tasks stay on the fast path.

GanyuanRan/Aegis · 45 tokens

autoprompt

Explicit-only useful-first orchestration. Invoke /autoprompt to turn a mission into one executable roadmap, build dependency-safe lanes, and verify the result with independent reviewers. Never infer invocation from ordinary requests. Never resume from leftover artifacts without an explicit resume instruction.

Spielewoy/autoprompt-skill · 56 tokens

memstack-business-gdpr

Use this skill when the user says 'GDPR', 'data protection', 'privacy compliance', 'DPA', 'DSAR', 'data subject request', 'cookie consent', 'privacy audit', 'CCPA', or asks 'do I need GDPR for this repo'. Scans the repository to detect what personal data is collected, classifies sensitivity, determines whether GDPR…

cwinvestments/memstack · 121 tokens

echo

Use when the user references past sessions, asks 'what did we do', 'do you remember', 'last session', 'recall', or 'continue from'.

cwinvestments/memstack · 35 tokens

backend-builder

Используй только внутри активного Codex Project Autopilot-проекта по утверждённому плану; не включай для обычных backend-задач вне автопилота.

hashgraph-online/awesome-codex-plugins · 43 tokens