Sign In
T

TDD Workflow

@sickn33
Visit Skill
Share:

Community skill that makes an agent work test-first: one failing behavioural test, minimal code to pass, then refactor, with a separate guide on mock anti-patterns.

Security Reviewed

Markdown-only guide; the agent runs your own test command and edits code; no scripts, network or keys in the skill.

Install TDD Workflow in Google Antigravity

Antigravity loads skills from .agents/skills/ in your project or ~/.gemini/config/skills/ for all projects (official docs). Full guide

EasiestOption 1: paste this to your Antigravity agent
Install the "TDD Workflow" skill for Google Antigravity.
Follow the steps at https://www.antigravityskills.org/install/test-driven-development.md (source: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/test-driven-development).
Before running anything, show me what you will download and whether it includes scripts, and wait for my OK.
Install it into this project (.agents/skills/) unless I say global. When done, check that Antigravity lists it as an installed skill.

The agent reads the install file, shows you what it will download and waits for your OK.

Option 2: install it yourself
  1. 1. Download the repository
    git clone --depth 1 https://github.com/sickn33/antigravity-awesome-skills.git /tmp/ag-skills && git -C /tmp/ag-skills log -1 --format=%h

    We reviewed commit a307264. If the second command prints a different hash, the skill may have changed since our review.

  2. 2. Copy the skill into this project (workspace skill)
    mkdir -p .agents/skills && cp -r /tmp/ag-skills/skills/test-driven-development .agents/skills/

    Run from your project root. Antigravity reads workspace skills from .agents/skills/<folder>/; this folder holds SKILL.md and testing-anti-patterns.md (2 files, no scripts).

  3. 3. Or install it for all projects (global skill)
    mkdir -p ~/.gemini/config/skills && cp -r /tmp/ag-skills/skills/test-driven-development ~/.gemini/config/skills/

    Use this instead of the previous step. Copy only the skills you need: the repo README warns that a large watched skills folder can overload Antigravity's context.

  4. 4. Check that Antigravity sees it

    Antigravity app: start a new conversation and ask "What skills do you have?"; test-driven-development should be listed. Antigravity CLI: run /skills (/skills reload in a session that was already open).

The repository's own installer (npx agentic-awesome-skills --antigravity --skills <ids> --dry-run, README) can also install selected skills; the copy steps above use the standard Antigravity skill folders and install only this one.

Using Claude Code, Cursor or Codex? See other assistants below.

What is TDD Workflow?

test-driven-development is a community-contributed skill in sickn33's antigravity-awesome-skills collection. SKILL.md teaches the Red-Green-Refactor loop: write one minimal failing test, run it and confirm it fails for the right reason, write the simplest code that passes, then clean up while staying green. A second file, testing-anti-patterns.md, covers five ways tests go wrong, mostly around mocks. This version also tells the agent to preserve existing work and to say honestly whether the test came before the fix.

How to use TDD Workflow?

Install the skill, then ask the agent to build a feature or fix a bug test-first. The agent should write one failing test, run your project's own test command and show the failure, implement the smallest fix, re-run, then refactor. When it adds mocks or test helpers it should read testing-anti-patterns.md first.

Key features of TDD Workflow

  • โœ“We counted at a307264: the folder has 2 Markdown files and no scripts: SKILL.md (275 lines, 8,395 bytes) and testing-anti-patterns.md (299 lines, 8,438 bytes)
  • โœ“We counted: SKILL.md ends with an 8-item verification checklist, and testing-anti-patterns.md has 5 numbered anti-patterns, the first four with a "gate function" the agent should pass before continuing (testing mock behaviour, test-only methods in production classes, mocking without understanding, incomplete mocks, integration tests as an afterthought)
  • โœ“SKILL.md's "Preserve existing work" section says that when code already exists the agent should add regression tests instead of deleting or rewriting it, and should state whether the test came first; the "Why order matters" section says neither timing nor coverage percentage proves an assertion is meaningful
  • โœ“We counted: the "When Stuck" table has 4 rows (for example "Must mock everything" -> code too coupled, use dependency injection)
  • โœ“The examples are TypeScript (retryOperation, submitForm) and the commands shown are generic npm test; SKILL.md says to use the project's existing test commands because not every npm test accepts the same arguments
  • โœ“The skill's frontmatter says risk: critical, source: community, added 2026-02-27; we found no scripts, so the label seems to reflect that the agent edits code and runs tests, which is our reading, not something the file states

When to use TDD Workflow

  1. 1Fixing a bug by first writing a test that reproduces it
  2. 2Adding a small feature with a test that fails before the code exists
  3. 3Cleaning up a test suite that mostly asserts on mocks

Source and files

Upstream risk label
critical
Added upstream
2026-02-27
SKILL.md size
8.2 KB
Files in the skill folder
SKILL.md ยท testing-anti-patterns.md
Listing synced
2026-10-05 from commit bdacd76

Installation & Setup Guide

Agent Rules / Prompt Setup

Follow these steps (taken from the project's own docs) to configure TDD Workflow in your development environment.

Step 1: Claude Code (manual copy)claude
mkdir -p .claude/skills && cp -r /tmp/ag-skills/skills/test-driven-development .claude/skills/

Not documented per skill by the repository; this uses Claude Code's standard .claude/skills/ folder after the clone above.

Step 2: Cursor: not documented by the projectcursor

The README lists installer targets for several hosts, but gives no per-skill Cursor path, so we do not list one.

Usage Example & Verification

Prompt / Request Example
1) SKILL.md bug-fix example: Bug "empty email accepted" -> write test('rejects empty email', ...), run it and see the failure, add the check, run again.

2) Our example: "Use the test-driven-development skill to fix this bug: the discount function returns a negative total when the coupon is larger than the cart. Show me the failing test output before you change any code."
-> The agent writes one regression test, runs your test command, pastes the failure, then makes the smallest change and runs the tests again.

3) Our example: "Review the tests in tests/cart.test.ts against the skill's anti-patterns and list which ones only assert on mocks."
-> The agent reads testing-anti-patterns.md and reports tests that fail its checks, with a fix for each.

Security Review

Static review
Reviewed Date
2026-10-15
Audited Ref / Commit
a3072641b750a1fb2f6ce695a5f984ea3d4c3ec1
Reviewer
antigravityskills.org (static review)

Markdown-only guide; the agent runs your own test command and edits code; no scripts, network or keys in the skill.

Full review: scope, findings, risks
Audit Scope:SKILL.md and testing-anti-patterns.md read in full; repository README install and disclaimer sections and LICENSE, all at commit a307264 (2026-10-15). Static review only; nothing was executed.
Key Findings:Instruction-only skill. Two Markdown files with TypeScript examples and generic npm test commands. No executable files, no URLs fetched, no credentials. Running tests and editing code is done by the agent in your project when you ask for it.
Identified Operational Risks & Permissions:Low to medium. Test commands and code edits happen in your project, so the usual care applies: commit first and review the diff. Frontmatter says risk: critical.

Both files were read for commands, URLs, file operations and credentials. The shell lines are npm test examples and sample output; the TypeScript is illustrative. Nothing in the skill downloads, uploads or reads secrets. The agent's actions (running your tests, changing source files) are the normal effects of the task, not behaviour hidden in the skill. This is a read of the text, not a behaviour test.

Operational Notes & Known Limitations

Known Limitations

  • โ€ขIt does not run tests itself: the agent runs your project's test command, so you need a working test runner first
  • โ€ขThe examples are TypeScript; for other languages the agent has to translate the method
  • โ€ขSKILL.md's own limits: a passing unit test does not prove browser, packaged-runtime or provider behaviour, and test-first order does not prevent wrong requirements or over-mocking
  • โ€ขStrict wording ("MANDATORY. Never skip.") can make an agent slow on trivial changes; SKILL.md itself says copy, generated output and low-impact configuration do not need a manufactured unit test

Frequently Asked Questions

Is the TDD Workflow skill safe?

It is two Markdown files. We read both and found no scripts, no network calls and no API keys. It makes the agent run your test command and edit code, so use it in a repo with version control and review the diff.

How do I install TDD Workflow in Antigravity?

Clone sickn33/antigravity-awesome-skills, copy skills/test-driven-development into .agents/skills/ (or ~/.gemini/config/skills/), then ask "What skills do you have?" (Antigravity CLI: /skills). The project README documents its own installer for selected skills.

Does it work with any language?

The method does. The code examples are TypeScript, so the agent adapts them to your test framework; the skill tells it to use your project's own test commands.

What if I already wrote the code?

SKILL.md says to keep it and add characterisation or regression tests, and to say honestly that the test did not come first.

Is it an official Google skill?

No. It is community-contributed to an independent collection whose README says it is not affiliated with or endorsed by Google.

Supported Platforms

antigravityclaude