Skip to content
cccskills
FreePublished on GitHub

write-failing-test-first

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

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md789 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

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.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Catch the accessibility failures that ship in almost every AI-built UI. Use after building any interactive component.

The English summary is being prepared. Showing the original description.

Archive228/loopkit755Updated Jul 15, 2026

Before compaction Loopkit extracts decisions into claude-decisions.json (machine-readable). Read it alongside claude-progress.txt at session start — prose is for humans, JSON is for the loop.

The English summary is being prepared. Showing the original description.

Archive228/loopkit755Updated Jul 15, 2026

Review a diff against the goal spec assuming the code is BROKEN. The reviewer that lives in the maker's head always agrees with itself — this pulls review into a hostile, separate pass. Invoke after every code change before marking work done.

The English summary is being prepared. Showing the original description.

Archive228/loopkit755Updated Jul 15, 2026

Verify that an endpoint checks ownership, not just authentication. Use on any handler that reads or mutates user data.

The English summary is being prepared. Showing the original description.

Archive228/loopkit755Updated Jul 15, 2026

Find the exact commit that introduced a bug. Use when something worked before and broke, and you don't know which change did it.

The English summary is being prepared. Showing the original description.

Archive228/loopkit755Updated Jul 15, 2026

Before picking new work, smoke-test the last "completed" feature. If it's broken, revert and re-open it before touching anything else. Kills the "looks shipped, isn't shipped" bug across sessions.

The English summary is being prepared. Showing the original description.

Archive228/loopkit755Updated Jul 15, 2026

See all skills by Archive228

Report a problem with this skill