SkillbookTry free skill
Pro
Preview cut from the real Pro body

Write a failing test first

Turn a bug or feature expectation into a focused test that fails for the right reason.

For
Engineers
Time per use
12 min
Format
.md and .skill
How to use it
  1. 1.
    Open ChatGPT or Claude.
    Either works. The skill is just text.
  2. 2.
    Inspect the real preview, then unlock the full file.
    One click; no install, no setup.
  3. 3.
    Paste it as your first message.
    The assistant now knows how to do this one job.
  4. 4.
    Give it your specifics, get the result.
    Roughly 12 min, every time you need it.
Skill filed10-write-a-failing-test-first.skill.md1.3 KB
Run once

Mobile apps: if ChatGPT or Claude opens blank, tap the message box and paste. Skillbook copies first.

Install

Mobile apps: if ChatGPT or Claude opens blank, tap the message box and paste. Skillbook copies first.

Fill the blanks first.

These fields update the skill preview and the ChatGPT/Claude buttons instantly.

IncludeWhat should be true after the fix or feature?
IncludeWhat happens now, if known?
IncludeRelevant files, functions, components, endpoints, schemas, or snippets.
IncludeJest, Vitest, Playwright, Cypress, XCTest, pytest, RSpec, unknown, etc.
IncludeIntegration vs unit, fixtures, mocks, speed, flaky areas, or environment limits.
Install as agent behavior

Permanent agent install needs the full body.

This page is only showing a preview. Unlock the full skill to install it in Claude Code, Claude Projects, or a Custom GPT.

Unlock full skill →
# Write a failing test first

You are a test-first engineering partner. I will give you a bug, feature expectation, or behavior gap. Design a focused test that fails for the right reason before implementation begins.

## Inputs

Behavior to prove: {{behavior_to_prove||What should be true after the fix or feature?}}
Current behavior: {{current_behavior||What happens now, if known?}}
Code or API context: {{code_context||Relevant files, functions, components, endpoints, schemas, or snippets.}}
Test stack: {{test_stack||Jest, Vitest, Playwright, Cypress, XCTest, pytest, RSpec, unknown, etc.}}
Constraints: {{constraints||Integration vs unit, fixtures, mocks, speed, flaky areas, or environment limits.}}

## Output

**1. Test intent.** One sentence describing the behavior.

**2. Test shape.** Unit, integration, e2e, visual, contract, or regression, with rationale.

**3. Arrange-act-assert plan.** Data setup, action, and expected result.

**4. Test code draft.** Framework-appropriate code or pseudocode if framework details are missing.

**5. Why it should fail now.** The expected failure mode before implementation.

**6. False-positive risks.** How this test could pass while the behavior is still broken.

## Rules

[Preview stops here. Unlock the Pro library for the full rules, guardrails, examples, and copyable file.]
The rest is in the Pro library.

This preview is cut from a real Pro workflow. Unlock the founding Pro library for the full file, rules, examples, and installable skill.

Full Pro file includes
  • Input checklist
  • Step-by-step workflow
  • Quality bar
  • Guardrails
  • Output format
  • Example run
  • Install formats
Unlock the library →