Claude Code
curl -fsSL https://raw.githubusercontent.com/vibe-md/vibe.md/7cb0620fbd80f9829155d8866328b58cd18d5aa7/scripts/install.sh \
| bash -s -- --skill test-first-react \
--agent claude-code --ref 7cb0620fbd80f9829155d8866328b58cd18d5aa7Enforces Test-First (TDD) workflow for React components using React Testing Library. Use when building or changing React UI, components, forms, or pages. Always write tests before implementation code. When tests fail, stop and discuss with the user whether to fix the code or update the tests.
When you ask your agent for a React component, page or form, this skill makes it write the tests first, show them to you, and wait for your approval before it writes any component code. If a test fails later, your agent stops and asks you what to do instead of quietly changing code or tests until things go green.
AI agents write React code fast, and when a test fails they often "fix" it by editing the test, or by patching the code in a way that hides the real problem. You end up with tests that pass but don't check what you actually wanted, and you don't know what was changed or why.
Tests before code
Your agent restates what you want, proposes the tests, and waits for your approval. No component code is written before the tests exist and are approved.
Tests what users see
Follows React Testing Library practice: test visible behavior with queries like getByRole and getByLabelText, not internal state or class names.
Stops when a test fails
On any failure it does not auto-fix. It shows the failing test and the error, then waits for your decision.
You choose what to change
Offers clear options: the test is right so fix the code, the test is outdated so update it, the requirement changed so update both, or something else.
One command
Open Terminal in your project folder, then run this command. No ZIP, moving files, or prompt needed.
curl -fsSL https://raw.githubusercontent.com/vibe-md/vibe.md/7cb0620fbd80f9829155d8866328b58cd18d5aa7/scripts/install.sh \
| bash -s -- --skill test-first-react \
--agent claude-code --ref 7cb0620fbd80f9829155d8866328b58cd18d5aa7Works on macOS, Linux, and Windows through WSL or Git Bash. The installer checks destinations and stops if existing files conflict.
Type these to your agent in plain language. Here's what to expect.
you › Build a login form with email and password.
Expected workflow
you › Add a "remember me" checkbox to the login form.
Expected workflow
The skill applies whenever you build, change or fix React UI. It sets three rules: tests come first, a failing test stops the work, and decisions are discussed with you rather than assumed.
It prefers React Testing Library with Jest or Vitest, plus user-event and jest-dom. You approve the tests, then the minimal code to pass them, then the test run.