agentsclimarketplace

TDD

Skill mj-deving/pai-skills/skills/TDD

Curated, sanitized export of 21 agent-skill packages for Claude Code and Codex, gated by an automated publication audit (no secrets, no local paths).

Install
npx -y skills add mj-deving/pai-skills --skill TDD

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Test-driven development — RED/GREEN/REFACTOR cycle, Prove-It Pattern for bugs, test pyramid, coverage strategy. USE WHEN writing tests, TDD, test strategy, prove-it pattern, test pyramid, bug fix testing, test coverage, test-first, write tests, add tests, test plan, testing approach, regression test, coverage checklist.

SKILL.md

4.6 KB, as published. Nobody here has run it

TDD

Test-driven development skill. Ensures code is written test-first with proper coverage strategy, structured test patterns, and the Prove-It Pattern for bug fixes.

Customization

Before executing, check for user customizations at: ${PAI_USER_DIR}/SKILLCUSTOMIZATIONS/TDD/

<!-- ## Voice Notification ```bash curl -s -X POST http://localhost:8888/notify \ -H "Content-Type: application/json" \ -d '{"message": "Running WORKFLOWNAME in TDD to ACTION"}' \ > /dev/null 2>&1 & ``` -->

Workflow Routing

WorkflowTriggerFile
TestFirst"write tests", "TDD", "test-first", "add tests"Workflows/TestFirst.md
ProveIt"prove-it", "bug fix test", "regression test", "reproduce bug"Workflows/ProveIt.md
TestStrategy"test plan", "test strategy", "coverage plan", "test pyramid"Workflows/TestStrategy.md
APITesting"API testing", "Hurl", "httpx", "endpoint testing", "API assertions", "probe endpoints"APITesting/SKILL.md

Quick Reference

The Cycle: RED (write failing test) → GREEN (minimal code to pass) → REFACTOR (clean up, tests stay green)

The Pyramid: ~80% unit, ~15% integration, ~5% e2e

The Prove-It Pattern: For bugs — write a failing test that proves the bug exists, then fix it. The test is your proof.

The Rule: "A codebase with good tests is an AI agent's superpower; a codebase without tests is a liability."

Core Principles

  • Test behavior, not implementation — assert on outcomes, not internal state
  • Each test verifies one concept — if it fails, you know exactly what broke
  • Tests must be independent — no shared mutable state between tests
  • Mock only at system boundaries — databases, networks, external APIs. Not internal modules.
  • A test that never fails is as useless as one that always fails

Test Structure: Arrange-Act-Assert

test('should mark task complete when toggled', () => {
  // Arrange — set up preconditions
  const task = createTask({ title: 'Buy groceries', done: false });

  // Act — perform the action
  const result = toggleTask(task);

  // Assert — verify the outcome
  expect(result.done).toBe(true);
});

Test Naming

Names should read like specifications:

"[unit] [expected behavior] [condition]"

✓ "toggleTask marks task as done when currently undone"
✓ "parseDate throws on invalid ISO string"
✓ "fetchUser returns null when user not found"

✗ "test1"
✗ "it works"
✗ "toggleTask test"

Coverage Checklist

For every function/component, ensure tests cover:

  • Happy path — normal expected usage
  • Empty/null inputs — edge case handling
  • Boundary conditions — min/max values, off-by-one
  • Error handling — what happens when things fail
  • Concurrency (if applicable) — race conditions, parallel execution

Anti-Patterns

Anti-PatternProblemFix
Testing implementation detailsBreaks on refactor even when behavior unchangedAssert on outputs and side effects
Snapshot overuseTests pass with --update without reviewUse targeted assertions
Shared mutable stateTests interfere with each otherFresh setup per test
Mocking everythingTests pass but production breaksMock only at system boundaries
Testing framework codeWastes time verifying third-party libraryTest YOUR logic only
test.skip permanentlyHidden debt that never gets addressedFix or delete, don't skip

Examples

Example 1: New feature with TDD

User: "Add email validation to the signup form"
→ Invokes TestFirst workflow
→ Write failing tests for valid/invalid emails
→ Implement validation until tests pass
→ Refactor for clarity

Example 2: Bug fix with Prove-It

User: "Users can submit empty titles — fix it"
→ Invokes ProveIt workflow
→ Write test: submit with empty title → expect rejection
→ Verify test fails (confirming the bug)
→ Add validation → verify test passes

Example 3: Test strategy for a new module

User: "Plan the testing approach for the auth module"
→ Invokes TestStrategy workflow
→ Analyze module boundaries, external deps, critical paths
→ Produce test plan with pyramid ratios and priorities

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.