debugging-mastery

debugging-mastery is a skill for Claude Code, Codex from cosmicstack-labs/mercury-agent-skills. It costs 19 tokens per session (4,087 once invoked), scanned A, original, MIT.

A structured method for finding and fixing software bugs through reproduction, isolation, root-cause analysis, and logging.

In plain words
What is it for?
Reproducing bugs, narrowing their source, choosing useful diagnostic logs, identifying root causes, and planning lasting fixes.
Why use it?
It replaces guesswork with a repeatable investigation, reducing the risk of fixing only a symptom and leaving the underlying 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/cosmicstack-labs/mercury-agent-skills/debugging-mastery
Any agent
npx skills add cosmicstack-labs/mercury-agent-skills --skill debugging-mastery
Clone the repo
git clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/cosmicstack-labs/mercury-agent-skills/debugging-mastery.svg)](https://agentmods.dev/skills/cosmicstack-labs/mercury-agent-skills/debugging-mastery)
Your own site
<a href="https://agentmods.dev/skills/cosmicstack-labs/mercury-agent-skills/debugging-mastery"><img src="https://agentmods.dev/badge/skills/cosmicstack-labs/mercury-agent-skills/debugging-mastery.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,087 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.1 $0.00019 $0.04087
Opus 5 $0.00010 $0.02044
Sonnet 5 $0.00004 $0.00817
Haiku 4.5 $0.00002 $0.00409

Measured 6d ago against content hash 9385aeed5488, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

debugging-mastery 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 6d 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.

Makes network callslowCapability

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

# 3. Reproduce with curl
categories/development/debugging-mastery/SKILL.md · 533 lines

How it starts

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

Debugging Mastery

A structured approach to finding and fixing bugs systematically — from initial symptom to permanent resolution.

Core Principles

1. Understand Before You Fix

The biggest debugging mistake is applying a fix before understanding the root cause. Correlation is not causation. Always prove you understand why a bug happens before changing code.

2. Isolate Before You Investigate

Narrow the search space. A bug that manifests in 100 lines is harder to find than one isolated to 10 lines. Binary search the code, the data, and the environment.

3. Fix the Root Cause, Not the Symptom

Patching symptoms creates technical debt. Firefighting is necessary, but it should always be followed by a permanent fix that addresses the underlying systemic issue.

4. Make It Reproducible First

If you can't reproduce a bug reliably, you can't fix it. Invest in reproduction before investigation. A failing test is worth a thousand log statements.


Debugging Maturity Model

Level Approach Tools Prevention
1: Reactive Random printf guessing console.log, print statements No prevention
2: Basic Incremental investigation Logging, basic breakpoints Some error handling
3: Structured Scientific method applied Debugger, log levels, metrics Unit tests for found bugs
4: Systematic Root cause analysis documented Distributed tracing, profilers Regression tests for all bugs
5: Proactive Predictive monitoring Observability platform, chaos engineering Automated anomaly detection

Target: Level 3+ for individual developers. Level 4+ for teams.


Actionable Guidance

The Scientific Method of Debugging

┌─────────────┐     ┌──────────────┐     ┌──────────────┐     ┌─────────────┐     ┌──────────────┐
│   Observe   │ ──► │  Hypothesize │ ──► │   Predict   │ ──► │  Experiment │ ──► │  Conclude   │
│  Symptom    │     │  Root Cause  │     │  Outcome     │     │  Test Fix   │     │  Verified?  │
└─────────────┘     └──────────────┘     └──────────────┘     └─────────────┘     └──────────────┘

Read the full file on GitHub · 533 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. 6d ago First seen · 533 lines · 19 tokens per session scan A 9385aeed5488

Subscribe to this mod's changes

debugging-mastery is a skill published in the GitHub repository cosmicstack-labs/mercury-agent-skills (471 stars, last pushed 11d ago), licensed MIT. It adds 19 tokens to every session and 4,087 once invoked, about $0.0001 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-30.

Related

Other skills, from other repositories

modern-saas-builder

Founder-minded senior product engineer and SaaS architect skill. Use when building, planning, architecting, validating, designing, testing, securing, deploying, or monetizing modern SaaS products, micro-SaaS, web apps, AI agents, Web3/Base applications, agent commerce, or Telegram bots/Mini Apps. Always active when…

lijnati/modern-saas-builder-skills · 98 tokens

claude-md-improver

Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix CLAUDE.md files. Scans for all CLAUDE.md files, evaluates quality against templates, outputs quality report, then makes targeted updates. Also use when the user mentions "CLAUDE.md maintenance" or "project…

anthropics/claude-plugins-official · 82 tokens

gke-reliability

Improves GKE workload reliability, using PDBs, health probes, and topology spread constraints. Use when configuring GKE workload reliability, setting up PDBs, or configuring GKE health probes (liveness, readiness, startup). Don't use for disaster recovery setup or full cluster backups (use gke-backup-dr instead).

google/skills · 73 tokens

gke-workload-security

Audits, configures, and hardens workload-level security controls for Google Kubernetes Engine (GKE) applications and namespaces. Covers running cluster security audits (auditcluster.sh), configuring Workload Identity Federation (impersonation, KSA/GSA binding, and pod setup), enforcing Network Policies (default-deny…

google/skills · 181 tokens

agent-platform-model-registry

Agent Platform Model Registry Management. Use when you need to upload, list, describe, update, or delete machine learning models (and their versions) in the Agent Platform Model Registry. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform models.

google/skills · 60 tokens

atlas-obscura

Search Atlas Obscura for weird, wonderful, and hidden gem places near any destination. Find the interesting stuff, not boring plaques. Search by coordinates, get full details with descriptions and images.

borski/travel-hacking-toolkit · 44 tokens