spec-validate

Validate component specification files against JSON schema and structural rules.

2|5|Updated Oct 24, 2023
One-click install
npx skills add https://github.com/aziontech/webkit --skill spec-validate-aziontech
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: spec-validate
Source: https://github.com/aziontech/webkit/tree/main/.claude/skills/spec-validate
Command: npx skills add https://github.com/aziontech/webkit --skill spec-validate-aziontech

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ajv, sha256.

What problem does it solve?

spec-validate prevents invalid or incomplete component specs from triggering unreliable code generation, so teams avoid rework caused by malformed inputs.

Core Features & Use Cases

  • Schema validation: Ensures the spec frontmatter matches .specs/_schema.json via Ajv and fails fast on structural issues.
  • Body completeness checks: Verifies mandatory tables (Props, Events, Slots, Sub-components, Tokens) are present and not placeholder-only.
  • Design token integrity: Confirms every referenced "Token (DESIGN.md)" entry resolves to an allowed token definition in .claude/docs/DESIGN.md.
  • Constraints enforcement: Requires the "## Constraints — DO NOT" block and checks it contains the canonical template bullets verbatim.
  • Deterministic approval workflow: Computes a checksum for draft specs and flips status from draft to approved only when all checks pass.

Quick Start

Validate a component spec named button by having the orchestrator run /component-create button, which will execute spec-validate at Step 1.

Frequently Asked Questions about spec-validate

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

FAQPage Schema
How do I validate a component spec against a JSON schema before code generation?▼

Component spec validation parses frontmatter and checks mandatory Prop, Event, Slot, Sub-component, and Token sections against a JSON schema using Ajv to fail fast on structural issues before triggering generation.

How does token resolution enforcement work for frontmatter tokens?▼

Token resolution enforcement confirms every referenced "Token (DESIGN.md)" entry in the spec resolves to an allowed token definition in `.claude/docs/DESIGN.md`, preventing unresolved design tokens from breaking component generation.

Can I use Ajv schema checks to enforce strict table-content rules in markdown specs?▼

Ajv schema checks validate spec frontmatter structure, while strict table-content rules enforce token-resolution and constraints bullet matching verbatim against canonical templates to ensure deterministic QA.

What is the best way to automate deterministic approval workflows for draft specs?▼

Deterministic approval workflows compute a SHA-256 checksum for draft specs and flip status from `draft` to `approved` only when all schema and structural checks pass, ensuring only valid inputs are approved.

Why does component spec validation fail on placeholder-only table sections?▼

Component spec validation fails on placeholder-only tables because body completeness checks verify mandatory Props, Events, Slots, Sub-components, and Tokens sections are fully populated to prevent incomplete specs from driving unreliable code generation.

Do I need a Constraints block with canonical template bullets to pass spec validation?▼

Spec validation requires a "## Constraints — DO NOT" block and checks that it contains the canonical template bullets verbatim, enforcing constraints enforcement to guarantee specs are code-ready.