test-planner

Generate Markdown test plans and Vitest test files from design documents or source code.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/linzb93/cli-tools --skill test-planner-linzb93
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-planner
Source: https://github.com/linzb93/cli-tools/tree/main/.trae/skills/test-planner
Command: npx skills add https://github.com/linzb93/cli-tools --skill test-planner-linzb93

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The test-planner skill removes the effort and guesswork of designing comprehensive tests for CLI commands and business modules by analyzing design documents and source code to produce actionable test plans and executable Vitest test files.

Core Features & Use Cases

  • Design-driven analysis: Prioritizes docs/implement.md when present to infer intended behavior and business rules.
  • Code-aware planning: Falls back to index.ts or other source files for static analysis to identify branches, edge cases, and error paths.
  • Test plan generation: Produces a structured Markdown test plan covering happy paths, edge cases, and error handling.
  • Test code output: Generates Vitest-compliant tests/index.test.ts files using AAA patterns and vi.mock for external dependencies.
  • Refactor suggestions: Recommends exporting private functions or splitting large functions to improve testability when needed.

Quick Start

Ask the skill to analyze a command or module by providing its design document or source files and request a test plan plus Vitest test file generation.

Frequently Asked Questions about test-planner

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

FAQPage Schema
How do I generate a Vitest test plan for CLI modules?

Generate a Vitest test plan for CLI modules by providing design documents or source files like index.ts. The tool analyzes branches and edge cases to output a structured Markdown test plan and executable test files.

What is the AAA pattern in unit testing and how is it applied?

The AAA pattern in unit testing structures code into Arrange, Act, and Assert blocks. This tool applies AAA patterns to generate structured Vitest test files for CLI commands and business modules.

Can I generate test cases from source code when design documents are missing?

You can generate test cases from source code when design documents are missing. The tool falls back to static analysis of index.ts or other files to identify branches, edge cases, and error paths.

How do I improve testability when planning tests for large functions?

Improve testability for large functions by exporting private functions or splitting them into smaller units. The tool provides refactoring suggestions to enhance test coverage when analyzing source code.

Does the generated Vitest test file handle external dependencies?

The generated Vitest test file handles external dependencies using vi.mock. This ensures modules are isolated during execution by mocking external calls within the AAA pattern test structure.

Why do I need a test plan before generating unit tests?

A test plan structures your testing strategy by defining happy paths, edge cases, and error handling before code generation. The tool outputs a Markdown test plan for confirmation to ensure comprehensive coverage.