spec-driven-tests

Translate design specs and PRDs into deterministic unit tests.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/ElvinOuyang/claude-skill-collection --skill spec-driven-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spec-driven-tests
Source: https://github.com/ElvinOuyang/claude-skill-collection/tree/main/plugins/ai-dev-toolkit/skills/spec-driven-tests
Command: npx skills add https://github.com/ElvinOuyang/claude-skill-collection --skill spec-driven-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you convert design specs, PRDs, and implementation plans into deterministic unit tests so quality is enforced by CI instead of reviews or guesswork.

Core Features & Use Cases

  • Spec-to-test traceability: Builds a gap table that maps each spec requirement to an expected test and priority.
  • Deterministic unit testing guidance: Focuses on red-green-refactor cycles, testing behavior (not AI output), and mocking only external dependencies.
  • Coverage validation and documentation updates: Cross-checks each test against the spec and updates counts and coverage notes after passing.

Quick Start

Tell it to generate a spec-aligned test plan and unit tests for the behaviors described in your PRD, based on the current test framework and existing test suite.

Frequently Asked Questions about spec-driven-tests

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

FAQPage Schema
How do I generate unit tests from a PRD or design spec?

To generate unit tests from a PRD, translate requirements into deterministic tests using a spec-to-test gap table mapping each requirement to expected tests and priorities for CI quality gating.

What is spec-to-test traceability in unit testing?

Spec-to-test traceability in unit testing maps each specification requirement to an expected test and priority, ensuring application behavior matches design specs and identifying spec gaps across components and routing wiring.

How do I set up CI quality gates for TDD workflows?

Set up CI quality gates for TDD workflows by enforcing red-green-refactor cycles, cross-checking passing tests against the spec, and updating coverage notes to gate quality instead of relying on manual reviews.

Can I test non-deterministic AI output and CSS browser behaviors with unit tests?

You cannot test non-deterministic AI output and CSS browser-only behaviors with unit tests; focus on deterministic unit testing by mocking external dependencies and testing behavior rather than unpredictable outputs.

Does spec-driven testing work with existing test frameworks and suites?

Spec-driven testing works with existing test frameworks and suites by generating a spec-aligned test plan based on your current framework, validating coverage, and updating documentation after tests pass.

Why are my unit tests not aligned with my implementation plan?

Unit tests are not aligned with implementation plans when spec gaps exist across components and services; build a coverage gap table to map requirements to expected tests and prioritize missing coverage.