test-writer

Generate Vitest unit tests for JavaScript code examples in Markdown documentation.

Updated Jan 6, 2026
One-click install
npx skills add https://github.com/figuedmundo/mamirri-app --skill test-writer-figuedmundo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-writer
Source: https://github.com/figuedmundo/mamirri-app/tree/main/.opencode/skill/test-writer
Command: npx skills add https://github.com/figuedmundo/mamirri-app --skill test-writer-figuedmundo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the creation of comprehensive Vitest tests for code examples found within documentation pages, ensuring code accuracy and preventing regressions.

Core Features & Use Cases

  • Automated Test Generation: Converts documentation code snippets into executable Vitest tests.
  • Convention Adherence: Follows project-specific testing patterns and structures.
  • Use Case: After writing a new JavaScript concept page with several code examples, use this Skill to generate all the necessary unit tests, saving significant developer time and ensuring the examples remain functional.

Quick Start

Use the test-writer skill to generate Vitest tests for the code examples in the file '/docs/concepts/primitive-types.mdx'.

Frequently Asked Questions about test-writer

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

FAQPage Schema
How do I generate Vitest tests for JavaScript code examples in Markdown documentation?

Generating Vitest tests for Markdown documentation involves converting embedded JavaScript code snippets into executable unit tests. This ensures documentation accuracy and prevents code regressions by automating test creation and adhering to project-specific conventions.

What is the best way to automate test creation for code snippets in MDX files?

Automating test creation for code snippets in MDX files involves parsing the documentation to extract JavaScript examples and generating Vitest test suites. This approach analyzes the snippets for testability and error conditions to produce comprehensive, convention-adherent tests.

Can I automatically check if the JavaScript examples in my documentation are testable?

Yes, you can automatically check if JavaScript examples in documentation are testable by analyzing the code snippets for DOM interactions and error conditions. This analysis generates accurate and comprehensive Vitest test suites that validate the functionality of the examples.

Does automated Vitest test generation follow project-specific file structure and naming conventions?

Automated Vitest test generation adheres to project-specific testing patterns by following established conventions for file structure, naming, and assertion patterns. This ensures the generated unit tests integrate seamlessly with existing project configurations.

How do I ensure my documentation code examples do not break during future updates?

To ensure documentation code examples do not break during future updates, you can generate executable Vitest unit tests for the snippets. Automating this process validates the functionality of the examples and prevents regressions as the codebase evolves.