Skip to content
Agent Orchestration
Skill

/write-failing-test-first

Before fixing any bug, write a test that reproduces it and watch it fail. Use for every bug fix.

BOOST
From plugin
loopkit
75553 skills1 agent4 commands2 MCP
Install
$ npx -y skills add Archive228/loopkit --skill write-failing-test-first --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/write-failing-test-first

Context preview

The summary Claude sees to decide when to auto-load this skill.

Before fixing any bug, write a test that reproduces it and watch it fail. Use for every bug fix.

SKILL.md

write-failing-test-first.SKILL.md
name: write-failing-test-first
description: Before fixing any bug, write a test that reproduces it and watch it fail. Use for every bug fix.
when_to_use: fixing a bug, "make X work", a reported defect

Write the Failing Test First

The only proof you fixed a bug is a test that failed before and passes after. 1. Write the smallest test that reproduces the reported behavior. 2. Run it. **Watch it fail** for the right reason (read the assertion, not just red). 3. Now fix the code. 4. Run the test. It passes. Run the FULL suite — you didn't break anything else. If you can't write the test easily, the architecture is telling you something (tight coupling). Say so. Never: fix first, test after (you'll write a test that passes regardless). Never: skip the watch-it-fail step.

Ships withloopkit

33 battle-tested skills + minimal .claude harness for any coding agent (Claude Code, Cursor, Codex, Gemini CLI).

Get the whole plugin

Other skills on loopkit.