test-driven-development
Use when the user explicitly requests strict or test-first TDD, or when the current conversation already contains an explicit `TDD Route: strict` decision from another Aegis workflow.
Install / Use
npx skills add GanyuanRan/Aegis --skill test-driven-developmentInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
AutomationSupported Platforms
Tags
Our assessment of test-driven-development
test-driven-development scores 93/100 on our quality scale, 681st of 2,780 Automation skills we index (top 25%).
Its SKILL.md is 17 KB long, well organised into 24 sections with 15 code examples: a thorough specification that gives an agent plenty to work with.
With 1,273 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so test-driven-development is actively maintained.
- Our last check on 2026-10-26 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit ā read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-04. Automated pattern scan on 2026-10-04. It catches known dangerous patterns, not every risk ā read a skill before letting an agent act on it.
test-driven-development compared with similar skills
All 4 of these similar skills score higher than test-driven-development; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| test-driven-development (this skill)by GanyuanRan | 93 | 1.3k | 53d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 112.3k | 9d ago | CLAUDE.md |
| rufloby ruvnet | 100 | 81.9k | today | CLAUDE.md |
| Claude-Code-Game-Studiosby Donchitos | 100 | 39.7k | 7d ago | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 103.6k | 2d ago | MCP Server |
Frequently asked questions
- How do I install test-driven-development?
- Run
npx skills add GanyuanRan/Aegis --skill test-driven-development. The install tabs above show the steps for each supported agent. - Which AI agents does test-driven-development work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is test-driven-development safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is test-driven-development still maintained?
- The repository was last updated about 2 months ago, so test-driven-development is actively maintained.
Skill content
View source on GitHubname: test-driven-development
description: "Use when the user explicitly requests strict or test-first TDD, or when the current conversation already contains an explicit TDD Route: strict decision from another Aegis workflow."
Execute
ā False-positive entry on a native-direct-skill host? ā Exit immediately unless the user explicitly asked for TDD or the conversation already contains TDD Route: strict.
In off mode, do not start RED / GREEN / REFACTOR from generic bugfix, contract, shared-module, or risky-code wording alone.
Hand control back to using-aegis, systematic-debugging, writing-plans, or the fast path with verification.
ā Implementing a feature or bugfix under TDD Route strict? ā No production code without a failing test first.
Gate: medium/high complexity? ā route to brainstorming or writing-plans first.
Mode: default off disables automatic TDD, not completion verification; auto chooses strict/light/skipped by risk.
Change Necessity: before strict RED/GREEN enters production edits, confirm the slice really needs a code change.
Cycle: RED (write test ā watch it fail) ā GREEN (minimal code ā watch it pass) ā REFACTOR (clean up ā keep green)
Regression: shared module ā related tests. contract change ā producer + consumer. core logic ā old + new tests.
Ripple signal hit ā cover producer+consumer or real user path before claiming green.
GREEN proves the currently expressed behavior slice only.
GREEN does not by itself prove parent-task acceptance, business-value completion, or final completion.
ā Done when: chosen TDD Route is recorded, strict-route tests pass, TDD preflight gate passed when applicable, pre-edit complexity risk was checked for non-trivial source edits, and verification-before-completion has fresh evidence.
Test-Driven Development (TDD)
Overview
Under TDD Route: strict, write the test first. Watch it fail. Write minimal
code to pass.
If you didn't watch the test fail, you don't know if it tests the right thing.
TDD Mode has two values: off and auto. The default off mode disables
automatic TDD routing but never disables verification-before-completion.
auto lets Aegis choose a TDD Route by task risk.
On native-direct-skill hosts, automatic entry must stay anchored to literal
conversation markers such as TDD Route: strict, strict TDD, test-first,
or RED / GREEN / REFACTOR, not generic risky-implementation wording.
When to Use
Only enter this skill after one of these explicit entry signals exists:
- the user explicitly asks for strict TDD, test-first development, or RED / GREEN / REFACTOR
- the current conversation already contains
TDD Route: strictfrom another Aegis workflow
Typical strict-route shapes once entry is already justified: new features, bug fixes, refactoring, behavior or logic changes, interface/data contract changes, cross-module or shared-module changes, and core logic refactors.
Exceptions (ask your human partner): throwaway prototypes, generated code, config files, pure docs cleanup, read-only diagnosis, comment-only changes.
TDD Mode and Route
Before source edits, decide:
Aegis Visibility:
- Why this TDD route is strict, light, or skipped:
- What RED/GREEN proves:
- What still needs verification:
TDD Route:
- Mode: auto | off
- Decision: strict | light | skipped
- Strict authority: explicit user/project request | recorded auto decision | not applicable
- Test posture: diagnostic reproduction | post-change regression | strict RED test
- Reason:
- Verification:
In auto, use strict for behavior, bugfix, contract, shared/core, producer /
consumer, persistence, permission, migration, or meaningful regression risk.
Use light for tiny low-risk edits with an obvious readback or command check.
Use skipped for read-only, docs-only, generated, throwaway, comment-only, or
environment-bound work where TDD does not fit.
In off, do not automatically require TDD, create a strict route, or infer one
from risk alone. Explicit user/project TDD requests still apply; risky work may
still need regression coverage and verification-before-completion before any
completion claim.
For plan or execution review, Mode: off / Decision: skipped is the normal
record unless an explicit user/project strict request overrides it. That record
does not load this skill or turn a diagnostic reproduction into RED. An
approved plan does not supply strict authority by itself.
If this skill was loaded anyway without an explicit TDD request or a visible
TDD Route: strict marker, exit instead of improvising an automatic strict
route from risk words alone.
Keep Aegis Visibility task-specific: explain the route decision and the
regression boundary, not a generic claim that TDD was used.
Preflight Gate
TDD is the implementation discipline for an approved behavior or atomic task. It is not a substitute for task routing, product clarification, or planning.
Before writing tests or production code, stop and route to brainstorming or writing-plans if the current request has any medium- or high-complexity signal:
- multiple files, modules, pages, screens, services, or owners
- user-visible flows such as navigation, onboarding, checkout, lifecycle, or recovery paths
- state transitions, routing rules, API or data contracts, compatibility boundaries, migrations, permissions, or persistence
- more than one acceptance path or manual/visual verification requirement
- unclear product behavior, competing constraints, or long-running execution
For these tasks, require a baseline read-set, plan, and atomic tasks before TDD. High-complexity or ambiguous tasks also need a spec/design review before planning. Only proceed directly with TDD for low-complexity work whose intent, owner, compatibility boundary, verification path, and slice goal / success evidence are already clear.
Change Necessity
Before strict RED/GREEN enters production code edits, make the code-change
decision visible. Any new source-code path needs this check before RED/GREEN
normalizes it as work to implement. This is the "should code change at all?"
check; it is not a new artifact and does not belong in the using-aegis hot
path.
This is behavior-triggered, not prompt-triggered. If strict TDD is about to add any new source-code path or enter production source edits, expose a natural readback even when the user did not ask for it. A tiny helper, small guard, new branch, fallback, adapter, or owner is not exempt. Example: "Code necessity check: a non-code path is insufficient because <reason>; the minimum change boundary is <owner/files>, so the decision is code-change."
Change Necessity:
- User-visible need:
- No-change / non-code option:
- Why code change is necessary:
- Minimum change boundary:
- Decision: no-change | docs/config-only | code-change | needs-clarification
If the decision is no-change, do not write tests or production code for a
non-change. If the decision is docs/config-only, route to that narrower
surface and verify it. If the decision is needs-clarification, pause before
RED/GREEN. If the decision is code-change, carry the minimum boundary into
TDD Route, RED, and regression scope.
Complexity Budget
Before strict TDD on non-trivial work, record the planned complexity budget so RED/GREEN does not silently normalize a wrong or overloaded owner.
Complexity Budget:
- Artifact class:
- Current pressure:
- Projected post-change pressure:
- Planned governance:
Use using-aegis/references/complexity-governance.md for shared artifact
classes, pressure signals, and the meaning of planned governance.
Pre-Edit Complexity Check
Before production code edits, check whether the intended source edit would add logic to an overloaded or wrong owner. Tiny edits can keep this to one line.
Use using-aegis/references/complexity-governance.md for shared pressure
signals and the meaning of over-budget.
Pre-Edit Complexity Check:
- Target edit file:
- Existing pressure signal:
- Owner fit:
- Safer edit boundary:
- Decision: edit-in-place | extract helper | add owner file | split task | pause for plan update
Pre-Edit Owner-Fit Decision:
- Edit intent: wiring-only | move-out / extract-first | local-fix-without-new-responsibility | new-responsibility | emergency / compatibility patch
- Owner fit:
- Safer edit boundary:
- Decision: edit-in-place | extract helper | add owner file | split task | pause for plan update
If the decision is pause for plan update, stop TDD and return to
writing-plans or brainstorming with the evidence.
If the predicted result is that this slice would push a maintained artifact over budget and the slice does not also govern that overrun, do not continue with RED/GREEN as if the task were safely scoped. Pause and update the plan.
When the target edit file is over-budget or mixed-purpose, classify edit intent
before production source edits. new-responsibility must not be added in place
by default. wiring-only, move-out / extract-first, and
local-fix-without-new-responsibility may proceed only when they do not add a
new responsibility and the verification boundary is clear. emergency / compatibility patch requires residual risk and a retirement trigger.
When a medium- or high-complexity task needs project records, use configured Aegis workspace support
lazily. Prefer the installed Aegis workspace helper
(python <aegis-workspace-helper> init --root <target-project-root>) when it
is available. If the task needs a process trail under work/, prefer
python <aegis-workspace-helper> new-work --root <target-project-root> ...
so the intent, checkpoint, drift, and evidence paths are indexed and
structurally checkable:
docs/aegis/
README.md
INDEX.md
BASELINE-GOVERNANCE.md
adr/
baseline/
specs/
plans/
work/YYYY-MM-DD-<task-slug>/
10-intent.md
20-checkpoint.md
90-evidence.md
99-reflection.md
Do not promote reusable project facts, decisions, specs, or plans into those directories unless the workflow needs them and no existing project authority already owns them.
Red-Green-Refactor
RED - Write Failing Test
State: input | output | boundary | acceptance criteria. Check existing test coverage first. Write one minimal test showing what should happen. A minimal test anchors the next behavior slice; it does not by itself define whole-task completeness unless the parent acceptance is already fully pinned.
<Good> ```typescript test('retries failed operations 3 times', async () => { let attempts = 0; const operation = () => { attempts++; if (attempts < 3) throw new Error('fail'); return 'success'; };const result = await retryOperation(operation);
expect(result).toBe('success'); expect(attempts).toBe(3); });
Clear name, tests real behavior, one thing
</Good>
<Bad>
```typescript
test('retry works', async () => {
const mock = jest.fn()
.mockRejectedValueOnce(new Error())
.mockRejectedValueOnce(new Error())
.mockResolvedValueOnce('success');
await retryOperation(mock);
expect(mock).toHaveBeenCalledTimes(3);
});
Vague name, tests mock not code </Bad>
Requirements:
- One behavior
- Clear name
- Real code (no mocks unless unavoidable)
- If a new feature changes user-observable behavior, prefer one minimal end-to-end or integration test for the main path before narrower unit tests
- For user-visible work, cover the main journey and the highest-risk experience or operational floor before treating unit tests as sufficient
- Add unit tests for core rules, boundary conditions, and error branches
Verify RED - Watch It Fail
MANDATORY. Never skip.
npm test path/to/test.test.ts
Confirm:
- Test fails (not errors)
- Failure message is expected
- Fails because feature missing (not typos)
Test passes? You're testing existing behavior. Fix test.
Test errors? Fix er
Truncated for display ā read the full file on GitHub.
Related Skills
Agent-Reach
112.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu ā one CLI, zero API fees.
ruflo
81.9kš The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
Claude-Code-Game-Studios
39.7kTurn Claude Code into a full game dev studio ā 49 AI agents, 72 workflow skills, and a complete coordination system mirroring real studio hierarchy.
Scrapling
103.6kš·ļø The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit ā see the Safety scan above for what the skill file itself contains.
