write-tests

Generate automated test suites for functions, APIs, and modules.

9|3|Updated Jun 13, 2026
One-click install
npx skills add https://github.com/Sir-chawakorn/sanook-cli --skill write-tests-sir-chawakorn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-tests
Source: https://github.com/Sir-chawakorn/sanook-cli/tree/main/skills/write-tests
Command: npx skills add https://github.com/Sir-chawakorn/sanook-cli --skill write-tests-sir-chawakorn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the friction of writing boilerplate tests and the tendency to skip TDD, ensuring that new features and bug fixes are backed by robust, contract-verified automated tests.

Core Features & Use Cases

  • TDD-First Generation: Automatically scaffolds tests based on clear function contracts and edge cases.
  • Regression Prevention: Reproduces reported bugs as failing tests before implementation.
  • Use Case: When building a new API endpoint, use this skill to define the input/output contract and generate the corresponding test suite before writing the actual endpoint logic.

Quick Start

Use the write-tests skill to generate a comprehensive test suite for the new user authentication module based on the provided function signature and edge cases.

Frequently Asked Questions about write-tests

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

FAQPage Schema
How do I automate test generation for a new API endpoint using TDD?

Automated test generation using TDD scaffolds test suites by defining input/output contracts and edge cases before writing endpoint logic. This approach enforces specification adherence and creates corresponding tests for functions and APIs to prevent regressions.

Does automated TDD test generation work with Pytest and Vitest?

Automated TDD test generation requires integration with existing project test runners like Jest, Vitest, or Pytest. This ensures seamless execution and reporting within your established software development workflows.

What is the best way to reproduce reported bugs as failing tests?

The best way to reproduce reported bugs as failing tests is through contract-based validation that enforces TDD principles. It reproduces the bug as a failing test before implementation, ensuring regression prevention and clear specification adherence.

Can I generate unit tests based on function signatures and edge cases?

Yes, you can generate unit tests based on function signatures and edge cases. The TDD-first generation automatically scaffolds comprehensive test suites for modules by enforcing contract-based validation and covering specified input boundaries.

Why should I enforce contract-based validation for unit testing coverage?

Enforcing contract-based validation for unit testing coverage ensures new features and bug fixes are backed by robust, verified automated tests. It eliminates boilerplate test writing friction and prevents skipping TDD in software development workflows.