Agent skill

Test Driven Development

by AlexAI-MCP in AlexAI-MCP/hermes-CCC

Apply a disciplined red-green-refactor workflow in Claude Code.

MITAuto-check passedTesting & QA

Install Test Driven Development

skills CLI
$ npx skills add AlexAI-MCP/hermes-CCC --skill test-driven-development -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install AlexAI-MCP/hermes-CCC test-driven-development --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/AlexAI-MCP/hermes-CCC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/test-driven-development .claude/skills/test-driven-development && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
test-driven-development
GitHub stars
135
Token cost
~1.5k tokens
SKILL.md length
727 words
Files
1
Skills in repo
44
Repo updated
First seen
Licence
MIT

At a glance

Apply a disciplined red-green-refactor workflow in Claude Code.

  • Works in 6 steps: Write a failing test. → Run the smallest test scope and watch it… → Implement the smallest change that makes… → …
  • Adding behavior safely
  • SKILL.md covers Purpose, Activation Signals, Core Cycle and Red Phase, plus 17 more sections
  • Calls pytest and ruff

What it does

Test Driven Development is an agent skill from AlexAI-MCP/hermes-CCC. Apply a disciplined red-green-refactor workflow in Claude Code. Use when adding behavior safely, reproducing a bug before fixing it, designing APIs from the outside in, or strengthening change confidence with targeted tests.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Test-driven development. The repository describes itself as: Hermes Agent ported to Claude Code Channel — 46 native skills, no OAuth, no external process. The licence is MIT.

When your agent uses it

  • Adding behavior safely
  • Reproducing a bug before fixing it
  • Designing APIs from the outside in
  • Strengthening change confidence with targeted tests

Example prompts

  • “/test-driven-development”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Write a failing test.
  2. Run the smallest test scope and watch it fail for the right reason.
  3. Implement the smallest change that makes it pass.
  4. Re-run the test.
  5. Refactor while keeping tests green.
  6. Expand coverage only when a new behavior boundary appears.

What it can do on your machine

Read from SKILL.md and the folder at commit 8107e89. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pytest
    • ruff

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Test Driven Development loads about 1.5k tokens when it runs. Until then it costs about 62 tokens; SKILL.md has 727 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from AlexAI-MCP/hermes-CCC at commit 8107e89, republished under its MIT licence (© AlexAI-MCP). 727 words, ~1,520 tokens.

Download SKILL.mdSave it as .claude/skills/test-driven-development/SKILL.md (or your agent's skills folder).
name
test-driven-development
description
Apply a disciplined red-green-refactor workflow in Claude Code. Use when adding behavior safely, reproducing a bug before fixing it, designing APIs from the outside in, or strengthening change confidence with targeted tests.
version
0.1.0
author
OpenAI Codex
license
MIT
metadata.category
engineering
metadata.ported_from
NousResearch Hermes Agent
metadata.tags
tdd, testing, design, regression
metadata.tools
shell, test-runner, diff
metadata.maturity
beta

Test-Driven Development

Purpose

  • Drive implementation from observable behavior.
  • Reproduce bugs before fixing them.
  • Keep code changes tightly coupled to expected outcomes.
  • Use tests as design tools, not just safety nets.
  • Reduce regressions by proving each behavior change.

Activation Signals

  • Use this skill when adding a new feature with clear acceptance behavior.
  • Use this skill when fixing a bug that should never recur.
  • Use this skill when API shape is easier to design from usage than internals.
  • Use this skill when reviewers will ask for evidence.
  • Use this skill when the codebase already has a strong test culture.

Core Cycle

  1. Write a failing test.
  2. Run the smallest test scope and watch it fail for the right reason.
  3. Implement the smallest change that makes it pass.
  4. Re-run the test.
  5. Refactor while keeping tests green.
  6. Expand coverage only when a new behavior boundary appears.

Red Phase

  • Express one behavior at a time.
  • Name the test after the behavior, not the implementation.
  • Ensure the failure is caused by missing behavior, not a broken fixture.
  • Keep setup minimal.
  • Prefer explicit assertions over snapshot sprawl unless snapshots are already standard.
  • For bug fixes, make the failing test mirror the actual defect.

Green Phase

  • Implement the smallest viable change.
  • Do not optimize before the test passes.
  • Avoid speculative abstractions.
  • If several code paths fail, make one behavior pass first.
  • Keep the first passing diff small enough to reason about.

Refactor Phase

  • Remove duplication exposed by the passing test.
  • Improve names and structure.
  • Preserve behavior while simplifying code.
  • Re-run relevant tests after each meaningful refactor.
  • Stop refactoring once readability improves and the tests still describe the behavior clearly.

Bug-Fix TDD

  • Reproduce the bug in a failing test before touching the fix.
  • If reproduction is expensive, build a narrow harness.
  • If the bug is timing-sensitive, isolate the timing dependency rather than sleeping more.
  • If the bug cannot be reproduced, treat the fix as higher risk and document why.

Test Selection Rules

  • Use unit tests for pure behavior and deterministic branching.
  • Use integration tests for component boundaries and data flow.
  • Use end-to-end tests only when lower layers cannot express the guarantee.
  • Put the regression test at the lowest layer that still captures the defect.

Assertion Rules

  • Assert the most important observable outcome first.
  • Prefer stable assertions over implementation detail checks.
  • Avoid asserting on incidental formatting unless formatting is the feature.
  • For collections, assert the contract that matters: count, key values, order, or identity.

Good Test Names

  • test_search_returns_ranked_results_for_partial_match
  • test_login_redirect_does_not_loop_when_session_is_hydrated
  • test_serializer_rejects_missing_required_field

Bad Test Names

  • test_fix
  • test_works
  • test_api
  • test_stuff

Useful Commands

bash
pytest tests/test_module.py::test_specific_behavior -vv
pytest tests/ -k "auth and redirect" -vv
ruff check path/to/file.py
Show full SKILL.md (303 more words)Show less

Design Benefits To Exploit

  • Tests clarify API ergonomics.
  • Tests reveal hidden dependencies.
  • Tests pressure functions toward clean inputs and outputs.
  • Tests expose when code is too coupled to mock cleanly.

Decision Rules

  • If a feature request has no acceptance behavior, clarify before writing code.
  • If the first test is too hard to write, the design seam may be missing.
  • If the code needed to pass the test is huge, the test scope is probably too broad.
  • If refactoring requires changing many tests, the tests may be overfit to internals.

Anti-Patterns

  • writing tests after the implementation and calling it TDD
  • changing the test to match a broken implementation
  • asserting on private internals instead of behavior
  • creating giant fixture setups for simple behavior
  • using TDD language while skipping the red phase

Output Contract

When reporting TDD progress, include:

  • failing test added
  • implementation change
  • verification command
  • refactor notes
  • remaining coverage gaps

Example Status Block

markdown
TDD status:
- Red: added failing regression test for partially hydrated session redirect
- Green: updated middleware guard to wait for token presence
- Refactor: simplified session-check helper naming
- Verify: pytest tests/test_auth.py::test_login_redirect_does_not_loop_when_session_is_hydrated -vv

Coverage Guidance

  • Start with one high-signal test.
  • Add neighboring tests only when the bug or feature has multiple edges.
  • Do not explode the matrix on the first pass.
  • Prefer targeted new tests over broad rewrites of existing suites.

Failure Modes

  • wrong failure reason in red phase
  • massive green-phase implementation
  • no refactor after a crude passing patch
  • tests too brittle to survive harmless refactors
  • overuse of mocks where real data flow would be clearer

Recovery Moves

  • Rewrite the test if it fails for the wrong reason.
  • Split one large behavior into multiple smaller tests.
  • Move down a layer if end-to-end setup is hiding the real contract.
  • Replace mocks with real collaborators when possible.

Checklist

  1. Name the behavior.
  2. Write the failing test.
  3. Confirm the right failure.
  4. Implement the smallest fix.
  5. Re-run the narrow test.
  6. Refactor with tests green.
  7. Run adjacent coverage.
  8. Report evidence, not confidence alone.

© AlexAI-MCP, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/test-driven-development of AlexAI-MCP/hermes-CCC.

Open the folder on GitHubat commit 8107e89

Compare with similar skills

Test Driven Development next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Test Driven Development compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Test Driven Development this skillAlexAI-MCP/hermes-CCC135—~1.5kAutomated safety check: PassMIT
TDDpietheinstrengholt/rssmonster56430 repos~906Automated safety check: PassMIT
TDD WorkflowhellangleZ/burn-in-cceverywhere-ralph11211 repos~2.4kAutomated safety check: PassNone
TDDsanity-io/sanity6.4k20 repos~1kAutomated safety check: PassMIT
Test Driven Developmentfarm-fe/farm5.6k51 repos~2.5kAutomated safety check: PassMIT
Tapd Story PipelineTencentBlueKing/bk-bcs840—~2.6kAutomated safety check: PassCustom licence

Similar skills

  • TDD

    pietheinstrengholt/rssmonster

    Test-driven development. An agent skill from pietheinstrengholt/rssmonster.

    564 GitHub starsUsed in 30 repos~906 tokens
    Testing & QAAuto-check passed
  • TDD Workflow

    hellangleZ/burn-in-cceverywhere-ralph

    A skill your agent uses when writing new features, fixing bugs, or refactoring code.

    112 GitHub starsUsed in 11 repos~2.4k tokens
    Testing & QAAuto-check passed
  • TDD

    sanity-io/sanity

    Official

    Test-driven development with red-green-refactor loop. An agent skill from sanity-io/sanity.

    6.4k GitHub starsUsed in 20 repos~1k tokens
    Testing & QAAuto-check passed
  • A skill your agent uses when implementing any feature or bugfix, before writing implementation code

    5.6k GitHub starsUsed in 51 repos~2.5k tokens
    Testing & QAAuto-check passed
  • Tapd Story Pipeline

    TencentBlueKing/bk-bcs

    单需求实现流水线——把一个 TAPD 需求从零推进到代码提交。自动串联技术澄清、 开发计划、任务拆分、TDD 实现、架构/安全校验、代码提交六个阶段。

    840 GitHub stars~2.6k tokensUpdated today
    Testing & QAAuto-check passed
  • Absolute Init

    maddhruv/absolute

    One-time setup for absolute: interview how you want it to behave (output style, autonomy, TDD strictness, spec dir, families) + detect the stack once, then write .absolute.config.json (project…

    218 GitHub starsUsed in 1 repo~3k tokens
    Testing & QAAuto-check passed

More from AlexAI-MCP/hermes-CCC

All 44 skills in this repo
  • GitHub Code Review

    AlexAI-MCP/hermes-CCC

    Review GitHub pull requests with a findings-first engineering mindset.

    135 GitHub stars~1.3k tokensUpdated 6 mo ago
    Auto-check passed
  • GitHub PR Workflow

    AlexAI-MCP/hermes-CCC

    Run a disciplined GitHub pull request workflow from branch creation through merge.

    135 GitHub stars~1.4k tokensUpdated 6 mo ago
    Auto-check passed
  • Hermes Memory

    AlexAI-MCP/hermes-CCC

    Manage durable project memory for Claude Code. An agent skill from AlexAI-MCP/hermes-CCC.

    135 GitHub stars~1.7k tokensUpdated 6 mo ago
    Auto-check passed
  • Hermes Route

    AlexAI-MCP/hermes-CCC

    Route Claude Code work by complexity, risk, and tool needs. An agent skill from AlexAI-MCP/hermes-CCC.

    135 GitHub stars~1.9k tokensUpdated 6 mo ago
    Auto-check passed
  • Hermes Skill

    AlexAI-MCP/hermes-CCC

    Create, improve, inventory, and audit Claude Code skills. An agent skill from AlexAI-MCP/hermes-CCC.

    135 GitHub stars~1.7k tokensUpdated 6 mo ago
    Auto-check passed
  • Hermes Traj

    AlexAI-MCP/hermes-CCC

    Capture Claude Code interaction trajectories in training-friendly formats.

    135 GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed

Categories

Questions about Test Driven Development

What does Test Driven Development do?

Apply a disciplined red-green-refactor workflow in Claude Code. Test Driven Development is an agent skill from AlexAI-MCP/hermes-CCC. Apply a disciplined red-green-refactor workflow in Claude Code.

When should I use Test Driven Development?

Test Driven Development fits situations like: adding behavior safely; reproducing a bug before fixing it; designing APIs from the outside in; strengthening change confidence with targeted tests.

How do I install Test Driven Development in Claude Code?

Run `npx skills add AlexAI-MCP/hermes-CCC --skill test-driven-development -a claude-code`. Or copy the skill folder (skills/test-driven-development in AlexAI-MCP/hermes-CCC) into .claude/skills/test-driven-development in your project. Claude Code loads it when a task matches its description.

How do I install Test Driven Development in Codex?

Run `npx skills add AlexAI-MCP/hermes-CCC --skill test-driven-development -a codex`. Or copy the skill folder (skills/test-driven-development in AlexAI-MCP/hermes-CCC) into .agents/skills/test-driven-development in your project. Codex loads it when a task matches its description.

Can I use Test Driven Development in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add AlexAI-MCP/hermes-CCC --skill test-driven-development -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/test-driven-development, .gemini/skills/test-driven-development, .github/skills/test-driven-development and .opencode/skills/test-driven-development in your project.

What does Test Driven Development need to run?

Going by SKILL.md and its folder, Test Driven Development needs the command-line tools its instructions call (pytest and ruff).

Does Test Driven Development access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Test Driven Development safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Test Driven Development use?

Test Driven Development is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Test Driven Development use?

About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Test Driven Development?

Skills that share tags, products or a category with Test Driven Development: TDD (pietheinstrengholt/rssmonster, 564 stars), TDD Workflow (hellangleZ/burn-in-cceverywhere-ralph, 112 stars), TDD (sanity-io/sanity, 6.4k stars) and Test Driven Development (farm-fe/farm, 5.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Test Driven Development?

AlexAI-MCP (a GitHub user) maintains it in AlexAI-MCP/hermes-CCC, which has 135 GitHub stars. The repository holds 44 skills in this directory. The repository was last updated on April 8, 2026.

Source: AlexAI-MCP/hermes-CCC on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.