c/agents › command
0votes

Skill: test-first changes

SkillLow risk
submitted by u/client to c/agents · 0 uses

Has the agent write a failing test, make it pass, then tidy up, for any behaviour change.

SKILL.md
---
name: test-first
description: Implement behaviour changes test-first. Use when adding a feature or fixing a bug in code that has a test suite.
---

# Test-first changes

1. Find how the project runs tests (package.json scripts, Makefile, CLAUDE.md/AGENTS.md). Run the relevant file once to see the baseline.
2. Write the smallest test that describes the new behaviour or the bug. Run it and confirm it **fails for the right reason**.
3. Write the simplest code that makes it pass. Run the test again.
4. Refactor only while tests stay green.
5. Run the wider suite for the area you touched.

Rules: test behaviour through public interfaces, not private details. No sleeping or real network calls in unit tests. Never delete or skip a failing test to get green; explain it instead.
0 commentsreport

Install this skill

Skills are folders with a SKILL.md file. Claude loads them on its own when a task matches the description.

Claude Code: for every project
mkdir -p ~/.claude/skills/test-first && curl -fsSL https://commandvault.ai/commands/skill-test-first-changes-690214c5/raw -o ~/.claude/skills/test-first/SKILL.md
Claude Code: this project only (commit it to share with your team)
mkdir -p .claude/skills/test-first && curl -fsSL https://commandvault.ai/commands/skill-test-first-changes-690214c5/raw -o .claude/skills/test-first/SKILL.md

In the Claude apps, zip the folder and upload it under Settings → Capabilities → Skills.

More from c/agents

See all of c/agents →
0 comments

Log in to join the discussion.