debug-mode

An evidence-based process for finding the real cause of a bug when ordinary inspection has not proved it. It is aimed at unresolved, flaky, environment-specific, or production-only problems.

In plain words
What is it for?
Use it to diagnose and, when requested, fix difficult software bugs. It is not needed for errors whose cause and solution are already clear from compiler, test, or lint output.
Why use it?
It reduces the risk of applying a plausible fix that only works once. The process ties the diagnosis to symptoms, reproduction steps, expected behavior, and observed evidence.

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

Made for: Claude Code, Codex.

Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,121 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.00042 $0.01121
Opus 5 $0.00021 $0.00561
Sonnet 5 $0.00008 $0.00224
Haiku 4.5 $0.00004 $0.00112

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

Security

Grade A, and why

debug-mode 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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/debug-server.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

test, a curl script, a CLI run on a fixture, a headless-browser script, a
skills/debug-mode/SKILL.md · 112 lines

How it starts

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

Debug Mode

Use the evidence loop when the root cause is not proven. Avoid plausible fixes that only pass once.

Activation boundary

Reach for this skill — including autonomously, without waiting for the user to name it — when the user explicitly says diagnose/debug, or when a normal reproduction or inspection has not revealed the cause, especially for flaky, environment-specific, or production-only bugs.

Do not enter debug-mode for a compiler/type/lint/test error whose cause is directly in the output, a review finding that already specifies both cause and fix, an already-proven root cause, or when debug-mode is already active. Never re-invoke debug-mode from inside an active debug-mode run — continue the existing evidence loop.

Respect the user's verb: a diagnose-only request ends before the Fix step and applies no code change. A debug request, or an ordinary bug report with no explicit verb, continues through the Fix step as usual — do not withhold the fix just because the task didn't separately say "fix" or "correct".

Workflow

  1. Understand. Done when symptoms, affected surface, expected behavior, actual behavior, and smallest reproduction path are known.
  2. Feedback command. Done when, where practical, one command — a failing test, a curl script, a CLI run on a fixture, a headless-browser script, a replayed trace — has been run once and shown red on this bug's exact symptom: red-capable (asserts the symptom, not "didn't crash"), deterministic, fast, runnable unattended. Tighten it before moving on — sharper assert, narrower scope, pinned time/seed; for flaky bugs raise the reproduction rate (loop the trigger, add stress) until it's debuggable. When no such command is practical (auth-walled, user-specific, production-only), say so explicitly and rely on the instrumentation branch below — don't skip silently to code-reading.
  3. Hypothesize. Done when 2-3 ranked hypotheses each name the observation that would confirm or reject it.
  4. Instrument. Done when temporary structured logs distinguish the hypotheses without leaking secrets.
  5. Reproduce. Done when the bug has been triggered and logs collected — via the feedback command when one exists. If the flow is auth-walled or user-specific, ask the user to reproduce and wait.
  6. Analyze. Done when evidence confirms one hypothesis or rejects all current hypotheses explicitly.
  7. Fix. Done when the smallest evidence-backed fix is applied, the feedback command (when one exists) has gone red → green — turned into a regression test first when a seam that exercises the real bug pattern exists — and all temporary instrumentation is removed.

Read the full file on GitHub · 112 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 112 lines · 42 tokens per session scan A 15020d5d47bb

Subscribe to this mod's changes

debug-mode is a skill published in the GitHub repository hcaiano/skills (3 stars, last pushed 11d ago), licensed MIT. It adds 42 tokens to every session and 1,121 once invoked, about $0.0002 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

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

bigquery-ai-ml

Leverages BigQuery's built-in machine learning and GenAI capabilities for advanced data analytics. Use when you need to write SQL queries that perform time-series forecasting, predict values, detect outliers or anomalies, find key drivers, perform semantic search or vector search, classify text, calculate similarity…

google/skills · 104 tokens

edge-to-edge

Use this skill to migrate your Jetpack Compose app to add adaptive edge-to-edge support and troubleshoot common issues. Use this skill to fix UI components (like buttons or lists) that are obscured by or overlapping with the navigation bar or status bar, fix IME insets, and fix system bar legibility.

android/skills · 67 tokens

twitter-reader

Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my…

himself65/finance-skills · 161 tokens

referral-program

When the user wants to design, launch, or optimize an in-app referral / invite / share-to-earn program — including reward structure, mechanics, fraud prevention, deep link setup, and viral coefficient measurement. Use when the user mentions "referral program", "invite a friend", "refer and earn", "share to earn"…

Eronred/aso-skills · 159 tokens

apple-search-ads

When the user wants to set up, optimize, or scale Apple Search Ads (ASA) campaigns — including keyword bidding, match types, campaign structure, Creative Product Sets, CPP routing, and ROAS optimization. Use when the user mentions "Apple Search Ads", "ASA", "Search Ads", "Search tab ads", "Today tab ads", "CPT"…

Eronred/aso-skills · 127 tokens