Agent skill · Testing & QA

code-sample-validator

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.

a5c-aigithub.com/a5c-aiGitHub ↗
claude-codecodexcan modify filesMIT
Install
npx skills add a5c-ai/babysitter --skill code-sample-validator --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 11 KB
Bundled scripts: none
Version: 1.0.0
Declared author: babysitter-sdk
Allowed tools: ReadWriteEditBashGlobGrep
Path: library/specializations/technical-documentation/skills/code-sample-validator/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 1,642
Language: JavaScript

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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",

What's inside
Steps it walks through
  1. Capabilities
  2. Usage
  3. Inputs
  4. Input Example
  5. Output Structure
  6. Validation Report
  7. Code Extraction
  8. Markdown Code Block Patterns
  9. Extraction Configuration
  10. Language-Specific Validation
  11. JavaScript/TypeScript
  12. Python
  13. Go
  14. Test Generation
Ships with 1 file
  • README.md
Commands it runs
Validate all samples
node scripts/validate-docs.js --input docs/
Extract and save runnable code
node scripts/validate-docs.js --input docs/ --action extract --output tests/samples/
Generate test files
node scripts/validate-docs.js --input docs/ --action generate-tests --output tests/docs/
Check formatting only
node scripts/validate-docs.js --input docs/ --action format-check
More from babysitter
All skills →
About this skill
What does the code-sample-validator skill do?

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.

How do I install it?

Run `npx skills add a5c-ai/babysitter --skill code-sample-validator --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From a5c-ai/babysitter, a repository with 1,642 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going