add-unit-tests

Generate failing unit tests from feature requirements in Markdown, tickets, or designs.

5|2|Updated Dec 11, 2025
One-click install
npx skills add https://github.com/thoreinstein/opencode-config --skill add-unit-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-unit-tests
Source: https://github.com/thoreinstein/opencode-config/tree/main/skill/add-unit-tests
Command: npx skills add https://github.com/thoreinstein/opencode-config --skill add-unit-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Write failing unit tests for feature requirements to drive implementation in a disciplined TDD workflow. This skill helps teams specify expected behavior by generating tests that initially fail, ensuring new features are implemented to meet requirements.

Core Features & Use Cases

  • Generate unit tests from feature requirements written in Markdown, tickets, or design docs.
  • Cover happy paths, edge cases, and error conditions to validate behavior before coding.
  • Integrate with existing test suites and produce test files ready to drop into a repository without altering production code.

Quick Start

Use the add-unit-tests skill to generate failing unit tests from the provided feature requirements.

Frequently Asked Questions about add-unit-tests

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

FAQPage Schema
How do I generate unit tests from feature requirements written in Markdown?

To generate unit tests from Markdown specs, the skill analyzes your feature requirements and produces failing test cases covering happy paths, edge cases, and error handling. It outputs files ready to run against your current implementation.

What is the best way to write failing unit tests for TDD?

The best way to write failing unit tests for TDD is to derive them directly from feature requirements. This skill generates tests that initially fail, driving disciplined implementation to meet expected behaviors defined in your tickets or designs.

Can I generate test cases for edge cases and error handling automatically?

Yes, you can generate test cases for edge cases and error handling automatically. The skill parses your design docs or tickets to validate behavior before coding, outputting comprehensive tests that target both typical and exceptional conditions.

Does the generated test code adhere to existing project conventions?

Yes, the generated test code adheres to existing project conventions. It integrates directly with your current test suite and produces test files in the target language that are ready to run against your current implementation without modifying production code.

How do I drive feature implementation using failing tests?

You drive feature implementation by running generated failing tests against your codebase. The tests specify expected behavior from your requirements, failing initially and guiding your development until the new feature implementation makes them pass.