Skip to content
Back to skills

Tdd

ASecurity

Implement behavior test-first with a red-green feedback loop. Use for explicit TDD requests or feature/bug work that needs meaningful behavioral regression coverage. Do not route reversible copy, formatting, or low-impact edits here merely because they change code.

  • 4 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 19, 2026
ai-agentsgotestingdocumentation

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned November 19, 2026

npx -y skills add AnonymXXX/agent-harness-engineering --skill tdd --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tdd?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tdd
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anonymxxx-tdd/badge)](https://www.skillsdirectory.com/skills/anonymxxx-tdd)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: tdd
description: Implement behavior test-first with a red-green feedback loop. Use for explicit TDD requests or feature/bug work that needs meaningful behavioral regression coverage. Do not route reversible copy, formatting, or low-impact edits here merely because they change code.
---

# Test-Driven Development

Use red -> green feedback to build one vertical behavior slice at a time.

## Before Writing Tests

- Explore existing tests, package scripts, and validation commands.
- Read project docs and `AGENTS.md` for testing conventions.
- Identify the public seam under test. Prefer the highest existing seam that observes user-visible behavior.
- Confirm the seam when it is ambiguous or costly to change.
- Do not test private methods, internal collaborators, or implementation details unless the project explicitly treats them as public seams.

## Loop

1. Write one failing test for one behavior.
2. Run the smallest relevant test command and confirm it fails for the expected reason.
3. Implement only enough code to pass.
4. Re-run the focused test.
5. Repeat for the next behavior.
6. Run other project-required checks relevant to the changed surface. Broaden or repeat passing checks only for new changes, failures, or unresolved risks.

## Test Quality

- Expected values must come from a spec, worked example, fixture, or known-good literal, not from recomputing the implementation.
- Avoid tautological tests and snapshots that only freeze incidental structure.
- Prefer behavior tests through public interfaces over mocks of internal calls.
- Keep tests stable across refactors that preserve behavior.

## Harness Duties

- Apply the Harness Capture Gate before documenting a discovered rule; consult `domain-modeling` only for a material terminology or invariant decision.
- If the rule is mechanically checkable, add or update a deterministic test/script/lint/CI check when appropriate.
- For medium or large edits, follow the user's risk-based worktree and documentation workflow before implementation.

Files in this skill

  • LICENSE.txt1.1 KB
  • SKILL.md2 KB
  • agents/openai.yaml168 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.