Index of every page on this site: llms.txt
All skills
masihmoafi avatar

/debugging

@c0a5d13
by Masih Moafimasihmoafi/skills10 stars
Run it yourself

Use for any bug, failing test, crash or unexpected behaviour, before proposing a fix. Root cause first, one hypothesis at a time, and a stop after three failed fixes.

  • 1 file
  • 2.1 KB
  • Updated 3 weeks ago
  • GitHub
Use this Skill: https://skilld.dev/gh/masihmoafi/skills/debugging

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈44 tokens for metadata: the name and description. ≈495 when used: this file.

Description uses 2.2% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈178 characters, or 2.2%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Debugging

No fix without a root cause. A fix that removes the symptom leaves the cause to come back elsewhere.

1. Find the cause

  1. Read the whole error: message, stack, exit code. A wrapper that hides the exception ("query failed (ValueError)") gets unwrapped first.
  2. Reproduce it with one command or action. If you cannot, gather evidence before guessing.
  3. Check what changed: recent commits, dependencies, config, environment.
  4. Check the environment before the code: proxy, network, credentials, versions, which binary actually runs. A timeout raised to hide a proxy that was never used is a symptom fix.
  5. Across components (CI → build → sign, API → service → database), log what enters and leaves each boundary once, find the layer where it breaks, then look inside that layer.
  6. Trace bad data backwards to where it was first wrong.

2. Compare

Find similar code that works, read it completely, and list every difference, however small.

3. One hypothesis

Write "X is the cause because Y", make the smallest change that tests it, one variable at a time. If it fails, form a new hypothesis; never stack fixes. If you do not understand something, say so.

4. Fix

Write a test that fails on the current code for this reason, make one fix at the cause, and run the test and its neighbours. If three fixes have failed, or each fix surfaces a new problem somewhere else, stop: the design is wrong. Say so and discuss it before fix number four.

If the cause is truly external (timing, a remote service), record what you checked and add handling and logging; most "no root cause" cases are an investigation that stopped early.

Signs you skipped a step

"Is that not happening?" (you assumed), "Stop guessing", "We're stuck?", "just try this first", "one more fix". Each means: back to step 1.

Adapted from obra/superpowers systematic-debugging (MIT, © 2025 Jesse Vincent).

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at c0a5d13. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Activeupdated 3 weeks ago

README badge

README badge for masihmoafi/skills/debugging