skills/abejitsu/html-structure-validate/SKILL.md
Validate HTML5 structure and basic syntax. BLOCKING quality gate - stops pipeline if validation fails. Ensures deterministic output quality.
npx skillsauth add aiskillstore/marketplace html-structure-validateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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:
If validation fails, the pipeline STOPS and triggers a hook to notify the user.
This enforces the principle: Python validates, ensuring deterministic quality.
Load HTML file to validate
04_page_XX.html generated by AI skillRun validation checks
Generate validation report
Save validation report as JSON
output/chapter_XX/page_artifacts/page_YY/06_validation_structure.jsonExit with appropriate code
html_file: <str> - Path to 04_page_XX.html
output_dir: <str> - Directory for validation report
strict_mode: <bool> - If true, warnings also fail (default: false)
page_number: <int> - Page number (for reporting)
chapter: <int> - Chapter number (for reporting)
Requirement: File must start with proper DOCTYPE
<!DOCTYPE html>
Check:
<!DOCTYPE html> (case-insensitive)Error if: Missing or incorrect DOCTYPE
Requirement: Proper <html> opening and closing tags
<html lang="en">
...
</html>
Checks:
<html> tag present</html> closing tag present<html> tagsError if: Missing either tag or improperly paired
Requirement: Complete <head> section with metadata
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>...</title>
<link rel="stylesheet" href="../../styles/main.css">
</head>
Checks:
<head> and </head> tags present<meta charset="UTF-8"> present<meta name="viewport"> present (warning if missing)<title> tag with content present<link> tag present with href attributeError if: Missing charset, title, or CSS link Warning if: Missing viewport meta tag
Requirement: Proper <body> tags with content
<body>
<div class="page-container">
<main class="page-content">
...
</main>
</div>
</body>
Checks:
<body> and </body> tags present<div class="page-container"> present<main class="page-content"> present inside containerError if: Missing tags or required container divs
Requirement: All tags must be properly closed
Checks for:
<p> without </p>)<p><h2>text</h2></p>)<br/>, <img/>)<!-- -->)Validation method:
Error if: Any unmatched or improperly nested tags
Requirement: Valid heading hierarchy
<h1>Chapter Title</h1>
<h2>Section Heading</h2>
<h3>Subsection</h3>
Checks:
Error if: Heading tags improperly closed Warning if: Suspicious hierarchy
Requirement: Meaningful content in page container
Checks:
<main class="page-content"> contains elementsError if: No content or empty structure
Requirement: All lists properly structured
Checks for each <ul> or <ol>:
<li> elements<li> tags properly closed<li> count matches opening/closing pairs<ul> or <ol> improperly closedError if: Empty lists or unmatched <li> tags
Requirement: Self-closing tags properly formatted
Checks:
<img> tags have src and alt attributes<a> tags have valid href attributesWarning if: Images missing alt text or links missing href
Requirement: Proper table structure
Checks:
<table>, <tr>, <td>, <th> tags properly nestedError if: Malformed table structure
06_validation_structure.json{
"page": 16,
"book_page": 17,
"chapter": 2,
"validation_type": "structure",
"validation_timestamp": "2025-11-08T14:34:00Z",
"overall_status": "PASS",
"error_count": 0,
"warning_count": 1,
"checks_performed": [
{
"check_name": "DOCTYPE Declaration",
"status": "PASS",
"details": "Valid HTML5 DOCTYPE found"
},
{
"check_name": "HTML Tags",
"status": "PASS",
"details": "Proper <html> opening and closing tags"
},
{
"check_name": "Head Section",
"status": "PASS",
"details": "All required meta tags and title present"
},
{
"check_name": "Body Section",
"status": "PASS",
"details": "Body and content structure valid"
},
{
"check_name": "Tag Closure",
"status": "PASS",
"details": "All tags properly matched and closed"
},
{
"check_name": "Heading Hierarchy",
"status": "PASS",
"details": "4 headings found, proper h1-h4 hierarchy"
},
{
"check_name": "Content Structure",
"status": "PASS",
"details": "Main content area contains 245 words across 3 paragraphs"
},
{
"check_name": "List Integrity",
"status": "PASS",
"details": "1 list with 3 items, all properly formed"
},
{
"check_name": "Image Tags",
"status": "PASS",
"details": "No images on this page"
},
{
"check_name": "Table Tags",
"status": "PASS",
"details": "No tables on this page"
}
],
"errors": [],
"warnings": [
{
"check": "Heading Hierarchy",
"message": "First heading is h2, typically should be h1 for page opening",
"severity": "LOW"
}
],
"summary": {
"total_checks": 10,
"passed": 9,
"failed": 0,
"warnings": 1,
"html_valid": true,
"tags_matched": true,
"content_substantial": true
}
}
html, head, body, main, div.page-container) presentThis validation is performed by existing validate_html.py tool, run in structure validation mode:
cd Calypso/tools
# Validate single page HTML
python3 validate_html.py \
../output/chapter_02/page_artifacts/page_16/04_page_16.html \
--output-json ../output/chapter_02/page_artifacts/page_16/06_validation_structure.json \
--strict-structure
# Exit code:
# 0 = VALID (continue to next skill)
# 1 = INVALID (STOP pipeline)
When validation FAILS:
# Trigger hook: .claude/hooks/validate-structure.sh
# Receives:
# - Page number
# - HTML file path
# - Validation report path
# - Error details
# Hook behavior:
# - Log failure with details
# - Save error report
# - Notify user
# - STOP pipeline (no further processing)
If validation fails:
Validation provides metrics:
These metrics feed into final quality reports.
✓ Validation completes successfully ✓ All structural checks pass (0 errors) ✓ Validation report saved in JSON format ✓ Exit code 0 returned (or 1 if invalid) ✓ Clear error messages if validation fails
If validation passes:
If validation fails:
validate-structure.sh triggeredvalidate_html.py toolTo test structure validation:
# Test with known-good HTML
python3 validate_html.py ../output/chapter_01/chapter_01.html
# Should show: ✓ VALID
# Test with invalid HTML (if needed)
python3 validate_html.py broken_html.html
# Should show: ✗ INVALID with specific errors
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.