← Catalog

@igor-guari/pi-skill-tdd

Test-Driven Development skill for Pi Agent (adapted from Matt Pocock's Engineering Skills)

Skill

Install

Install with PiG

pig install npm:@igor-guari/pi-skill-tdd

Install with Pi

pi install npm:@igor-guari/pi-skill-tdd
Review before installing

Packages 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

Pi Package License: MIT

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

  1. Seam-based testing: Test only against pre-agreed public boundaries, never internals.
  2. Vertical slices (tracer bullets): One test → one minimal implementation → repeat. Never write speculative tests in bulk.
  3. Anti-pattern guards: Eliminates tautological assertions and implementation coupling.
  4. 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


License

MIT