debug · seifbenayed — Claude Code skill: diagnose errors
Investigates errors, failing tests, and unexpected behavior, then suggests a fix. It diagnoses first and leaves code changes to you unless you ask for them.
npx skills add SeifBenayed/cloclo --skill debug -a claude-codeWhat debug does
Give the skill an error message or describe what went wrong. It can ask follow-up questions and inspect recent changes with git diff HEAD~3. For a failing test, it can run the test; for a runtime problem, it tries to reproduce the issue with minimal steps.
It traces the relevant code and checks for causes such as incorrect names or types, missing imports or dependencies, async problems, environment variables, and paths. Then it tests a root-cause hypothesis against the code and reports its findings with a specific fix and prevention advice. It won’t edit files unless you explicitly request changes, so applying the proposed fix stays in your hands.
What it helps with
- trace an error message or stack trace to its likely cause
- investigate why a test fails
- reproduce a runtime issue with minimal steps
- check whether recent code changes introduced a bug
- get a code-level fix without automatic edits
Example prompts for the agent
- Investigate this error and explain its root cause: [paste the error or stack trace].
- Find out why
test_nameis failing and suggest a fix without editing any files.
How to install debug
1Skills CLI (Vercel)
npx skills add SeifBenayed/cloclo --skill debug -a claude-code2Manually: put the files in place
~/.claude/skills/debug/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/debug/
1Skills CLI (Vercel)
npx skills add SeifBenayed/cloclo --skill debug -a codex2Manually: put the files in place
.agents/skills/debug/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add SeifBenayed/cloclo --skill debug -a cursor2Manually: put the files in place
.cursor/skills/debug/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install SeifBenayed/cloclo debug2Manually: put the files in place
.github/skills/debug/SKILL.md1Skills CLI (Vercel)
npx skills add SeifBenayed/cloclo --skill debug -a gemini-cli2Platform CLI
gemini skills install https://github.com/SeifBenayed/cloclo --path .claude/skills/debugManually: put the files in place
.devin/skills/debug/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add SeifBenayed/cloclo --skill debug -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about debug
How do I install debug in Claude Code?
Run npx skills add SeifBenayed/cloclo --skill debug -a claude-code. The skill file is located at ~/.claude/skills/debug/SKILL.md.
What does the debug skill do?
It investigates errors, test failures, and unexpected behavior by reproducing the issue, tracing the relevant code, and checking a root-cause hypothesis. It suggests a fix but won’t make changes unless you ask.
Does debug edit code automatically?
No. It reports the suspected cause and proposed changes first; you decide whether to apply them.
Source text
SKILL.md · MIT
---
name: debug
description: Troubleshoot and debug issues. Use when the user reports an error, a test failure, unexpected behavior, or asks to investigate why something isn't working.
allowed-tools: Bash, Read, Grep, Glob
---
# Debug
Help diagnose and troubleshoot the described issue or the most recent error.
## Steps
1. **Understand the problem**
- Read any error messages or stack traces mentioned
- Ask clarifying questions if the problem description is vague
- Check recent git changes that might have caused the issue: `git diff HEAD~3`
2. **Reproduce**
- If there's a failing test, run it to see the exact error
- If it's a runtime issue, try to reproduce with minimal steps
3. **Investigate**
- Find the relevant source files using the stack trace or error message
- Trace the code path that leads to the error
- Check for common issues:
- Typos in variable or function names
- Wrong types or missing type conversions
- Missing imports or dependencies
- Race conditions or async issues
- Environment differences (missing env vars, wrong paths)
- Recent changes that broke assumptions
4. **Form a hypothesis and verify**
- State what you think the root cause is
- Find evidence in the code that supports or refutes it
- If needed, add targeted logging to narrow down the issue
5. **Report findings**
- Root cause explanation (why it broke, not just what broke)
- Suggested fix with specific code changes
- How to prevent similar issues in the future
Do NOT make changes unless explicitly asked — diagnose and explain first. The user should decide whether and how to fix it.
$ARGUMENTS
© SeifBenayed · MIT · SeifBenayed/cloclo
Similar skills
All skills for Testing and QA →debug by other authors comes first.