WHATWG Specification Implementation Skill

Translate WHATWG specifications into Zig implementations with numbered spec references.

11|Updated Nov 11, 2025
One-click install
npx skills add https://github.com/zig-whatwg/crane --skill whatwg-specification-implementation-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: WHATWG Specification Implementation Skill
Source: https://github.com/zig-whatwg/crane/tree/main/skills/whatwg
Command: npx skills add https://github.com/zig-whatwg/crane --skill whatwg-specification-implementation-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured, reference-driven workflow for translating WHATWG specifications into Zig code, reducing ambiguity and speeding up implementation.

Core Features & Use Cases

  • End-to-end workflow for WHATWG spec implementation: Spec Navigation, Context Detection, Type Mapping, Implementation Patterns, Cross-Spec Dependencies, and Spec Compliance.
  • Automatic context detection from file paths and import statements, plus manual context when needed.
  • Reference-driven implementation with complete algorithms, not fragments, and clear cross-spec references.
  • Documentation and testing practices aligned with WHATWG standards to ensure reproducible results.

Quick Start

Load this skill when starting a WHATWG spec implementation. Identify the target spec, locate the complete algorithm in the spec file, map spec types to Zig types, implement with numbered steps matching the algorithm, and document the reference per the provided pattern. Then run tests to verify compliance against WHATWG expectations.

Frequently Asked Questions about WHATWG Specification Implementation Skill

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

FAQPage Schema
How do I implement WHATWG specifications in Zig without missing algorithm steps?

Mapping WHATWG specifications to Zig requires locating complete algorithms, mapping spec types to Zig types, and implementing state machines with numbered steps. This workflow enforces reference-driven compliance through cross-spec dependency tracking and documentation.

What is the best way to map WebIDL types to Zig structs for state machine implementation?

Mapping WebIDL to Zig involves detecting context from file paths and imports, then translating specification concepts into Zig types and state machines. The workflow uses numbered comments matching algorithm steps to maintain spec compliance.

Can I use this workflow to handle cross-spec dependencies when translating WHATWG algorithms?

Yes, translating WHATWG algorithms with this workflow explicitly handles cross-spec dependencies. It detects context from imports and file paths, ensuring complete algorithms are implemented with clear references rather than isolated fragments.

How to document Zig code to match WHATWG specification compliance expectations?

Documenting Zig code for WHATWG compliance requires adding numbered comments and spec references matching the algorithm steps. This workflow provides a documentation pattern ensuring reproducible results and verifiable compliance against WHATWG expectations.

Does this WHATWG spec implementation workflow support manual context detection for infra standards?

Yes, the workflow supports manual context detection for WHATWG infra standards alongside automatic detection from file paths and import statements. This ensures accurate type mapping and state machine implementation even when automatic detection fails.