Agent skill

TDD Task

by jvm-skills in jvm-skills/jvm-skills

Implement a feature or fix a bug using TDD — write failing test first, then implement, refactor, verify, beautify.

Apache-2.0Auto-check passedTesting & QA

Install TDD Task

skills CLI
$ npx skills add jvm-skills/jvm-skills --skill tdd-task -a claude-code

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

GitHub CLI
$ gh skill install jvm-skills/jvm-skills tdd-task --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/jvm-skills/jvm-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.junie/skills/tdd-task .claude/skills/tdd-task && 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
tdd-task
GitHub stars
140
Token cost
~2.2k tokens
SKILL.md length
1,294 words
Files
1
Skills in repo
16
Repo updated
First seen
Licence
Apache-2.0

At a glance

Implement a feature or fix a bug using TDD — write failing test first, then implement, refactor, verify, beautify.

  • Works in 10 steps: Plan — create a todolist → Understand → Clarify — ask before coding → …
  • Any single code change that should be test-driven
  • SKILL.md covers Process and Project Customization
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

TDD Task is an agent skill from jvm-skills/jvm-skills. Implement a feature or fix a bug using TDD — write failing test first, then implement, refactor, verify, beautify. Use for any single code change that should be test-driven.

Its SKILL.md is about 2.2k 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 licence is Apache-2.0.

When your agent uses it

  • Any single code change that should be test-driven
  • Tasks that involve Test-driven development

Example prompts

  • “/tdd-task”

Workflow steps

10 steps, taken from the step headings in SKILL.md.

  1. Plan — create a todolist
  2. Understand
  3. Clarify — ask before coding
  4. Classify — pick test type(s)
  5. Red — write a failing test
  6. Green — make the test(s) pass
  7. Refactor
  8. Verify
  9. Beautify (UI changes only)
  10. Commit

What it can do on your machine

Read from SKILL.md and the folder at commit c6d477f. 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

    No scripts in the folder and no shell commands in SKILL.md.

    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

TDD Task loads about 2.2k tokens when it runs. Until then it costs about 46 tokens; SKILL.md has 1,294 words of instructions outside code blocks.

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

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 jvm-skills/jvm-skills at commit c6d477f, republished under its Apache-2.0 licence (© jvm-skills). 1,294 words, ~2,219 tokens.

Download SKILL.mdSave it as .claude/skills/tdd-task/SKILL.md (or your agent's skills folder).
name
tdd-task
description
Implement a feature or fix a bug using TDD — write failing test first, then implement, refactor, verify, beautify. Use for any single code change that should be test-driven.
dependencies
test, commit, restart, simplify, frontend, e2e-test
agents
ui-review

TDD Task

Implement a feature or fix a bug by writing a failing test first, then making it pass.

Process

0. Plan — create a todolist

MANDATORY — before any other step, call TaskCreate once per step below so progress is visible. Mark each task in_progress when starting and completed the moment it's done — do not batch. Add extra tasks if the work uncovers sub-steps (e.g. a DB migration).

Default tasks:

  1. Understand — trace code paths / find analog
  2. Clarify — ask targeted questions before coding (skip if none)
  3. Classify — pick test base class(es); decide if E2E Playwright is required (see Step 3 rule)
  4. Red — write failing service/unit test; confirm RED
  5. Green — make all failing tests pass
  6. Refactor — /simplify pass
  7. Verify — service tests + Playwright E2E (+ ui-review for UI changes)
  8. Beautify — /frontend (UI changes only, delete task if backend-only)
  9. Commit — /commit
1. Understand

Explore the codebase to find the relevant code paths.

  • Search for existing implementations of the same concept — read the closest analog end-to-end (controller → service → template) before writing new code
  • Find the relevant classes, controllers, and templates for this area
  • Check if there's an existing test class for this area
  • For features: determine where the new code should live following the project's package structure
  • For bugs: trace the broken code path
2. Clarify — ask before coding

After exploration, before writing any test or code: if the task has real ambiguity, ask the user targeted questions via AskUserQuestion. Batch them into a single call (1–4 questions max, each with concrete options the user can click).

Ask only when the answer changes what you build. Good triggers:

  • Scope — spec mentions feature X; is related feature Y also in scope?
  • Behaviour ambiguity — two plausible behaviours for the same symptom (e.g. "reject task" — does it also affect the replacement pick order, or only exclude from future fills?)
  • Data model choice — multiple reasonable schemas (junction table vs. soft-delete flag vs. status enum)
  • Backfill — existing data that may or may not need migrating to the new behaviour
  • Edge cases worth locking in — empty state, concurrent requests, deleted parent
  • Test seam — extend existing FooServiceTest or create FooServiceRejectionTest?
  • User role — Playwright test covers guest flow, manager flow, or both?

Do NOT ask:

  • Trivial style/naming choices — decide yourself
  • Things the codebase conventions already answer — read CLAUDE.md / references/project.md first
  • "Should I do TDD?" — yes, that's why this skill is running
  • Things you can resolve by reading one more file

If exploration answered everything, mark this task completed with a one-line note ("no ambiguity — proceeding") and move on. Don't fabricate questions to fill the step.

3. Classify — pick test type(s)

Choose the right test base class(es) for the change. Check references/project.md for the project's test base classes and when to use each.

Common categories:

  • Unit/service tests — business logic, repository queries
  • Integration tests — tests requiring external services (DB, storage, message queues)
  • End-to-end tests — browser-visible UI, full user flows

E2E coverage rule — MANDATORY when behaviour is user-observable. If a user can trigger or see the change via the UI (any HTTP route, any rendered template, any HTMX/JS interaction), the task needs BOTH:

  1. A unit/service/integration test that drives the change (fast feedback, drives implementation)
  2. A Playwright E2E test that proves the user-facing path works end-to-end

Skip E2E only when the change is provably non-user-observable: background jobs with no UI surface, internal refactors with no behavioural delta, generated-code regeneration. "Only a service-layer bug" is NOT a valid skip — if the service powers a UI flow, the UI flow needs a Playwright test. Use /e2e-test for the Playwright test (page-object pattern, TestId constants) — or write one manually against your E2E harness if that skill isn't installed.

If E2E is required, add 4b. Red — write failing Playwright E2E test; confirm RED to the todolist.

Show full SKILL.md (670 more words)Show less
4. Red — write a failing test

MANDATORY GATE — do NOT write any implementation code until this step is complete.

The goal is a test that compiles, runs, and fails with an assertion error — not a compile error. A compile error proves the code doesn't exist yet; an assertion error proves the current behavior is wrong.

Unit/integration tests:

  1. Create a stub — write the new method/class with a minimal implementation (return null, return a hardcoded wrong value, throw TODO()). Just enough to compile.
  2. Write assertions — add tests that assert the correct behavior against the stub. They compile and run but FAIL with assertion errors.
  3. Run /test *FilterPattern (or your build tool's test runner) and confirm RED (test must fail with an assertion error).

Playwright/E2E tests:

  1. Write the test directly — it runs against the full app, no stub needed. Navigate, interact, assert on expected UI state.
  2. Run the test — it fails because the UI/behavior doesn't exist yet. That's RED.
  3. Confirm RED (test must fail).

When Step 3 required BOTH a service test AND an E2E test: write the service/unit test first and get it RED, then write the Playwright test and get it RED too. Both must be failing before you start Step 5.

<rules>
- If you cannot write a test, you MUST use AskUserQuestion to explain why and get explicit approval before skipping. Do not rationalize the skip yourself.
- Template/view changes often have testable service or controller behavior behind them — don't use "it's just a template change" as a reason to skip.
- If the change is user-observable, a service/unit test alone is NOT sufficient — you also need a Playwright E2E test per the rule in Step 3.
- The test name should describe the expected behavior (e.g. `Should transition to REVEAL when voting ends` not `Fix end button`)
- If the change requires a DB migration, run the migration and codegen first (check `references/project.md` for the exact commands)
</rules>
5. Green — make the test(s) pass

Write the minimum code to make the failing test(s) pass.

  1. Compile the project (check references/project.md for the compile command)
  2. Run /test *FilterPattern — confirm GREEN on the service/unit test. Fix inline and re-run if needed.
  3. If Step 3 required a Playwright E2E test: run it too and confirm GREEN. For a UI-wiring change, you may need to restart the app (/restart, or rebuild your app manually) before the Playwright run picks up backend changes.
  4. Do not proceed to Step 6 until every test you wrote in Step 4 is green.
6. Refactor

Run /simplify (or review manually) to check changed code for reuse, quality, and efficiency. Then clean up anything remaining: remove duplication, extract methods if needed, ensure naming is consistent with surrounding code.

Run /test *FilterPattern — confirm still green after refactoring.

7. Verify
  • Non-user-observable changes (background jobs, internal refactors, generated code): service/unit test output is sufficient proof.
  • User-observable changes (any route, template, or HTMX/JS flow a user can hit): the Playwright E2E test you wrote in Step 4 must be green — that is the proof the fix works end-to-end. A passing service test alone is NOT sufficient.
  • UI changes (any template file created or modified): in addition to the above, spawn the ui-review subagent on the screenshot folder from the Playwright run. Provide the expected user flow so it knows what to check. Fix any issues it reports before proceeding. If you modified a template file, it IS a UI change — do not classify it as "backend-only".
8. Beautify (UI changes only)

If the change introduced new UI elements:

Use /frontend (or apply the project's design system manually) to refine, then re-run Playwright tests and verify with ui-review subagent.

9. Commit

MANDATORY — commit your changes. Do not skip or defer this step.

Use /commit (or commit manually). Every TDD task ends with a commit.

Project Customization

Read references/project.md in this skill's directory if it exists. It provides project-specific context:

  • Test base classes and when to use each
  • Build, compile, and migration commands
  • Package structure conventions
  • Any other project-specific patterns

© jvm-skills, Apache-2.0. 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 .junie/skills/tdd-task of jvm-skills/jvm-skills.

Open the folder on GitHubat commit c6d477f

Compare with similar skills

TDD Task 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.

TDD Task compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
TDD Task this skilljvm-skills/jvm-skills140—~2.2kAutomated safety check: PassApache-2.0
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-bcs841—~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 实现、架构/安全校验、代码提交六个阶段。

    841 GitHub stars~2.6k tokensUpdated yesterday
    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 jvm-skills/jvm-skills

All 16 skills in this repo
  • Mutation Testing

    jvm-skills/jvm-skills

    Bootstrap pitest via the info.solidsoft.pitest Gradle plugin with Kotlin-sane defaults, run mutation tests scoped to changed classes, interpret surviving mutants from mutations.xml, triage…

    140 GitHub stars~6.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Ralph Coverage

    jvm-skills/jvm-skills

    Run Ralph in coverage mode — iteratively write tests for untested classes until coverage targets are met.

    140 GitHub stars~683 tokensUpdated 1 mo ago
    Auto-check passed
  • Skill Scout

    jvm-skills/jvm-skills

    Run the skill-scout loop — scan the next batch of unscanned JVM-conference rosters for speaker-created AI skills and apply results to the CSV store via the overnight Workflow.

    140 GitHub stars~727 tokensUpdated 1 mo ago
    Auto-check passed
  • Spec

    jvm-skills/jvm-skills

    Generate a feature spec with user stories directly from conversation context and codebase exploration — no interview needed.

    140 GitHub stars~832 tokensUpdated 1 mo ago
    Auto-check passed
  • UI Review

    jvm-skills/jvm-skills

    Verify UI/UX by running Playwright tests and reviewing screenshots.

    140 GitHub stars~545 tokensUpdated 1 mo ago
    Auto-check passed
  • Kotest

    jvm-skills/jvm-skills

    Write a new Kotlin test, or modernize an existing one, using Kotest matchers and idiomatic Kotlin test style — backticked names, apply/assertSoftly blocks, and existing object mothers and helpers.

    140 GitHub stars~2.6k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about TDD Task

What does TDD Task do?

Implement a feature or fix a bug using TDD — write failing test first, then implement, refactor, verify, beautify. TDD Task is an agent skill from jvm-skills/jvm-skills. Implement a feature or fix a bug using TDD — write failing test first, then implement, refactor, verify, beautify.

When should I use TDD Task?

TDD Task fits situations like: any single code change that should be test-driven; tasks that involve Test-driven development.

How do I install TDD Task in Claude Code?

Run `npx skills add jvm-skills/jvm-skills --skill tdd-task -a claude-code`. Or copy the skill folder (.junie/skills/tdd-task in jvm-skills/jvm-skills) into .claude/skills/tdd-task in your project. Claude Code loads it when a task matches its description.

How do I install TDD Task in Codex?

Run `npx skills add jvm-skills/jvm-skills --skill tdd-task -a codex`. Or copy the skill folder (.junie/skills/tdd-task in jvm-skills/jvm-skills) into .agents/skills/tdd-task in your project. Codex loads it when a task matches its description.

Can I use TDD Task 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 jvm-skills/jvm-skills --skill tdd-task -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tdd-task, .gemini/skills/tdd-task, .github/skills/tdd-task and .opencode/skills/tdd-task in your project.

What does TDD Task need to run?

SKILL.md names no scripts, command-line tools or credentials: TDD Task is instructions for the agent only.

Does TDD Task 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 TDD Task 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 TDD Task use?

TDD Task is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does TDD Task use?

About 2.2k tokens (SKILL.md is roughly 8.9k 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 TDD Task?

Skills that share tags, products or a category with TDD Task: 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 TDD Task?

jvm-skills (a GitHub organization) maintains it in jvm-skills/jvm-skills, which has 140 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on August 31, 2026.

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