This automates the tedious work of writing Vitest tests for code examples in documentation. It scans your concept pages, extracts every console.log and return value, then generates proper test files with source line references and organized describe blocks. The four phase approach handles everything from basic assertions to DOM tests, async code, and intentional errors. It follows project conventions like putting fundamentals tests in one directory and advanced topics in another, naming DOM tests with .dom.test.js, and structuring describe blocks to mirror your documentation sections. Best for maintaining a docs site where you need confidence that every code snippet actually works as shown.

skills.sh installs
356
GitHub stars
66.5K
last updated
Aug 21, 2026

Install

$ npx -y skills add leonardomso/33-js-concepts --skill test-writer --agent claude-code

Installs into .claude/skills of the current project.

Files

Skill: Test Writer for Concept Pages

Use this skill to generate comprehensive Vitest tests for all code examples in a concept documentation page. Tests verify that code examples in the documentation are accurate and work as described.

When to Use

  • After writing a new concept page
  • When adding new code examples to existing pages
  • When updating existing code examples
  • To verify documentation accuracy through automated tests
  • Before publishing to ensure all examples work correctly

Test Writing Methodology

Follow these four phases to create comprehensive tests for a concept page.

Phase 1: Code Example Extraction

Scan the concept page for all code examples and categorize them:

Sponsors

Details

Repository
github.com/leonardomso/33-js-concepts
Categories
Testing & QA, Documentation
First seen
Jun 3, 2026

More from leonardomso/33-js-concepts

All 7
1proffesor-for-testing avatarregression-testingproffesor-for-testing/agentic-qeStrategic regression testing with test selection, impact analysis, and continuous regression management. Use when verifying fixes don't break existing functiona334skills.sh installs
2patricio0312rev avatarload-test-builderpatricio0312rev/skillsCreates load and performance tests with k6, Artillery, or autocannon to validate system behavior under stress. Use when users request "load testing", "performan328skills.sh installs
3tuist avataranalyze-selective-testingtuist/agent-skillsAnalyzes Xcode selective testing effectiveness for a test run, showing which test targets were skipped or ran, and diagnosing regressions in test selection. Can304skills.sh installs
4mastepanoski avatarowasp-ai-testingmastepanoski/claude-skillsAI trustworthiness testing using OWASP AI Testing Guide v1. Execute 32 test cases across 4 layers (Application, Model, Infrastructure, Data) with practical payl245skills.sh installs
5charleswiltgen avataraxiom-ios-testingcharleswiltgen/axiomUse when writing ANY test, debugging flaky tests, making tests faster, or asking about Swift Testing vs XCTest. Covers unit tests, UI tests, fast tests without 238skills.sh installs
6longbridge avatargpui-testlongbridge/gpui-componentWriting tests for GPUI applications. Use when testing components, async operations, or UI behavior.223skills.sh installs