test-first-implementation

test-first-implementation is a skill for Claude Code, Codex from stark-ai-de/agent-skills. It costs 50 tokens per session (627 once invoked), scanned A, original, Apache-2.0.

A test-first coding process known as TDD, or test-driven development: write a test that fails, make it pass with a small change, then improve the code.

In plain words
What is it for?
Use it for features, bug fixes, API responses, screen states, command-line output, or integrations that can be checked through observable behavior.
Why use it?
It defines expected behavior before implementation and leaves a test that can catch the same bug or behavior change later.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for features, bug fixes, API responses, screen states, command-line output, or integrations that can be checked through observable behavior.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/stark-ai-de/agent-skills/test-first-implementation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add stark-ai-de/agent-skills --skill test-first-implementation
Clone the repo
git clone --depth 1 https://github.com/stark-ai-de/agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test-first-implementation

README.md
[![agentmods](https://agentmods.dev/badge/skills/stark-ai-de/agent-skills/test-first-implementation.svg)](https://agentmods.dev/skills/stark-ai-de/agent-skills/test-first-implementation)
Your own site
<a href="https://agentmods.dev/skills/stark-ai-de/agent-skills/test-first-implementation"><img src="https://agentmods.dev/badge/skills/stark-ai-de/agent-skills/test-first-implementation.svg" alt="Measured on agentmods" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 627 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.00627
Opus 5 $0.00025 $0.00313
Sonnet 5 $0.00010 $0.00125
Haiku 4.5 $0.00005 $0.00063

Measured 7d ago against content hash 65ff574e4372, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

test-first-implementation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

incubator/skills/engineering-workflows/test-first-implementation/SKILL.md · 87 lines

How it starts

The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Test-First Implementation

Goal

Drive implementation from observable behavior: write a failing test, make it pass with the smallest change, then refactor without changing behavior.

When to use

  • The user asks for TDD, red-green-refactor, test-first implementation, or regression-first work.
  • A feature can be expressed as observable behavior, API output, UI state, CLI output, or integration behavior.
  • A bug fix should start with a failing regression test.

When not to use

  • The repo has no runnable feedback loop and the user only needs a prototype.
  • The task is documentation-only or configuration-only.
  • The user explicitly asks for implementation without adding tests.

Inputs to inspect

  • User story, acceptance criteria, bug reproduction, or expected behavior.
  • Existing tests, test helpers, fixtures, and package scripts.
  • docs/agents/validation.md when present.
  • Nearby production code only after selecting the behavior boundary.

Workflow

  1. Identify the smallest vertical behavior slice.
  2. Choose the most stable observable test boundary; avoid testing private implementation details.
  3. Write or update a test that fails for the right reason.
  4. Run the focused test and capture the red result.
  5. Implement the minimum production change.
  6. Run the focused test again and capture the green result.
  7. Refactor only if it improves clarity without broadening scope.
  8. Run the smallest relevant validation suite.

Safety rules

  • Do not test private helpers just to make coverage easy.
  • Do not add snapshots for behavior that should be asserted directly.
  • Do not change production code before proving the test fails unless the repo cannot run tests.
  • Do not broaden the feature while chasing test convenience.

References

No bundled references. Use downstream docs/agents/validation.md for test commands and domain docs for expected behavior when present.

Scripts

No bundled scripts.

Output format

Return:

  1. Behavior slice selected
  2. Test boundary and why it was chosen
  3. Red result
  4. Implementation summary
  5. Green result
  6. Follow-up validation
  7. Remaining risks

Read the full file on GitHub · 87 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 87 lines · 50 tokens per session scan A 65ff574e4372

Subscribe to this mod's changes

test-first-implementation is a skill published in the GitHub repository stark-ai-de/agent-skills (5 stars, last pushed today), licensed Apache-2.0. It adds 50 tokens to every session and 627 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.