Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/tonyghiani/ai-essentials/tddnpx skills add tonyghiani/ai-essentials --skill tddgit clone --depth 1 https://github.com/tonyghiani/ai-essentialsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/tonyghiani/ai-essentials/tdd)<a href="https://agentmods.dev/skills/tonyghiani/ai-essentials/tdd"><img src="https://agentmods.dev/badge/skills/tonyghiani/ai-essentials/tdd.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00059 | $0.00834 |
| Opus 5 | $0.00030 | $0.00417 |
| Sonnet 5 | $0.00012 | $0.00167 |
| Haiku 4.5 | $0.00006 | $0.00083 |
Grade A, and why
tdd scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TDD loop
Opt-in only. When invoked, you do not write implementation code until a test fails for the right reason.
The loop
1. Name the behaviour. One sentence, declarative, third person, no "should":
returns enabled when no state has been persisted
If you can't phrase it that way, the behaviour isn't defined yet. Go ask.
2. Write the failing test. Colocated <name>.test.ts(x) beside the source. Match the house style:
describe('SignificantEventsMaintenanceService', () => {
describe('getState', () => {
it('returns enabled when no state has been persisted', async () => {
const service = makeService();
await expect(service.getState()).resolves.toBe('enabled');
});
});
});
3. Run it and read the failure. This is the step people skip.
# use your project's test runner, e.g.:
npx jest <path/to/file.test.ts>
The test must fail because the behaviour is missing, not because of a typo, a bad import, or a mock that throws. A test that fails for the wrong reason proves nothing. If the error isn't the one you predicted, fix the test before touching the implementation.
4. Implement the minimum that makes it pass. No speculative extras.
5. Run again. Green, and no other test broke.
6. Refactor. Now, with the test as the safety net. Prefer deleting over abstracting.
Repeat per behaviour. Do not batch five tests then implement; the loop's value is in the failure you read at step 3.
Testing style
Follow marco-code-style for the full picture. The parts that matter most here:
- Hand-rolled stateful mock factories, not
jest.mock. Build a fake that round-trips: aMap-backed saved-objects client that throws NotFound untilcreate, a management API that tracksenabledso pause→resume actually works. JSDoc each option. renderHook/actfor hooks,render/screenfor components. Nouser-event.- Assert concrete values, not snapshots.
expect.objectContainingwhere partial matching is honest. - Async via
.rejects/.resolves:await expect(fn()).rejects.toMatchObject({ statusCode: 409 }). - Negative assertions pin the contract:
expect(service.getStatus).not.toHaveBeenCalled()proves the guard took the cheap path. - Shared fixtures as SCREAMING_SNAKE consts:
const REQUEST = {} as Request. - Fakes cast at the seam with
as unknown as T.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 80 lines · 59 tokens per session scan A 735089907eda
tdd is a skill published in the GitHub repository tonyghiani/ai-essentials (6 stars, last pushed 28d ago), licensed MIT. It adds 59 tokens to every session and 834 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
engram-testing-coverage
TDD and coverage standards for Engram. Trigger: When implementing behavior changes in any package.
nunit-testing
Use when writing or modifying tests in NUnit's own test projects, or when making a behavioral change to production code that needs test coverage. Covers test structure, attribute choice, helper visibility, platform guards, and which test projects are real.
tdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
strict-tdd
Strict RED->GREEN->REFACTOR test-driven development with enforcement. Never write production code before a failing test. Atomic commits per TDD cycle.
conductor-implement
Execute tasks from a track's implementation plan following TDD workflow.
tdd
This skill should be used when the user wants to implement features or fix bugs using test-driven development. Enforces the RED-GREEN-REFACTOR cycle with vertical slicing, context isolation between test writing and implementation, human checkpoints, and auto-test feedback loops. Uses multi-agent orchestration with the…