Install
Install with PiG
pig install npm:@igor-guari/pi-skill-tddInstall with Pi
pi install npm:@igor-guari/pi-skill-tddPackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"skills": [
"."
]
}README
Written by the package's publisher, shown as published in version 1.0.0 (README.md). PiG does not review it.
pi-skill-tdd
Test-Driven Development (TDD) skill for the Pi coding agent, adapted from Matt Pocock's Engineering Skills.
This skill equips Pi with guidelines for the red → green loop: defining public seams, vertical slicing, avoiding tautological or implementation-coupled tests, and establishing disciplined testing habits.
Installation
Install directly into Pi using pi install:
pi install git:github.com/IgorGuariroba/pi-skill-tdd
Or clone into your local/global skills directory:
# Global Pi skills directory:
git clone https://github.com/IgorGuariroba/pi-skill-tdd.git ~/.pi/agent/skills/tdd
# Or Agent Skills standard path:
git clone https://github.com/IgorGuariroba/pi-skill-tdd.git ~/.agents/skills/tdd
How It Works
Pi automatically activates the skill when you ask to build features or fix bugs test-first, mention "red-green-refactor", or work with integration tests.
You can also trigger it explicitly:
/skill:tdd
Core Principles
- Seam-based testing: Test only against pre-agreed public boundaries, never internals.
- Vertical slices (tracer bullets): One test → one minimal implementation → repeat. Never write speculative tests in bulk.
- Anti-pattern guards: Eliminates tautological assertions and implementation coupling.
- Mocking at system boundaries only: Guidelines for external APIs, clocks, and databases while keeping application code real.
Supporting References
tests.md: Concrete examples of good integration-style tests vs. brittle implementation-detail tests.mocking.md: Clear guidelines on when to mock (system boundaries) and how to design for mockability using dependency injection and SDK interfaces.
Credits
- Original concept & methodology: Matt Pocock
- Adapted for Pi Agent: Igor Guariroba