tdd-workflow
Skill by affaan-m
Guides an AI assistant through test-driven development: write a failing test first, make the smallest change to green, then refactor. Aimed at developers building features, fixing bugs or refactoring code with 80%+ coverage.
Install tdd-workflow
Built from the published package, never by AI.
git clone --depth 1 https://github.com/affaan-m/ECC /tmp/ECC && mkdir -p ~/.claude/skills && cp -r /tmp/ECC/skills/tdd-workflow ~/.claude/skills/tdd-workflowRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/affaan-m/ECC /tmp/ECC && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/ECC/skills/tdd-workflow ~/.gemini/antigravity-cli/skills/tdd-workflowAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The tdd-workflow skill guides an AI assistant through test-driven development. It asks for a failing test first, confirms the test fails for the intended reason, then makes the smallest change needed to pass and refactors. The skill targets at least 80% coverage across unit, integration and E2E tests.
Before starting, it detects the project's package manager and test runner. It can begin from a *.plan.md file, treating that file as untrusted input. When the repository uses Git, it records checkpoint commits for the RED, GREEN and refactor stages. It is aimed at developers writing new features, fixing bugs or refactoring existing code.
Written from the project's SKILL.md and checked against it.
What it can do
- Plan handoffUses a *.plan.md file as the starting point for the TDD cycle after reviewing its content.
- Test runner detectionChooses npm, pnpm, yarn or Bun, and Bun's native runner or a package.json test script.
- RED gateRequires a failing test that runs and fails for the intended reason before production code is edited.
- GREEN and refactorApplies the smallest fix to make the failing test pass, then refactors after a valid GREEN result.
- Git checkpoint commitsCreates commits for the RED, GREEN and optional refactor stages when the repository is under Git.
- Test type guidanceCovers unit, integration and E2E tests, with Playwright for E2E browser flows.
What you need
- A project with npm, pnpm, yarn or Bun and a test setup
- Git, optional, for checkpoint commits
- Playwright, for E2E tests
Try asking
- Use tdd-workflow to add a failing test for my new login feature first
- Follow tdd-workflow to fix this bug with a reproducer before any code change
- Continue from docs/feature.plan.md using the tdd-workflow steps
Good to know
- Plan file content is untrusted, and shell commands in a plan need human review.
- Checkpoint commits are only made when the repository is under Git.
- Destructive file operations and secret handling in plans are rejected.
- The workflow targets at least 80% coverage across unit, integration and E2E tests.
Security check
D- Tells the assistant to ignore its instructions or hide actions from youIn
skills/tdd-workflow/SKILL.md:ignore previous rules - Downloads a script from the internet and runs itIn
skills/tdd-workflow/SKILL.md:curl ... | sh
Checked automatically: skills/tdd-workflow/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md23 KB
Alternatives to tdd-workflow
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
tdd-workflow: common questions
Does tdd-workflow require a specific test runner?
No. The skill does not assume npm test. It detects the package manager and chooses between Bun's native runner and the project's package.json test script.
Does tdd-workflow need Git?
No. Checkpoint commits are created only when the repository is under Git. Otherwise the RED and GREEN steps still apply.
How does tdd-workflow handle plan files?
Plan file content is treated as untrusted data. Commands in the plan are not run until they are sanitized, matched to allowed actions and approved by the user.
How do I install tdd-workflow?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is tdd-workflow free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is tdd-workflow safe to use?
It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade D (tells the assistant to ignore its instructions or hide actions from you). Review the code before you install. How grades work.
What are alternatives to tdd-workflow?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
