agentleFS
futureteafuturetea/tea-stack/skills/debug/SKILL.md

debug

Skill5 starsChanged 3 days agoMITView on GitHub

Use when diagnosing bugs, flaky behavior, or failing tests. Runs a scientific loop: reproduce, hypothesize, isolate, and apply a minimal root-cause fix.

190 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use update-nanoclaw, add-atomic-chat-tool 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

    update-nanoclaw

    Efficiently bring upstream NanoClaw updates into a customized install, with preview, selective cherry-pick, and low token usage.

    Also in 9 projects that use this

  • MicrosoftSkill

    add-atomic-chat-tool

    Add Atomic Chat MCP server so the container agent can call local models served by the Atomic Chat desktop app via its OpenAI-compatible API.

    Also in 8 projects that use this

  • +10 more from microsoft

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 8 are distinctive, and 0 are 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.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the bug cannot be reproduced yet, identify the missing state or environment factor before changing production code.

    line 15
  2. Distinctive:

    Test one hypothesis at a time (inspect call chains, check actual runtime state, run targeted tests, or add temporary minimal probes).

    line 22
  3. Distinctive:

    Keep track of ruled-out hypotheses and why they were eliminated so you do not loop in circles.

    line 23
  4. Distinctive:

    If two consecutive experiments contradict your mental model, pause and challenge base assumptions (wrong branch, stale build/cache, ignored …

    line 24
  5. Distinctive:

    Check whether the same module contains sibling instances violating the same invariant.

    line 28
  6. Distinctive:

    Remove all temporary debug logs or probes.

    line 29
  7. Distinctive:

    Add or update an automated test that fails before the fix and passes after.

    line 33
  8. Distinctive:

    Run the relevant test suite and build/lint checks to verify no regressions.

    line 34

“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

Diagnose bugs, unexpected behavior, and failing tests systematically. Never guess-and-patch blindly.

Workflow

1. Lock Down Symptoms and Minimal Reproduction

  • Record the exact input/steps, expected behavior, and actual behavior (including full error messages or stack traces).
  • Build the smallest, fastest deterministic reproduction (e.g., a single targeted test or minimal command).
  • If the bug cannot be reproduced yet, identify the missing state or environment factor before changing production code.

2. Form Falsifiable Hypotheses

  • Based on observations and code reading, list 2–3 plausible root causes.
  • For each hypothesis, define the distinguishing test: what should we observe if it is true, and what evidence rules it out?

3. Isolate Variables and Gather Evidence

  • Test one hypothesis at a time (inspect call chains, check actual runtime state, run targeted tests, or add temporary minimal probes).
  • Keep track of ruled-out hypotheses and why they were eliminated so you do not loop in circles.
  • If two consecutive experiments contradict your mental model, pause and challenge base assumptions (wrong branch, stale build/cache, ignored config, wrong process).

4. Apply the Minimal Root-Cause Fix

  • Fix the underlying cause rather than papering over the symptom with defensive checks.
  • Check whether the same module contains sibling instances violating the same invariant; fix proven sibling defects in the same module without expanding into unrelated areas.
  • Remove all temporary debug logs or probes.

5. Verify and Prevent Regressions

  • Re-run the minimal reproduction from Step 1 to confirm the failure is gone.
  • Add or update an automated test that fails before the fix and passes after.
  • Run the relevant test suite and build/lint checks to verify no regressions.

Handoff Format

- **Symptom & Repro**: Exact reproduction command or trigger.
- **Root Cause**: Verified explanation (`path:line`) plus key ruled-out hypotheses.
- **Fix**: Concise summary of the minimal change.
- **Verification**: Reproduction result + automated test/build output summary.

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.