agentsclimarketplace

Debugging

Skill Amey-Thakur/AI-SKILLS/skills/debugging/debugging

Plug-and-play skills and prompts for every AI coding agent

Install
npx -y skills add Amey-Thakur/AI-SKILLS --skill debugging

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 20 days oldThe repository was created 20 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Find the root cause of a bug with a hypothesis-driven loop instead of guess-and-patch. Use when something fails, crashes, or behaves wrongly and the cause is not yet known.

SKILL.md

2.4 KB, 526 tokens by cl100k_base, as published. Nobody here has run it

Debugging

The goal is the cause, not the symptom's disappearance. A fix applied without understanding is a second bug waiting.

Method

  1. Reproduce before anything else. Get the exact failing input, command, or click path, and confirm you can trigger the failure on demand. A bug you cannot reproduce is a bug you cannot verify fixed. If reproduction is impossible, gather the evidence you do have (logs, stack trace, timing) and say plainly that the fix will be a hypothesis.
  2. State the symptom precisely. "Fails" is not a symptom. "Returns 200 with an empty list when the user has 3 orders" is. Write down expected vs actual; the gap between them is the search space.
  3. Form one falsifiable hypothesis. "The cache returns stale data because the key omits the user id": specific enough that an experiment can kill it. If you have three hypotheses, rank by likelihood and cheapest test first.
  4. Run the smallest experiment that can falsify it. Read the code path, add one log line, write a one-case test, bisect the commit range, or shrink the failing input by halves. One variable per experiment; change two things and you have learned nothing.
  5. Loop. Each dead hypothesis narrows the space. When an experiment confirms the cause, you should be able to explain the entire chain: trigger → mechanism → observed symptom. If any link is fuzzy, keep going.
  6. Fix the cause, then prove it. The reproduction from step 1 must now pass, and the fix should come with a test that fails without it. Then look sideways once: does the same mistake exist in sibling code?

Anti-patterns to refuse

  • Patching the symptom ("add a null check") without knowing why the value was null.
  • Changing code at random until the error moves.
  • Declaring victory because the error stopped appearing once.
  • Blaming the framework, compiler, or cosmic rays before your own code has been ruled out with evidence. It is your code, roughly always.

When stuck

Explain the bug out loud to the reader: symptom, everything ruled out, the remaining suspects. Half of these explanations end mid-sentence with "…oh." The other half hand the next person a real map instead of a shrug.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.