Debugging logo

Debugging

Community
andreaswasita
debugging

Systematic root-cause investigation for hard bugs.

Overview

Publisherandreaswasita
Repositorycopilot-agents-dojo
Skill namedebugging
Stars
54
Forks
15
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 andreaswasita on GitHub. Read the source before you install it.

Installation

Install the Debugging 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.
    https://github.com/andreaswasita/copilot-agents-dojo/tree/main/skills/debugging
  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/andreaswasita/copilot-agents-dojo.git /tmp/copilot-agents-dojo
mkdir -p .claude/skills
cp -r /tmp/copilot-agents-dojo/skills/debugging .claude/skills/debugging
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Debugging 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 Debugging 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 Debugging 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.

Debugging Skill

Investigates hard or non-obvious bugs by gathering evidence, forming a hypothesis, and narrowing the search space — never by guessing or shotgun-changing code. Complements autonomous-bug-fix with deeper diagnostic technique. Does NOT replace running the failing test and reading the actual error.

When to Use

  • The cause of a bug is not immediately obvious.
  • Intermittent or hard-to-reproduce failures.
  • Bugs spanning multiple components or layers.
  • Standard approaches ("read the error, fix the obvious") have failed.
  • Performance regressions, memory leaks, race conditions.
  • NOT when the failing test message already states the problem — just fix it.

Prerequisites

  • Ability to reproduce the failure (or evidence captured from production).
  • The view, grep, glob, and powershell Copilot tools.
  • git for history and bisect.
  • A test or repro script that exhibits the bug.

How to Run

text
1. Reproduce the failure. Capture the exact error and stack.
2. Gather evidence: recent commits, environment, inputs, logs.
3. Form ONE hypothesis based on evidence.
4. Test the hypothesis with the cheapest technique that disproves it.
5. Narrow the layer, then the line.
6. Write a regression test BEFORE the fix.
7. Fix the root cause, not the symptom.

Quick Reference

TechniqueUse when
git bisectBug appeared recently, clean commit history
Print / log tracingNeed to see execution flow
Minimal reproComplex system, need to isolate the variable
Breakpoint debuggingNeed to inspect state at a specific point
Diff analysis (git log, git diff)"It worked before" — something changed
Input shrinkingTest with smaller inputs until the failure stops
Bug shapeFirst place to look
Race conditionShared mutable state, missing await, missing lock
Memory leakGrowing collections, unclosed resources, retained refs
PerformanceDatabase (N+1, missing index), network (uncached calls)
IntermittentTiming, external dependencies, ordering assumptions

Procedure

Step 1: Reproduce

Capture the exact failing command and full error output via the powershell tool. If you cannot reproduce locally, debugging is guessing. Stop and build a repro first.

Step 2: Gather Evidence

Inspect:

  • Recent commits with git log --oneline -10.
  • The diff of any commit touching the failing path.
  • The full stack trace, including the "caused by" chain.
  • Environment differences if it works elsewhere.

Use view to read the offending code path. Use grep to locate related call sites.

Step 3: Form a Hypothesis

Based on evidence — not intuition — write down a single hypothesis:

"The cache is stale because invalidation runs before the write completes."

If you cannot articulate a hypothesis, you do not have enough evidence yet. Gather more.

Step 4: Disprove It Cheaply

Choose the cheapest technique that would falsify the hypothesis:

  • Add one print/log at the suspected divergence point.
  • Run git bisect if a recent commit is suspect.
  • Construct a minimal repro that isolates the variable.

Step 5: Narrow Layer → Line

Walk the request through the system:

text
Input → Layer A → Layer B → Layer C → Output

At each boundary, check: correct input in? correct output out? The bug lives at the boundary where correct input produces incorrect output.

Step 6: Regression Test First, Then Fix

Before changing code:

  1. Write a test that reproduces the bug. It must fail.
  2. Implement the fix.
  3. Run the test. It must pass.
  4. Run the full suite. No regressions.
  5. Search the codebase with grep for the same anti-pattern elsewhere.

Step 7: Log the Lesson

If the technique was non-obvious, append to tasks/lessons.md:

yaml
- date: 2026-05-19
  error_type: stale-cache
  trigger: "Test passed alone, failed in suite"
  root_cause: "Cache invalidated before write committed"
  fix: "Made invalidation await the write"
  rule: "All cache invalidations follow the source mutation, not lead it"

Pitfalls

  • DO NOT shotgun-change code hoping something sticks.
  • DO NOT skip the reproduction step. You cannot fix what you cannot see.
  • DO NOT blame the framework first. It is almost always your code.
  • DO NOT debug in production when local reproduction is possible.
  • DO NOT ship a fix you cannot explain. If you cannot articulate why it works, you have patched a symptom.

Verification

  • Failure was reproduced locally before any code change.
  • A regression test exists and failed prior to the fix.
  • The regression test now passes.
  • The full test suite is green.
  • The root cause is written down (commit message or tasks/lessons.md).

Frequently asked questions

What does the Debugging AI skill do?

Systematic root-cause investigation for hard bugs.

Why use Debugging on TypingMind?

Because you install it once and use it with any model. Debugging 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 Debugging in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/andreaswasita/copilot-agents-dojo/tree/main/skills/debugging. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Debugging?

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 Debugging?

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

Is the Debugging AI skill free?

Yes. It is published on GitHub by andreaswasita 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 👇