agentleFS
mannobeatsmannobeats/hyper-taste/skills/debug/SKILL.md

debug

Skill1 starsChanged 4 days agoMITView on GitHub

Find and fix the root cause of a bug, a failing test, a broken build or unexpected behavior, with a test that proves it stays fixed. Use when something errors, crashes, hangs, regresses, behaves differently than expected, or "worked yesterday".

191 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use add-discord, add-slack and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    add-discord

    Add Discord bot channel integration via Chat SDK.

    Also in 11 projects that use this

  • MicrosoftSkill

    add-slack

    Add Slack channel integration via Chat SDK.

    Also in 11 projects that use this

  • +10 more from microsoft

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 8 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 176 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Stop changing code. Write the exact steps, input and environment that show the bug, and make it happen on demand: a failing test, a script, …

    line 14
  2. Distinctive:

    Read the whole error and the first one first.

    line 20
  3. Distinctive:

    Read the stack trace to the line in your code, then read that code and its callers.

    line 21
  4. Distinctive:

    Check what changed: git log, git diff, dependency updates, config, data.

    line 22
  5. Distinctive:

    Ask "why" until you reach a cause that, fixed, makes the symptom impossible, not just unlikely.

    line 32
  6. Distinctive:

    Write the test that reproduces the bug.

    line 37
  7. Distinctive:

    Remove debug logging and experiments.

    line 41
  8. Distinctive:

    If the bug came from a pattern, check the codebase for other instances of it.

    line 45
  9. Very specific:

    When the project keeps a fix log (docs/FIXLOG.md), add: symptom, cause, fix, and a last line Rule: <what to always or never do>.

    line 46

“Common” is measured: kept by at least 6 in 10 of the 176 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Debug

The outcome: the real cause is found and fixed once, where every caller benefits, with a test that failed before the fix and passes after. Not a symptom patched in the one place the report named.

1. Stop and reproduce

Stop changing code. Write the exact steps, input and environment that show the bug, and make it happen on demand: a failing test, a script, or a command. A bug you can't reproduce, you can't prove fixed. If it only happens sometimes, find what makes it happen more (load, timing, data).

2. Read the evidence

  • Read the whole error and the first one first; later errors often come from it.
  • Read the stack trace to the line in your code, then read that code and its callers.
  • Check what changed: git log, git diff, dependency updates, config, data. When it worked yesterday, git bisect finds the commit.
  • Logs, network requests, the database state. Add logging where you lack evidence, and remove it after.

3. Find the cause

  • Form one hypothesis at a time and test it with the smallest experiment that can prove it wrong. Write down what you ruled out.
  • Narrow the space: halve the input, the code path or the history until the cause is isolated.
  • Ask "why" until you reach a cause that, fixed, makes the symptom impossible, not just unlikely.
  • Grep every caller of the function you suspect. The same bug often lives in sibling paths.

4. Fix it once

  • Write the test that reproduces the bug. It fails.
  • Fix the cause in the shared code, so every caller benefits. Keep the fix as small as it can be while being complete.
  • The test passes, and so does the whole relevant suite.
  • Remove debug logging and experiments.

5. Guard it

  • If the bug came from a pattern, check the codebase for other instances of it.
  • When the project keeps a fix log (docs/FIXLOG.md), add: symptom, cause, fix, and a last line Rule: <what to always or never do>. A rule that applies to every agent goes in AGENTS.md.

Never

  • Change code at random until the symptom goes away.
  • Silence the error: an empty catch, a suppression comment, a skipped test, a retry around a bug.
  • Loosen a test or a constraint to make it pass.
  • Declare it fixed without running the reproduction again.

Done when

The cause is named in one sentence, the fix is in the shared code, a test that failed before now passes, the full suite passes, and the original steps no longer show the bug.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.