Agent skill

TDD Cycle

by TypedDevs in TypedDevs/bashunit

Run complete TDD red-green-refactor cycle for a test. An agent skill from TypedDevs/bashunit.

MITAuto-check: notesTesting & QA

Install TDD Cycle

skills CLI
$ npx skills add TypedDevs/bashunit --skill tdd-cycle -a claude-code

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

GitHub CLI
$ gh skill install TypedDevs/bashunit tdd-cycle --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/TypedDevs/bashunit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/tdd-cycle .claude/skills/tdd-cycle && 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-cycle
GitHub stars
434
Token cost
~378 tokens
SKILL.md length
198 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

Run complete TDD red-green-refactor cycle for a test. An agent skill from TypedDevs/bashunit.

  • Works in 5 steps: Verify Task File → RED — Write Failing Test → GREEN — Make It Pass → …
  • Tasks that involve Test-driven development
  • SKILL.md covers Workflow and Critical Rules
  • Calls make

What it does

TDD Cycle is an agent skill from TypedDevs/bashunit. Run complete TDD red-green-refactor cycle for a test

Its SKILL.md is about 380 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. It works with Bash. The repository describes itself as: A simple yet powerfull testing library for bash scripts. The licence is MIT.

When your agent uses it

  • Tasks that involve Test-driven development

Example prompts

  • “/tdd-cycle”

Requirements

  • Pre-approved tools (allowed-tools): Read, Edit, Write, Bash, Grep, Glob

Workflow steps

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

  1. Verify Task File
  2. RED — Write Failing Test
  3. GREEN — Make It Pass
  4. REFACTOR — Improve Code
  5. Next Test

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Edit
    • Write
    • Bash
    • Grep
    • Glob

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • make

    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 Cycle loads about 378 tokens when it runs. Until then it costs about 16 tokens; SKILL.md has 198 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Edit, Write, Bash, Grep, Glob

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 TypedDevs/bashunit at commit 8f297fb, republished under its MIT licence (© TypedDevs). 198 words, ~378 tokens.

Download SKILL.mdSave it as .claude/skills/tdd-cycle/SKILL.md (or your agent's skills folder).
name
tdd-cycle
description
Run complete TDD red-green-refactor cycle for a test
allowed-tools
Read, Edit, Write, Bash, Grep, Glob

TDD Cycle

Execute a complete Red -> Green -> Refactor cycle.

Workflow

1. Verify Task File

Check for .tasks/YYYY-MM-DD-*.md. If missing, create one before proceeding.

2. RED — Write Failing Test
  1. Show test inventory from task file, ask which test to implement
  2. Study patterns from existing tests (unit -> assert_test.sh, doubles -> doubles_test.sh)
  3. Write the failing test following Arrange-Act-Assert
  4. Run: ./bashunit path/to/test.sh — must fail
  5. Verify failure is for the RIGHT reason (not syntax error or wrong setup)
  6. Update task file: current red bar + logbook entry
3. GREEN — Make It Pass
  1. Write minimal code in src/ — only enough for THIS test
  2. Run: ./bashunit path/to/test.sh — must pass
  3. Update task file: check off test + logbook entry
4. REFACTOR — Improve Code
  1. Improve readability, naming, extract duplication — no behavior changes
  2. Run tests after each change
  3. Quality checks: make sa && make lint
  4. Full suite: ./bashunit tests/
  5. Update task file with refactoring notes
5. Next Test

Show updated test inventory. Ask if continuing or done.

Critical Rules

  • Never skip RED — always verify test fails first
  • Minimal code in GREEN — resist feature creep
  • All tests green during REFACTOR — revert if broken
  • Update task file after each phase

© TypedDevs, 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 .claude/skills/tdd-cycle of TypedDevs/bashunit.

Open the folder on GitHubat commit 8f297fb

Compare with similar skills

TDD Cycle 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 Cycle compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
TDD Cycle this skillTypedDevs/bashunit434—~378Automated safety check: NotesMIT
Bats Shell Testing Patternswshobson/agents40k11 repos~1.3kAutomated safety check: PassMIT
TDDFastLED/FastLED7.5k—~848Automated safety check: PassMIT
TDD ImplementFastLED/FastLED7.5k—~1kAutomated safety check: PassMIT
Opsmill Dev Test Driving Bugsopsmill/infrahub529—~4kAutomated safety check: PassApache-2.0
TDD Repairruvnet/ruflo74k—~1.6kAutomated safety check: NotesMIT

Similar skills

  • Writes unit tests for shell scripts with Bats: error-condition tests, fixtures and mocks, cross-shell checks, parallel runs, helper files and CI integration.

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

    FastLED/FastLED

    Guide Test-Driven Development workflow for FastLED. An agent skill from FastLED/FastLED.

    7.5k GitHub stars~848 tokensUpdated today
    Testing & QAAuto-check passed
  • TDD Implement

    FastLED/FastLED

    Implement a feature or fix a bug using strict TDD. An agent skill from FastLED/FastLED.

    7.5k GitHub stars~1k tokensUpdated today
    Testing & QAAuto-check passed
  • Writes a single failing test that reproduces a bug after its root-cause analysis is complete, before any fix is written.

    529 GitHub stars~4k tokensUpdated today
    Testing & QAAuto-check passed
  • TDD Repair

    ruvnet/ruflo

    Test-Driven Repair — given a failing test, spawn a bounded headless claude -p (Read/Edit/Bash only) that makes the test pass without modifying it.

    74k GitHub stars~1.6k tokensUpdated yesterday
    Testing & QAAuto-check: notes
  • Jest Testing Patterns

    ChrisWiles/claude-code-showcase

    Jest patterns for React Native style tests: TDD discipline, mock factory functions, module and GraphQL hook mocking, custom render helpers and anti-patterns to avoid.

    6.1k GitHub starsUsed in 7 repos~1.5k tokens
    Testing & QAAuto-check passed

More from TypedDevs/bashunit

All 11 skills in this repo
  • Commit

    TypedDevs/bashunit

    Stage and commit changes using conventional commits format. An agent skill from TypedDevs/bashunit.

    434 GitHub stars~781 tokensUpdated yesterday
    Auto-check: notes
  • Gh Issue

    TypedDevs/bashunit

    Fetch GitHub issue, create branch, plan and implement with TDD, then open PR

    434 GitHub stars~721 tokensUpdated yesterday
    Auto-check: notes
  • Gh Issues

    TypedDevs/bashunit

    Walk over all open GitHub issues that are unassigned or assigned to the current user, and process each one via the /gh-issue skill, sequentially.

    434 GitHub stars~1.7k tokensUpdated yesterday
    Auto-check: notes
  • PR

    TypedDevs/bashunit

    Push branch and create a GitHub PR with concise, issue-linked description

    434 GitHub stars~1k tokensUpdated yesterday
    Auto-check: notes
  • Pre Release

    TypedDevs/bashunit

    Run comprehensive pre-release validation checklist. An agent skill from TypedDevs/bashunit.

    434 GitHub stars~488 tokensUpdated yesterday
    Auto-check: notes
  • Release

    TypedDevs/bashunit

    Run pre-release validation and execute the release process. An agent skill from TypedDevs/bashunit.

    434 GitHub stars~618 tokensUpdated yesterday
    Auto-check: notes

Works with

Categories

Questions about TDD Cycle

What does TDD Cycle do?

Run complete TDD red-green-refactor cycle for a test. An agent skill from TypedDevs/bashunit. TDD Cycle is an agent skill from TypedDevs/bashunit.

When should I use TDD Cycle?

TDD Cycle fits situations like: tasks that involve Test-driven development.

How do I install TDD Cycle in Claude Code?

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

How do I install TDD Cycle in Codex?

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

Can I use TDD Cycle 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 TypedDevs/bashunit --skill tdd-cycle -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-cycle, .gemini/skills/tdd-cycle, .github/skills/tdd-cycle and .opencode/skills/tdd-cycle in your project.

What does TDD Cycle need to run?

Going by SKILL.md and its folder, TDD Cycle needs the command-line tools its instructions call (make). Its frontmatter pre-approves these tools: Read, Edit, Write, Bash, Grep, Glob.

Does TDD Cycle 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 Cycle safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does TDD Cycle use?

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

How many tokens does TDD Cycle use?

About 378 tokens (SKILL.md is roughly 1.5k 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 Cycle?

Skills that share tags, products or a category with TDD Cycle: Bats Shell Testing Patterns (wshobson/agents, 40k stars), TDD (FastLED/FastLED, 7.5k stars), TDD Implement (FastLED/FastLED, 7.5k stars) and Opsmill Dev Test Driving Bugs (opsmill/infrahub, 529 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains TDD Cycle?

TypedDevs (a GitHub organization) maintains it in TypedDevs/bashunit, which has 434 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 6, 2026.

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