write-unit-test

Generate deterministic Vitest tests from PreDB/PostDB functional specifications.

Updated Oct 29, 2025
One-click install
npx skills add https://github.com/coeus-ventures/epic-web --skill write-unit-test
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-unit-test
Source: https://github.com/coeus-ventures/epic-web/tree/main/.claude/skills/write-unit-test
Command: npx skills add https://github.com/coeus-ventures/epic-web --skill write-unit-test

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convert functional specifications into executable unit tests using the PreDB/PostDB pattern, enabling test-driven development from structured specs.

Core Features & Use Cases

  • Automates translation of PreDB/Workflow/PostDB specs into Vitest test files
  • Supports multi-table scenarios with clear PreDB and PostDB state definitions
  • Documents the test contract and provides a deterministic, reusable testing workflow

Quick Start

Provide a functional specification in PreDB/Workflow/PostDB format and I will generate executable Vitest tests.

Frequently Asked Questions about write-unit-test

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

FAQPage Schema
How do I generate Vitest unit tests from functional specifications?

Generating Vitest unit tests from functional specifications requires translating PreDB, Workflow, and PostDB definitions into deterministic test files. This process automates scaffolding and documents the test contract.

What is the PreDB PostDB pattern in database testing?

The PreDB PostDB pattern in database testing defines database state before and after workflow execution. It enables deterministic unit tests by explicitly mapping multi-table state changes to verify functional specs.

How do I apply test-driven development to multi-table database workflows?

Applying test-driven development to multi-table database workflows involves mapping PreDB and PostDB states to Vitest specs. This approach translates functional specifications into executable tests covering runtime placeholder values.

Can I use Vitest to test runtime placeholder values in functional specs?

Yes, you can use Vitest to test runtime placeholder values by translating functional specifications into executable tests. The process scaffolds test files and documents the test contracts for deterministic execution.

Does this approach to spec-to-test translation support multi-table scenarios?

Spec-to-test translation supports multi-table scenarios by defining clear PreDB and PostDB states. It converts structured functional specifications into reusable Vitest test files for test-driven development.

What are the limitations of automatic test file scaffolding from specs?

Automatic test file scaffolding from specs requires structured PreDB, Workflow, and PostDB inputs. It is limited to generating deterministic Vitest tests and documenting test contracts for the provided functional specifications.