tdd
Guide TDD with Red-Green-Refactor
Test-first work often becomes brittle when teams test internals or write too many tests upfront. This skill guides Codex, Claude, and Claude Code through behavior-focused red-green-refactor cycles.
Install with my Agent
Copy this request to your Agent. It includes the canonical Skill page and manifest.
Review the Skillstore skill "tdd" from https://skillstore.io/skills/mattpocock-tdd.md and its manifest at https://skillstore.io/api/skills/mattpocock-tdd/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.Your Agent should still show its plan and request any confirmation required by the security policy.
Agent-readable resources
Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.
Test it
Using "tdd". I need to add checkout discounts using TDD.
Expected outcome:
- A short plan for the public checkout behavior and test interface.
- One failing behavior test for a valid discount scenario.
- A minimal implementation step followed by a refactor checklist.
Using "tdd". My tests break whenever I rename internal services.
Expected outcome:
- A diagnosis of implementation-detail assertions and internal mocks.
- Replacement test descriptions that verify observable behavior.
- Boundary recommendations for mocks only around external systems.
Using "tdd". Review this module before I write tests.
Expected outcome:
- Interface design feedback focused on dependency injection and return values.
- Suggested behaviors to prioritize for the first TDD cycles.
- Risks that should remain outside the initial test scope.
Security Audit
SafeAll static findings are false positives caused by markdown examples, code fences, or ordinary TDD prose. The skill contains guidance for behavior-focused testing and no executable scripts, prompt injection attempts, secret access, or network activity by the skill itself.
Risk Factors
โ๏ธ External commands (9)
๐ Network access (4)
๐ Env variables (2)
Share & cite this report
Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.
Copy report link
https://skillstore.io/skills/mattpocock-tdd/audits/4?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown badge
[](https://skillstore.io/skills/mattpocock-tdd?utm_source=security_passport_badge)HTML badge
<a href="https://skillstore.io/skills/mattpocock-tdd?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/mattpocock-tdd/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Embed card
<iframe src="https://skillstore.io/embed/skills/mattpocock-tdd.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Academic citations (APA ยท BibTeX ยท CFF)
APA citation
mattpocock. (2026). tdd security audit report (audit version 4) [Author version unspecified]. Skillstore. https://skillstore.io/skills/mattpocock-tdd/audits/4BibTeX citation
@techreport{mattpocock-mattpocock-tdd-2026,
author = {mattpocock},
title = {tdd security audit report (audit version 4)},
institution = {Skillstore},
year = {2026},
number = {4},
url = {https://skillstore.io/skills/mattpocock-tdd/audits/4},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "tdd security audit report (audit version 4)"
version: "unspecified"
type: report
authors:
- name: "mattpocock"
date-released: "2026-07-06"
url: "https://skillstore.io/skills/mattpocock-tdd/audits/4"
identifiers:
- type: other
value: "skillstore:mattpocock-tdd:audit:4"
description: "Skillstore immutable audit report identifier"
Compare variants
3 installable variantsEach author remains a separate installable skill. The recommended variant is ranked by Skillstore evidence.
Why this variant is first
mattpocock-tdd
2026-08-21
benny9193-tdd
2026-08-21
brianlovin-tdd
2026-08-21
Skillstore Score
Why this score Evidence Confidence: HighWhat You Can Build
Build a Feature Test First
Use the skill to define one public behavior, write a failing test, implement the minimum code, and repeat.
Repair Brittle Tests
Use the guidance to replace internal mocks and private method assertions with behavior-focused tests through public interfaces.
Review Testability Before Coding
Use the interface design checklist to reduce side effects, inject dependencies, and create simpler boundaries for reliable tests.
Try These Prompts
Use the tdd skill. Help me plan the public interface and the first behavior to test before writing implementation code.
Use the tdd skill. Write one behavior-focused failing test for this requirement, using the existing test framework and public APIs.
Use the tdd skill. The tests are green. Identify safe refactoring candidates and apply one small refactor at a time.
Use the tdd skill. Audit these brittle tests, identify implementation coupling, and propose behavior-focused replacements with better boundaries.
Best Practices
- Confirm the public interface and highest-value behaviors before writing tests.
- Write one failing test, implement only enough code to pass, then repeat.
- Mock only true system boundaries and keep tests focused on observable behavior.
Avoid
- Writing every planned test before implementing the first behavior.
- Mocking internal collaborators or asserting private implementation details.
- Refactoring while tests are still failing.
Frequently Asked Questions
What does this skill help with?
Does the skill execute tests?
What kind of tests does it prefer?
When should I mock dependencies?
Can it help refactor existing code?
Is it useful for bug fixes?
Developer Details
Author
mattpocockLicense
MIT
Skillstore revision
r1
Version notice
The author did not declare a version.
Ref
b8ca75d2c0a7e7102978993058777d82b8ab2610
Maintenance freshness
7/18/2026
Usage
5 downloads ยท 95 views
File structure
๐ deep-modules.md
๐ interface-design.md
๐ mocking.md
๐ refactoring.md
๐ SKILL.md
๐ tests.md