other
Fix Bugs with a Test-First Agent Workflow
A practical look at the fix-bug agent skill: a test-first workflow that turns vague bug reports into failing tests, diagnosis, and verified fixes.
Where this fits
A developer reports "the checkout flow sometimes fails after promo code applied." That vague signal is enough for an agent to run away guessing. This skill anchors the agent to a test-first sequence: reproduce with a failing test, diagnose the root cause, then fix it. It turns bug reports into an auditable workflow.
Why agents benefit
- The workflow begins with a mode check: it stops if the agent is in plan mode, so it never tries to fix bugs during a read-only planning phase.
- It mandates a failing test before any fix, so changes are validated against a concrete regression.
- It gives the agent a decision tree for common diagnostics: reproduce, isolate, inspect stack traces, identify likely root cause.
- It works with any test runner; it is not tied to a specific framework.
- It writes run notes to
/tmp/fix-bug-n, making the debugging session inspectable and repeatable.
Practical scenarios
CI flaky test investigation
Agent sees "TestFoo failed intermittently" and loads fix-bug. It first re-runs the test in isolation, captures the failure, then digs into shared state or timing issues.
User reports "It doesn't work"
No repro steps. The skill guides the agent to ask targeted questions, infer the failing path, and convert the report into a failing test before changing code.
Regression after dependency upgrade
After bumping a package, tests pass locally but fail in a container. The agent uses the workflow to reproduce against the container environment, diagnose missing configuration, and add a regression test.
Add it to your agent workflow
Install the skill with:
npx skills add nowsprinting/unity-coding-skills --skill fix-bug
Then invoke it as soon as a user mentions broken behavior:
/skill fix-bug
or with an incident hint:
/skill fix-bug "orders API returns 500 after retry"
The skill will guide the agent through reproduce → diagnose → fix and leave a record of the root cause.
Compare before adopting
Before adding it permanently, check three things. Quality signals: the repo has 19 stars and the author is Koji Hasegawa; look at recent commits and issues for maintenance freshness. Alternatives: generic "debug this" prompts or a custom reproduction checklist can work, but they rarely enforce a failing test first. Workflow fit: this skill expects a test runner and outside plan mode; if your agent runs in a read-only planning phase, you will need to gate it or exit plan mode first.
Why it is worth tracking
Fix-bug is small but opinionated. It is not just a prompt; it encodes a debugging discipline that many agents lack. The low star count means you should verify momentum, but the Unlicense and clear metadata make it easy to fork or adapt. Track it because a test-first bug workflow is one of the highest-leverage agent patterns: it converts vague bug reports into regression tests and documented root causes. Re-evaluate it whenever you change test frameworks, need plan-mode support, or want to compare it against newer debugging skills. Full details can be found at https://www.openagentskill.com/skills/nowsprinting-fix-bug.
Featured Skill
fix-bug
Skill by Koji Hasegawa