Skip to content
Agentmart
Submit a tool

test-driven-development

Use when implementing or changing code behavior, before writing production code.

Skill by Threat-Vector-Security

IndexedApache-2.0★ 13
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/threat-vector-security-test-driven-development

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use when implementing or changing code behavior, before writing production code.

Use cases: testing, writing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/test-driven-development

What's inside

Skill name
test-driven-development
Description
Use when implementing or changing code behavior, before writing production code.
License
Apache-2.0
Instructions
53 lines in SKILL.md · view on GitHub

Files (3)

  • SKILL.md
  • testing-anti-patterns.md · references/
  • skill.json

SKILL.md (first lines)

# Test-Driven Development

## Overview / When to Use

Write the failing test first. Watch it fail for the right reason. Then write the smallest production change that makes it pass.

**Persona Injection:** Adopt the perspective of a **QA Specialist**. Your primary goal is to prove the code works through verifiable tests, not just to write code. You treat tests as the actual proof of correctness. No production code is valid without a failing test first.

## Process

1. **Red:** write one small test for one behavior.
   - Name the behavior clearly.
   - Prefer real behavior over mock choreography.
2. **Verify red.**
   - Run the narrowest test command.
   - Confirm it fails for the expected reason, not because of typos or broken setup.
   - If an existing integration, scenario, or regression harness already covers the behavior, prefer that over a brand-new narrow unit test.
3. **Green:** write the smallest implementation that passes.
   - Do not add extra features or cleanup yet.
4. **Verify green.**
   - Re-run the focused test.
   - Run any broader existing check needed to prove the real behavior, not just the easiest local assertion.
5. **Refactor** while keeping tests green.

## Common Rationalizations

| Rationalization | Reality |
|---|---|
| "I'll write the code first and the tests later." | Post-hoc testing is often biased to pass the code written. Tests must define the requirement first. |
| "The existing test suite is too broad, I'll just write a small unit test to pass quickly." | Do not invent a narrower test just to avoid the real proof surface. |
| "I know this works, I don't need a test for this bug fix." | If it broke once, it needs a regression test to ensure it never breaks again. |

## Red Flags

Stop and restart if:
- the test was written after the code
- the first run passed immediately
- you are testing mocks instead of behavior
- you are bundling multiple behaviors into one test
- you are narrowing the proof surface to avoid an existing failing harness

## Verification

- [ ] A failing test was written and observed failing for the correct reason before production code was written.
- [ ] The production code is the smallest change possible to make the test pass.
- [ ] The new test and the broader test suite both pass.
- [ ] For bug fixes, a regression test was added before the fix.

## Reference

Read [references/testing-anti-patterns.md](./references/testing-anti-patterns.md) before adding complex mocks, harness helpers, or test-only abstractions.

From Threat-Vector-Security/guardian-agent, Apache-2.0.

More from Threat-Vector-Security/guardian-agent

Signals

Stars
13
Forks
3
Open issues
0
Last commit (this folder)
Apr 4, 2026 (6 months ago)
Last release
Sep 9, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Threat-Vector-Security

Cite this page

test-driven-development skill. Agent Mart. https://agentmart.dev/skills/threat-vector-security-test-driven-development (last updated 2026-10-24)