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 skills add helmedeiros/clean-code-skills --skill tdd-arrange-act-assertgit clone --depth 1 https://github.com/helmedeiros/clean-code-skillsWrote 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/helmedeiros/clean-code-skills/tdd-arrange-act-assert)<a href="https://agentmods.dev/skills/helmedeiros/clean-code-skills/tdd-arrange-act-assert"><img src="https://agentmods.dev/badge/skills/helmedeiros/clean-code-skills/tdd-arrange-act-assert/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/skills/helmedeiros/clean-code-skills/tdd-arrange-act-assert"><img src="https://agentmods.dev/badge/skills/helmedeiros/clean-code-skills/tdd-arrange-act-assert.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.00055 | $0.00734 |
| Opus 5 | $0.00028 | $0.00367 |
| Sonnet 5 | $0.00011 | $0.00147 |
| Haiku 4.5 | $0.00006 | $0.00073 |
Grade A, and why
tdd-arrange-act-assert 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 9d 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 — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TDD: Arrange-Act-Assert Pattern
Structure every test into three distinct phases — setup, execution, and verification — to make tests readable, consistent, and maintainable.
When This Skill Applies
- Writing new tests for any behavior
- Reviewing or refactoring existing tests
- The user mentions AAA, Arrange-Act-Assert, or Given-When-Then
- Tests are hard to read or have unclear intent
- Tests mix setup, execution, and assertions
Core Principle
Every test tells a story in three acts: Arrange the context, Act on the system under test, Assert the expected outcome. Separating these phases makes tests self-documenting. A reader should understand the scenario, the trigger, and the expected result at a glance.
Workflow
Step 1: Arrange — Set Up the Context
Create the objects, data, and dependencies needed for the test. Use descriptive variable names that communicate intent. Keep the setup minimal — only include what is relevant to this specific behavior.
Step 2: Act — Execute the Behavior
Call the method or trigger the action under test. This should be a single logical operation. If you need multiple calls, consider whether you are testing multiple behaviors.
Step 3: Assert — Verify the Outcome
Check that the result matches the expected behavior. Prefer one logical assertion per test. If you need multiple assertions, ensure they all verify the same behavior from different angles.
Detection / Indicators
- Tests with no clear separation between setup, action, and verification
- Assertions scattered throughout the test body
- Setup code duplicated across many tests (extract to helper or beforeEach)
- Tests that perform multiple actions before asserting
- Test names that do not describe the scenario
Transformation Pattern
Before (unstructured test):
test('user') {
db.insert({name: 'Alice', role: 'admin'})
const u = service.getUser('Alice')
expect(u).toBeTruthy()
expect(u.role).toBe('admin')
service.promote(u)
expect(u.role).toBe('superadmin')
}
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 9d ago First seen · 88 lines · 55 tokens per session scan A bfd7750e988e
tdd-arrange-act-assert is a skill published in the GitHub repository helmedeiros/clean-code-skills (2 stars, last pushed 6mo ago), licensed MIT. It adds 55 tokens to every session and 734 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
maven
Always load this skill when a pom.xml file exists in the project, when creating or editing a pom.xml, or when setting up Maven project structure in a new project. It provides Maven-specific conventions for running tests, building, managing dependencies, and project structure.
nested-fixture-pattern
This skill should be used when working on Java projects with JUnit tests that have layered preconditions, expensive shared setup (servers, databases, provisioned users), or complex scenario trees. Trigger phrases include "nested fixture", "fixture pattern", "scenario tree", "layered test setup", or when the user is…
app
This skill should be used when the user asks to "calculate code mass", "measure code complexity with APP", "compare implementations using APP", "apply Absolute Priority Premise", "use mass calculations", or during TDD refactor phases when comparing alternative implementations. Based on Micah Martin's work.
clean-code
This skill should be used when the user asks to "refactor code", "review code quality", "apply clean code principles", "check for code smells", "improve code design", "do a clean code review", "apply SOLID principles", "fix naming", "reduce complexity", or when performing the refactor phase of a TDD cycle.
tdd
This skill should be used when the user asks to "add a feature using TDD", "fix a bug with TDD", "do TDD", "red-green-refactor", "write a failing test first", "use test-driven development", "start TDD", "test first approach", "TDD loop", "TDD cycle", or mentions TDD workflow, baby steps, guessing game, or…
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code - write the test first, watch it fail, write minimal code to pass; ensures tests actually verify behavior by requiring failure first.