debugging-mindset

debugging-mindset is a skill for Claude Code, Codex from jamestorrevillas/dev-skills. It costs 62 tokens per session (1,383 once invoked), scanned A, original, MIT.

A method for investigating software problems by checking what actually happened, testing possible causes, fixing the underlying cause, and verifying the result. It also treats missing regression tests as part of the problem.

In plain words
What is it for?
It is for debugging code, diagnosing failures, investigating crashes, and troubleshooting behavior that does not match expectations. It helps identify evidence, reproduce problems, test hypotheses, and prevent repeat bugs.
Why use it?
It reduces guesswork when errors or unexpected behavior occur by giving the investigation a repeatable sequence.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/jamestorrevillas/dev-skills/debugging-mindset.svg)](https://agentmods.dev/skills/jamestorrevillas/dev-skills/debugging-mindset)
Your own site
<a href="https://agentmods.dev/skills/jamestorrevillas/dev-skills/debugging-mindset"><img src="https://agentmods.dev/badge/skills/jamestorrevillas/dev-skills/debugging-mindset.svg" alt="Measured on agentmods" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,383 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.00062 $0.01383
Opus 5 $0.00031 $0.00691
Sonnet 5 $0.00012 $0.00277
Haiku 4.5 $0.00006 $0.00138

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

Security

Grade A, and why

debugging-mindset 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 3d 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.

.github/skills/debugging-mindset/SKILL.md · 164 lines

How it starts

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

Debugging Mindset

Core Principle

Debug the system, not your assumptions.

Most bugs persist because developers debug what they think is happening instead of what's actually happening. Every assumption is a potential hiding place for a bug.


The Scientific Debugging Method

1. OBSERVE     — What exactly is the symptom? (not interpretation, raw facts)
2. HYPOTHESIZE — What are the possible causes?
3. TEST        — Design the smallest possible test to confirm/deny each hypothesis
4. CONCLUDE    — What does the evidence tell you?
5. FIX         — Address the root cause, not the symptom
6. VERIFY      — Confirm the fix works and nothing else broke
7. PREVENT     — Add a test that would catch this regression

Never skip step 7. Every bug is a test that doesn't exist yet.


Start Here: The Five Questions

Before writing a single line of debug code, answer these:

  1. What did I expect to happen?
  2. What actually happened? (exact error message, exact output)
  3. What changed recently? (last commit, dependency update, config change)
  4. Can I reproduce it reliably? (if not, it might be timing/state/environment)
  5. Is this the first time this happened? (regression vs new bug)

Answering these five questions often reveals the bug before you even look at code.


Divide and Conquer

For complex bugs in large codebases:

1. Identify the full path of execution involved
2. Pick the midpoint
3. Add a check there — does the data look correct?
4. If yes → bug is in second half. If no → bug is in first half.
5. Repeat until you've narrowed to a single function or line.

This is binary search for bugs. Cuts debugging time in half at each step.


Read the Error Message (Actually Read It)

Most developers skim error messages. Read them:

  • What failed (error type)
  • Where it failed (file, line, function name)
  • Why it failed (message body)
  • Stack trace — read bottom-up to find your code vs framework code

Read the full file on GitHub · 164 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. 3d ago First seen · 164 lines · 0 tokens per session scan A 35349e2a3157

Subscribe to this mod's changes

debugging-mindset is a skill published in the GitHub repository jamestorrevillas/dev-skills (3 stars, last pushed 5mo ago), licensed MIT. It adds 62 tokens to every session and 1,383 once invoked, about $0.0003 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

jira-cli

Interact with Jira from the command line to create, list, view, edit, and transition issues, manage sprints and epics, and perform common Jira workflows. Use when the user asks about Jira tasks, tickets, issues, sprints, or needs to manage project work items.

Code-and-Sorts/awesome-copilot-agents · 60 tokens

azure-prices

Look up and compare Azure service pricing using the Azure Retail Prices API. Use this skill whenever the user asks about Azure costs, pricing, rates, or wants to compare prices across regions or services — even if they don't say "pricing" explicitly. Trigger for questions like "how much does a D2 v2 VM cost?"…

Code-and-Sorts/awesome-copilot-agents · 90 tokens

calculator

Performs arbitrary-precision arithmetic calculations including addition, subtraction, multiplication, division, and exponents. Use when the user asks to calculate, compute, or evaluate math expressions, or when precise decimal arithmetic is needed to avoid floating-point errors.

Code-and-Sorts/awesome-copilot-agents · 50 tokens

academic-paper-drafting

End-to-end academic paper drafting for CHI, HBR, journals, and conferences with venue-specific templates, drafting workflows, and revision strategies.

fabioc-aloha/Alex_Skill_Mall · 34 tokens

research-first-development

Build knowledge bases that build software — research before code, teach before execute.

fabioc-aloha/Alex_Skill_Mall · 18 tokens

agent-governance

Patterns for adding safety, trust, and policy enforcement to AI agent systems -- control which tools agents can call, what content they process, and maintain accountability through audit trails.

fabioc-aloha/Alex_Skill_Mall · 39 tokens