html-structure-validate
БесплатноБез исполняемых скриптовНе проверенValidate HTML5 structure and basic syntax. BLOCKING quality gate - stops pipeline if validation fails. Ensures deterministic output quality.
от aiskillstore★ 509 звёзд на GitHubОб этом скилле
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
Load HTML file to validate
- Read
04_page_XX.htmlgenerated by AI skill - Verify file exists and is readable
- Confirm file is text (not binary)
- Read
Run validation checks
- Check HTML5 structure compliance
- Verify tag closure
- Validate head section
- Check required CSS link
- Validate page container structure
Generate validation report
- Document all checks performed
- List any errors found
- Note warnings (non-blocking)
- Record informational findings
Save validation report as JSON
- Save to:
output/chapter_XX/page_artifacts/page_YY/06_validation_structure.json - Include timestamp
- Include all check results
- Save to:
Exit with appropriate code
- Return 0 if VALID (continue pipeline)
- Return 1 if INVALID (STOP pipeline, trigger hook)
Input Parameters
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)
Validation Checks
Check 1: DOCTYPE Declaration
Requirement: File must start with proper DOCTYPE
<!DOCTYPE html>
Check:
- File contains
<!DOCTYPE html>(case-insensitive) - DOCTYPE appears before any tags
- DOCTYPE is on first line or near beginning
Error if: Missing or incorrect DOCTYPE
Check 2: HTML Tags
Requirement: Proper <html> opening and closing tags
<html lang="en">
...
</html>
Checks:
-
<html>tag present -
</html>closing tag present - Tags are properly paired
- No unclosed
<html>tags
Error if: Missing either tag or improperly paired
Check 3: Head Section
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 - CSS
<link>tag present with href attribute
Error if: Missing charset, title, or CSS link Warning if: Missing viewport meta tag
Check 4: Body Section
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 container - Body contains substantial content (> 100 bytes)
Error if: Missing tags or required container divs
Check 5: Tag Closure Validation
Requirement: All tags must be properly closed
Checks for:
- Unmatched opening tags (e.g.,
<p>without</p>) - Improper nesting (e.g.,
<p><h2>text</h2></p>) - Self-closing tags used correctly (e.g.,
<br/>,<img/>) - Comment blocks properly formatted (
<!-- -->)
Validation method:
- Parse HTML into tree structure
- Verify all nodes properly matched
- Check nesting doesn't violate HTML5 rules
Error if: Any unmatched or improperly nested tags
Check 6: Heading Tags (h1-h6)
Requirement: Valid heading hierarchy
<h1>Chapter Title</h1>
<h2>Section Heading</h2>
<h3>Subsection</h3>
Checks:
- All heading tags properly closed
- First heading should be h1 (warning if not)
- Heading levels don't skip dramatically (h1 → h4 is suspicious)
- All headings have text content (not empty)
Error if: Heading tags improperly closed Warning if: Suspicious hierarchy
Check 7: Content Structure
Requirement: Meaningful content in page container
Checks:
-
<main class="page-content">contains elements - Content includes headings or paragraphs
- No completely empty content area
- Text nodes or elements present (> 100 words total)
Error if: No content or empty structure
Check 8: List Integrity
Requirement: All lists properly structured
Checks for each <ul> or <ol>:
- List o
Установить html-structure-validate в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл html-structure-validate?
Validate HTML5 structure and basic syntax. BLOCKING quality gate - stops pipeline if validation fails. Ensures deterministic output quality.
Как установить скилл html-structure-validate?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл html-structure-validate запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub