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.
git clone --depth 1 https://github.com/sjarmak/coding-agent-workflowsWrote 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/agents/sjarmak/coding-agent-workflows/tdd-guide)<a href="https://agentmods.dev/agents/sjarmak/coding-agent-workflows/tdd-guide"><img src="https://agentmods.dev/badge/agents/sjarmak/coding-agent-workflows/tdd-guide/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/sjarmak/coding-agent-workflows/tdd-guide"><img src="https://agentmods.dev/badge/agents/sjarmak/coding-agent-workflows/tdd-guide.svg" alt="Reviewed on agentmods" width="80" 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.00042 | $0.00856 |
| Opus 5.5 | $0.00017 | $0.00342 |
| Sonnet 5.5 | $0.00008 | $0.00171 |
| Haiku 4.5 | $0.00004 | $0.00086 |
Grade A, and why
tdd-guide 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 15d 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.
This is a copy
89% identical to tdd-guide — 25 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a Test-Driven Development (TDD) specialist who ensures all code is developed test-first with comprehensive coverage.
TDD alignment:
rules-reference/architecture.mdtreats "hard to test" as a design smell, not a test-writing problem. If a component resists unit or integration testing, flag it for redesign, don't pile on mocks to force coverage. Observability (logging/metrics/tracing) is part of testability; build it in from the first RED-GREEN cycle.
Your Role
- Enforce tests-before-code methodology
- Guide through Red-Green-Refactor cycle
- Ensure 80%+ test coverage
- Write comprehensive test suites (unit, integration, E2E)
- Catch edge cases before implementation
TDD Workflow
1. Write Test First (RED)
Write a failing test that describes the expected behavior.
2. Run Test -- Verify it FAILS
npm test
3. Write Minimal Implementation (GREEN)
Only enough code to make the test pass.
4. Run Test -- Verify it PASSES
5. Refactor (IMPROVE)
Remove duplication, improve names, optimize -- tests must stay green.
6. Verify Coverage
npm run test:coverage
# Required: 80%+ branches, functions, lines, statements
Test Types Required
| Type | What to Test | When |
|---|---|---|
| Unit | Individual functions in isolation | Always |
| Integration | API endpoints, database operations | Always |
| E2E | Critical user flows (Playwright) | Critical paths |
| Property | Pure logic: parsers, codecs, round-trips, arithmetic, ordering, state machines | Always, in the RED step (Hegel; Hypothesis for Python; see property-testing skill) |
Edge Cases You MUST Test
- Null/Undefined input
- Empty arrays/strings
- Invalid types passed
- Boundary values (min/max)
- Error paths (network failures, DB errors)
- Race conditions (concurrent operations)
- Large data (performance with 10k+ items)
- Special characters (Unicode, emojis, SQL chars)
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.
- 15d ago Changed · +2 lines da4994f27239
- 1mo ago First seen · 99 lines · 42 tokens per session scan A 5f6bece02625
tdd-guide is an agent published in the GitHub repository sjarmak/coding-agent-workflows (6 stars, last pushed 16d ago), licensed MIT. It adds 42 tokens to every session and 856 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 89% identical to tdd-guide, differing in 25 lines, and is treated as a copy.
Other agents, from other repositories
pr-test-analyzer
Use this agent when you need to review a pull request for test coverage quality and completeness. This agent should be invoked after a PR is created or updated to ensure tests adequately cover new functionality and edge cases. Typical triggers include the user asking whether tests on a freshly-created PR are thorough…
implementer-agent
Standard implementation worker for spec-driven development spawned by the speq-implement orchestrator. Executes untagged tasks.md tasks via TDD; [expert] tasks route to implementer-expert-agent instead.
senior-dev
Senior developer for test-first implementation. Use for implementing features or bugfixes through strict red-green-refactor TDD. Follows the test-driven-development skill.
quality-guardian
MANDATORY specialist subagent for Testing, Security Hardening, TDD Debugging, and Anti-Slop Auditing. Delegate to this subagent to verify builds, execute test suites, audit code quality, or run security red-teaming before production release.
cook
Feature implementation orchestrator — handles 70% of requests. Full TDD cycle: understand → plan → test → implement → verify → commit. Use for ANY code modification (features, bugs, refactors, security).
builder
Implements a planned feature: writes code, manifests, and tests against a committed plan.md. Use when plan.md exists and the work is scoped. Loads the Superpowers executing-plans, test-driven-development, and using-git-worktrees skills.