Debug logo

Debug

Community
mcouthon
debug

Systematic debugging with hypothesis-driven investigation. Use when something is broken, tests are failing, unexpected behavior occurs, or errors need investigation. Triggers on: 'this is broken', 'debug', 'why is this failing', 'unexpected error', 'not working', 'bug', 'fix this issue', 'investigate', 'tests failing', 'trace the error', 'use debug mode'. Full access mode - can run commands, add logging, and fix issues.

Overview

Publishermcouthon
Repositoryagents
Skill namedebug
Stars
79
Forks
11
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by mcouthon on GitHub. Read the source before you install it.

Installation

Install the Debug AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mcouthon/agents.git /tmp/agents
mkdir -p .claude/skills
cp -r /tmp/agents/generated/claude/skills/debug .claude/skills/debug
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Debug in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Debug on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Debug is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Debug Mode

Systematic bug investigation and resolution.

Core Approach

"Don't guess. Form hypotheses. Test them."

The 4-Phase Process

Phase 1: Assessment 🔍

Goal: Understand and reproduce

  • What is the expected behavior?
  • What is the actual behavior?
  • Can you reliably reproduce?
  • What changed recently?

Key Questions:

  • When did this start happening?
  • Does it happen consistently or intermittently?
  • What are the exact inputs that trigger it?
  • What error messages or symptoms appear?
Building a Feedback Loop

This is the most important step. If you have a fast, deterministic, agent-runnable pass/fail signal, you will find the cause. If you don't, no amount of code-staring will save you. Spend disproportionate effort here.

Techniques — try in roughly this order:

  1. Failing test at whatever seam reaches the bug (unit, integration, e2e)
  2. Curl / HTTP script against a running dev server
  3. CLI invocation with fixture input, diffing stdout against known-good output
  4. Headless browser script (Playwright/Puppeteer) — drives UI, asserts on DOM/console
  5. Replay captured trace — save a real request/payload to disk, replay through the code path
  6. Throwaway harness — minimal subset of system that exercises the bug path
  7. Property/fuzz loop — if "sometimes wrong output", run 1000 random inputs
  8. Bisection harness — automate git bisect run between known-good and known-bad
  9. Differential loop — run same input through old vs new version, diff outputs

Iterate on the loop: Can you make it faster? Sharper signal? More deterministic?

If you cannot build a loop: Stop and say so. List what you tried. Ask for: captured artifacts (logs, HAR file), environment access, or permission to add temporary instrumentation.

Phase 2: Investigation 🔬

Goal: Isolate and trace

  • Trace execution from entry point
  • Identify where expected diverges from actual
  • Form hypotheses about root cause
  • Test hypotheses systematically

Techniques:

  • Add strategic logging/prints
  • Use debugger breakpoints
  • Simplify inputs to minimal reproduction
  • Check boundary conditions

Phase 3: Resolution 🔧

Goal: Fix minimally and verify

  • Implement the smallest fix that addresses root cause
  • Don't fix symptoms, fix the disease
  • Add regression test
  • Verify fix doesn't break other things

If fix doesn't work:

  • Count: How many fixes attempted?
  • If < 3: Return to Phase 1, re-analyze with new information
  • If ≥ 3: STOP. Question your understanding of the system.

Phase 4: Quality ✅

Goal: Prevent recurrence

  • Add test covering the bug
  • Document if the cause was non-obvious
  • Consider if similar bugs exist elsewhere
  • Clean up debug code

Debugging Checklist

markdown
- [ ] **Reproduced**: Can trigger bug consistently
- [ ] **Isolated**: Know which component is failing
- [ ] **Root Cause**: Understand WHY it fails
- [ ] **Fixed**: Minimal change addresses cause
- [ ] **Tested**: Regression test added
- [ ] **Clean**: Debug code removed

Hypothesis Template

For each hypothesis, record: Hypothesis (what's wrong) → Test (how to verify) → ResultConclusion (confirmed/rejected/needs more info).

Common Root Causes

SymptomOften Caused By
Works locally, fails in CIEnvironment differences, missing deps
Intermittent failureRace condition, timing, external dependency
Wrong outputLogic error, wrong variable, off-by-one
Crash/exceptionNull/None access, type mismatch, missing data
Performance issueN+1 queries, missing index, memory leak

Rationalization Prevention

ExcuseRealityRequired Action
"The fix is obvious"Obvious fixes mask root causesForm a hypothesis and verify before changing code
"It's probably X""Probably" isn't evidenceTest the hypothesis — name it, design a test, run it
"This is too simple to debug formally"Simple bugs waste the most time undiagnosedFollow Phase 1 — reproduce, isolate, then fix
"Logs look clean"You didn't add targeted loggingAdd debug logging at the suspected point
"I've tried 3 things, might as well try a 4th"Stacking guesses compounds confusionSTOP. Return to Phase 1. Re-analyze with new info
"It works now"If you don't know why, it will break againExplain WHY it works and what changed

Red Flags - STOP and Re-Assess

If you catch yourself skipping reproduction ("I know what's wrong") or testing multiple hypotheses at once — STOP. Return to Phase 1.

Debug Report Format

markdown
## Debug Report

### Bug Summary

- **Expected**: [what should happen]
- **Actual**: [what happens instead]
- **Severity**: [critical/high/medium/low]

### Reproduction

1. [Step to reproduce]
2. [Step to reproduce]
3. [Observe bug]

**Minimal reproduction**: [simplest case that triggers bug]

### Investigation

| Hypothesis | Test           | Result                     |
| ---------- | -------------- | -------------------------- |
| [theory]   | [what I tried] | ✅ Confirmed / ❌ Rejected |

### Root Cause

[What's actually wrong and why]

### Fix Applied

- **File**: `path/to/file.py`
- **Change**: [what was modified]
- **Why**: [how this fixes the root cause]

### Verification

- [ ] Bug no longer reproduces
- [ ] Existing tests pass
- [ ] Regression test added: `test_name`
- [ ] No debug code left behind

### Prevention

[How to prevent similar bugs in the future]

Frequently asked questions

What does the Debug AI skill do?

Systematic debugging with hypothesis-driven investigation. Use when something is broken, tests are failing, unexpected behavior occurs, or errors need investigation. Triggers on: 'this is broken', 'debug', 'why is this failing', 'unexpected error', 'not working', 'bug', 'fix this issue', 'investigate', 'tests failing', 'trace the error', 'use debug mode'. Full access mode - can run commands, add logging, and fix issues.

Why use Debug on TypingMind?

Because you install it once and use it with any model. Debug is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Debug in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/mcouthon/agents/tree/main/generated/claude/skills/debug. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Debug?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Debug?

As many as you like. As long as a model supports skills, you can use Debug with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Debug AI skill free?

Yes. It is published on GitHub by mcouthon under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇