code-review

Validate Terraform, Packer, Vault, Nomad, and Consul code blocks in Markdown/MDX documentation.

78|252|Updated Feb 7, 2024
One-click install
npx skills add https://github.com/hashicorp/web-unified-docs --skill code-review-hashicorp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-review
Source: https://github.com/hashicorp/web-unified-docs/tree/main/content/well-architected-framework/docs/.claude/skills/code-review
Command: npx skills add https://github.com/hashicorp/web-unified-docs --skill code-review-hashicorp

SYSTEM DOCUMENTATION & REQUIREMENTS

## What problem does it solve? This Skill validates code blocks in documentation by applying language-aware formatters and validators, ensuring examples remain correct and publish-ready, reducing validation toil for engineers and writers.

## Core Features & Use Cases

  • Extracts code blocks from Markdown/MDX documentation.
  • Applies language-appropriate tooling (Terraform fmt, Packer fmt, Vault policy fmt, Nomad fmt, Consul validate) to verify syntax and style.
  • Produces a validation report and, with a --fix option, can auto-format code blocks; supports documenting when code cannot be validated in isolation.

### Quick Start Use the code-review skill to validate docs for issues: /code-review docs/**/*.mdx

Frequently Asked Questions about code-review

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

FAQPage Schema
How do I validate Terraform code blocks in Markdown documentation?

Validate Terraform code blocks in Markdown by running language-aware formatters like terraform fmt to verify syntax and style, ensuring documentation examples remain correct and publish-ready.

Can I auto-format Packer code blocks in MDX files?

Yes, you can auto-format Packer code blocks in MDX files by running packer fmt with a --fix option, which automatically updates the code blocks to correct syntax and formatting issues.

Does the documentation validation tool support Consul and Nomad configurations?

Yes, documentation validation supports Consul configurations and Nomad jobs by applying specific validators like consul validate and nomad fmt to check syntax and style within Markdown files.

What do I need to run automated documentation code block validation?

You need Bash tool access to run language-specific formatters and validators such as terraform fmt and packer fmt, along with the required tools installed to reproduce validation results accurately.

How do I handle documentation code blocks that cannot be validated in isolation?

For code blocks that cannot be validated in isolation, the validation process supports documenting these exceptions, allowing you to explicitly record when a code snippet bypasses automated syntax checks.