code-sample-validator

Solid

Extract, validate, and test code samples in documentation. Verify syntax, execute samples, check outputs, validate imports, and ensure code samples are up-to-date with current APIs.

AI & Automation 814 stars 53 forks Updated today MIT

Install

View on GitHub

Quality Score: 98/100

Stars 20%
97
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Code Sample Validation Skill Extract, validate, and test code samples in documentation. ## Capabilities - Extract code blocks from Markdown/MDX - Syntax validation for multiple languages - Execute and verify code sample output - Snippet compilation testing - Version compatibility checking - Import/dependency verification - Code formatting validation (prettier, black) - Generate runnable code from documentation ## Usage Invoke this skill when you need to: - Validate code samples in documentation - Test code examples execute correctly - Check for outdated API usage - Verify import statements - Generate test files from documentation ## Inputs | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | inputPath | string | Yes | Path to documentation file or directory | | action | string | Yes | extract, validate, execute, format | | languages | array | No | Filter by language (js, python, etc.) | | outputDir | string | No | Directory for extracted runnable code | | timeout | number | No | Execution timeout in seconds | | config | object | No | Language-specific configuration | ### Input Example ```json { "inputPath": "./docs", "action": "validate", "languages": ["javascript", "python"], "timeout": 30 } ``` ## Output Structure ### Validation Report ```json { "summary": { "total": 45, "passed": 42, "failed": 2, "skipped": 1 }, "files": [ { "file": "docs/quickstart.md", "samples": [ ...

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Related Skills