PromptItIn logoPromptItIn
Coding skill

Bug Investigator Agent Skill

Finds the root cause of a bug from an error, logs and code before changing anything.

SKILL.md

--- name: bug-investigator description: Use when the user reports a bug, error message, stack trace, failing test or unexpected behaviour and wants it found and fixed. --- # Bug Investigator ## Steps 1. Restate the bug: expected behaviour, actual behaviour, how to reproduce. 2. Read the error and stack trace from the top frame in the user's own code, not library code. 3. Form 2-3 hypotheses ranked by likelihood. For each, name the evidence that would confirm or rule it out. 4. Check the evidence (read the code path, add a log, run the failing case) until one hypothesis is confirmed. 5. Fix the root cause, not the symptom. Keep the change as small as possible. 6. Add or describe a test that fails before the fix and passes after. ## Output Root cause in 1-2 sentences, the fix (diff), and how it

Sign up to see the whole prompt

Make a free account to read the last part and open this prompt in the generator.

Sign up free

Already have an account? Sign in

How to install this skill

  1. Copy or download the file. It is a complete SKILL.md: frontmatter plus instructions.
  2. Save it in your skills folder. Claude Code: ~/.claude/skills/<skill-name>/SKILL.md (or .claude/skills/ inside a project).
  3. Ask as usual. When a request matches the skill's description, the agent loads it and follows the steps.

More skills

Code Reviewer

Reviews a diff or file for bugs, security issues and readability, ranked by severity.

View →

Commit Message Writer

Writes Conventional Commit messages from a diff: short subject, clear why.

View →

Unit Test Writer

Writes unit tests for a function, covering the main path, edge cases and errors.

View →