execute-spec

Implements approved SPEC documents using test-driven development with red-green-refactor cycles.

Updated Jul 21, 2026
One-click install
npx skills add https://github.com/afonsoft/gamehub --skill execute-spec-afonsoft
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: execute-spec
Source: https://github.com/afonsoft/gamehub/tree/main/.claude/skills/execute-spec
Command: npx skills add https://github.com/afonsoft/gamehub --skill execute-spec-afonsoft

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? It turns an approved SPEC SDD document into working code through disciplined test-driven development, ensuring every test maps to a numbered requirement or acceptance criterion instead of ad-hoc implementation. ## Core Features & Use Cases - SPEC-driven TDD loop: Reads .specs/SPEC-{YYYYMMDD}-{feature}.md files and executes one vertical slice per requirement (RF-###) or acceptance criterion (AC-###) using red-green-refactor cycles. - Spec validation script: Includes scripts/validate_spec.py to verify the SPEC file exists, has Approved status, and contains numbered requirements before execution begins. - Testing guidance references: Ships reference docs on mocking at system boundaries, testing public seams, refactoring candidates, deep modules, and interface design. - Use Case: A developer has an approved SPEC for a new checkout feature and asks the assistant to implement it; the skill writes one failing test per requirement, implements the minimum code to pass, refactors while green, and reports progress per slice in Portuguese. ## Quick Start Ask the assistant to execute the approved SPEC for your feature using test-driven development, for example by saying "run TDD from the spec for the checkout feature".

Frequently Asked Questions about execute-spec

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement a feature from a SPEC document using TDD?▼

Load the approved SPEC file, slice the work by its task plan, then run red-green-refactor cycles: write one failing test per requirement, write the minimum code to pass it, and refactor only while the suite is green. Re-run the full test suite after every slice.

What is the red-green-refactor cycle in test-driven development?▼

Red-green-refactor is a TDD loop where you first write one failing test (red), then write the minimum code to make it pass (green), then clean up duplication and naming while tests stay green (refactor). You never refactor while a test is red.

When should I mock dependencies in unit tests?▼

Mock only at system boundaries such as external APIs, payment providers, time, and randomness. Do not mock your own classes or internal collaborators; instead use dependency injection and SDK-style interfaces so each mock returns one specific shape.

Can I run execute-spec if the SPEC is still in Draft status?▼

No. The skill stops if the SPEC is missing or not marked Approved, and the validate_spec.py script exits with an error when the status is not Approved. You should produce or approve the SPEC first with the write-specs skill.

Why should tests target public interfaces instead of private methods?▼

Tests on public seams verify observable behavior that callers care about, so they survive internal refactors. Testing private methods or asserting on mock call counts couples tests to implementation details and breaks them during harmless restructuring.