html-structure-validatelisted
Install: claude install-skill aiskillstore/marketplace
# HTML Structure Validate Skill
## Purpose
This skill is a **BLOCKING quality gate** that ensures generated HTML meets minimum structural requirements. It is the **first deterministic validation** of probabilistic AI-generated output.
The skill checks:
- **HTML5 compliance** - Proper DOCTYPE, tags
- **Tag closure** - All tags properly closed
- **Required elements** - Meta tags, stylesheet links
- **Well-formedness** - Valid structure
If validation fails, the pipeline **STOPS** and triggers a hook to notify the user.
This enforces the principle: **Python validates, ensuring deterministic quality**.
## What to Do
1. **Load HTML file to validate**
- Read `04_page_XX.html` generated by AI skill
- Verify file exists and is readable
- Confirm file is text (not binary)
2. **Run validation checks**
- Check HTML5 structure compliance
- Verify tag closure
- Validate head section
- Check required CSS link
- Validate page container structure
3. **Generate validation report**
- Document all checks performed
- List any errors found
- Note warnings (non-blocking)
- Record informational findings
4. **Save validation report** as JSON
- Save to: `output/chapter_XX/page_artifacts/page_YY/06_validation_structure.json`
- Include timestamp
- Include all check results
5. **Exit with appropriate code**
- Return 0 if VALID (continue pipeline)
- Return 1 if INVALID (STOP pipeline, trigger hook)
## Input Parameters
```
html_file: <str>