extract-examples

Official

Extracts and validates code examples from docs.

Authorhashicorp
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill automates the extraction, validation, and export of code examples from documentation, reducing manual effort and ensuring consistency across docs.

Core Features & Use Cases

  • Code Block Discovery and Extraction: scans Markdown/MDX docs for fenced code blocks and captures language and content.
  • Syntax Validation and Quality Checks: validates HCL/Terraform, YAML, JSON, and Shell syntax, and flags placeholders or incomplete examples.
  • Export and Testing Readiness: exports runnable samples organized by language and optionally generates test harnesses for CI workflows.

Quick Start

Run the extraction on your docs to pull code examples and prepare them for validation and export: /extract-examples docs/**/*.mdx --validate --export /tmp/examples/

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: extract-examples
Download link: https://github.com/hashicorp/web-unified-docs/archive/main.zip#extract-examples

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.