web-html
HTML5: semantic markup, ARIA/WCAG accessibility, forms, Web Components, Shadow DOM, SEO
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o web-html.zip https://jpskill.com/download/22298.zip && unzip -o web-html.zip && rm web-html.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/22298.zip -OutFile "$d\web-html.zip"; Expand-Archive "$d\web-html.zip" -DestinationPath $d -Force; ri "$d\web-html.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
web-html.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
web-htmlフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
目的
このスキルにより、OpenClaw は HTML5 コードを生成、編集、最適化できます。構造のためのセマンティックマークアップ、アクセシビリティのための ARIA および WCAG 準拠、フォーム処理、カプセル化のための Web Components、スタイル分離のための Shadow DOM、メタタグや構造化データなどの SEO 技術に重点を置いています。
使用する場面
ARIA ロールを持つ E コマース製品ページや、シングルページアプリケーションの動的フォームの作成など、アクセシブルでセマンティックな HTML を必要とするウェブページを構築する際に、このスキルを適用してください。ブログ投稿のような SEO を重視するコンテンツや、グローバルなスタイル競合を避けるためにカスタム Web Components を統合する場合にも使用してください。
主な機能
- セマンティック HTML の生成:
<main>や<article>のような要素を作成し、可読性と SEO を向上させます。例: アクセシブルなサイトヘッダーには<header role="banner">を使用します。 - ARIA/WCAG の実装: スクリーンリーダーのサポートのために要素に
aria-label="Search"のような属性を追加し、WCAG 2.1 AA 準拠を保証します。 - フォームの処理: 必須属性を持つフォームを構築します。例:
<input type="email" required aria-invalid="false">には検証フックが含まれます。 - Web Components の作成: Shadow DOM を使用してカスタム要素を定義します。例: 内部 HTML とスタイルをカプセル化する
<my-component>。 - SEO の最適化:
<meta name="description" content="Page description">のようなメタタグを挿入し、キーワード配置のために見出しを使用します。 コードスニペット:<section aria-labelledby="sec-title"> <h2 id="sec-title">Section Heading</h2> <p>Content with SEO keywords.</p> </section>
使用パターン
OpenClaw の CLI または API を介して、スキル ID ("web-html") とアクションパラメータを指定してこのスキルを呼び出します。生成タスクには JSON 設定を提供し、編集にはターゲット HTML 文字列を提供します。パターン 1: クイックプロトタイプには CLI を使用します。パターン 2: 他のスキルと連携させます。例: 出力を CSS スキルに渡します。WCAG 準拠のために常にアクセシビリティフラグを含めてください。例パターン: openclaw execute web-html --action generate --params '{"type": "page", "features": ["semantic", "aria"]}' で構造化コードを生成します。
一般的なコマンド/API
- CLI コマンド:
openclaw execute web-html --action <action> --params <JSON>を使用します。アクションには "generate"、"enhance"、"validate" が含まれます。例えば、openclaw execute web-html --action generate --params '{"elements": ["form"], "accessible": true}'はアクセシブルなフォームを生成します。詳細な出力には--debugのようなフラグを含め、WCAG 準拠をチェックするには--validateを含めます。 - API エンドポイント:
https://api.openclaw.ai/skills/web-htmlに JSON ボディで POST します。例:{"action": "generate", "params": {"type": "component", "shadowDom": true}}。認証のためにヘッダーAuthorization: Bearer $OPENCLAW_API_KEYを設定します。応答形式: "code" (HTML 文字列) と "errors" 配列を含む JSON。 コードスニペット:{ "action": "enhance", "target": "<div>Original HTML</div>", "params": {"addAria": true} }これを使用して、既存の HTML を ARIA 属性で強化します。
統合に関する注意点
出力を他のスキルにパイプすることで統合します。例: web-html の出力を web-css の入力として使用します。設定形式: JSON オブジェクト。例: {"accessibility": true, "seoTags": ["description", "keywords"]}。Web Components の場合、Shadow DOM でラップして互換性を確保します。例: openclaw chain web-html web-js --input <html-code> を介して web-js スキルと組み合わせます。環境変数を使用する場合は、API 呼び出しのために $OPENCLAW_API_KEY を設定し、ローカルの Web Component テストのために Node.js のような依存関係を処理します。
エラー処理
一般的なエラー: 無効な HTML (例: 閉じタグの欠落) は、"Syntax error in element" のようなメッセージとともに HTTP 400 を返します。ARIA の誤用 (例: 無効なロール) は、詳細とともに 422 をトリガーします。response.status をチェックして処理します。400 以上の場合、"errors" 配列を解析して詳細を確認します。CLI の場合、--retry 3 フラグを使用して修正を試みます。例: openclaw execute web-html --action generate --params {...} --retry 3。エラーチェックのコードスニペット:
if (response.errors.length > 0) {
console.error(response.errors[0].message); // 例: "Missing aria-label"
retryAction();
}
実行前に常に WCAG ルールで入力を検証してください。
具体的な使用例
-
SEO を考慮したセマンティック HTML ページの生成:
openclaw execute web-html --action generate --params '{"structure": "basic", "seo": true, "accessibility": true}'を実行します。これにより、次のような完全な HTML ドキュメントが生成されます。<!DOCTYPE html> <html lang="en"> <head><meta name="description" content="SEO description"></head> <body><main aria-label="Main content">Content here</main></body> </html>アクセシブルなウェブページの迅速なプロトタイピングにこれを使用します。
-
アクセシビリティのためにフォームを ARIA で強化する: まず、ベースとなるフォーム文字列を提供し、次に
openclaw execute web-html --action enhance --target '<form><input type="text"></form>' --params '{"addAria": true}'を実行します。出力:<form aria-label="User Form"> <label for="input1">Label:</label> <input id="input1" type="text" aria-required="true"> </form>これにより、既存のコードのフォーム要素の WCAG 準拠が保証されます。
グラフの関係
- 関連スキル: web-css (生成された HTML のスタイリング用)、web-js (Web Components のスクリプト用)
- クラスター内: web-dev
- 接続タグ: html, accessibility, semantic, web
- 依存関係: 完全な機能には web-dev クラスターが必要です
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Purpose
This skill enables OpenClaw to generate, edit, and optimize HTML5 code, focusing on semantic markup for structure, ARIA and WCAG compliance for accessibility, form handling, Web Components for encapsulation, Shadow DOM for styling isolation, and SEO techniques like meta tags and structured data.
When to Use
Apply this skill when building web pages requiring accessible, semantic HTML, such as creating e-commerce product pages with ARIA roles or dynamic forms in single-page apps. Use it for SEO-heavy content like blog posts or when integrating custom Web Components to avoid global style conflicts.
Key Capabilities
- Generate semantic HTML: Create elements like
<main>or<article>for better readability and SEO. Example: Use<header role="banner">for accessible site headers. - Implement ARIA/WCAG: Add attributes like
aria-label="Search"to elements for screen reader support, ensuring WCAG 2.1 AA compliance. - Handle forms: Build forms with required attributes, e.g.,
<input type="email" required aria-invalid="false">, including validation hooks. - Create Web Components: Define custom elements with Shadow DOM, e.g.,
<my-component>encapsulating internal HTML and styles. - Optimize for SEO: Insert meta tags like
<meta name="description" content="Page description">and use headings for keyword placement. Code snippet:<section aria-labelledby="sec-title"> <h2 id="sec-title">Section Heading</h2> <p>Content with SEO keywords.</p> </section>
Usage Patterns
Invoke this skill via OpenClaw's CLI or API by specifying the skill ID ("web-html") and action parameters. For generation tasks, provide JSON configs; for edits, supply target HTML strings. Pattern 1: Use CLI for quick prototypes. Pattern 2: Chain with other skills, e.g., pass output to a CSS skill. Always include accessibility flags for WCAG compliance. Example pattern: openclaw execute web-html --action generate --params '{"type": "page", "features": ["semantic", "aria"]}' to produce structured code.
Common Commands/API
- CLI Commands: Use
openclaw execute web-html --action <action> --params <JSON>, where actions include "generate", "enhance", or "validate". For example,openclaw execute web-html --action generate --params '{"elements": ["form"], "accessible": true}'generates an accessible form. Include flags like--debugfor verbose output or--validateto check WCAG compliance. - API Endpoints: POST to
https://api.openclaw.ai/skills/web-htmlwith a JSON body, e.g.,{"action": "generate", "params": {"type": "component", "shadowDom": true}}. Set headerAuthorization: Bearer $OPENCLAW_API_KEYfor authentication. Response format: JSON with "code" (HTML string) and "errors" array. Code snippet:{ "action": "enhance", "target": "<div>Original HTML</div>", "params": {"addAria": true} }Use this to enhance existing HTML with ARIA attributes.
Integration Notes
Integrate by piping outputs to other skills, e.g., use web-html output as input for web-css. Config format: JSON objects, e.g., {"accessibility": true, "seoTags": ["description", "keywords"]}. For Web Components, ensure compatibility by wrapping in Shadow DOM; example: Combine with web-js skill via openclaw chain web-html web-js --input <html-code>. If using env vars, set $OPENCLAW_API_KEY for API calls and handle dependencies like Node.js for local Web Component testing.
Error Handling
Common errors: Invalid HTML (e.g., missing closing tags) returns HTTP 400 with message like "Syntax error in element"; ARIA misuse (e.g., invalid role) triggers 422 with details. Handle by checking response.status; if >=400, parse the "errors" array for specifics. For CLI, use --retry 3 flag to attempt fixes, e.g., openclaw execute web-html --action generate --params {...} --retry 3. Code snippet for error checking:
if (response.errors.length > 0) {
console.error(response.errors[0].message); // e.g., "Missing aria-label"
retryAction();
}
Always validate inputs with WCAG rules before execution.
Concrete Usage Examples
-
Generate a semantic HTML page with SEO: Run
openclaw execute web-html --action generate --params '{"structure": "basic", "seo": true, "accessibility": true}'. This produces a full HTML document like:<!DOCTYPE html> <html lang="en"> <head><meta name="description" content="SEO description"></head> <body><main aria-label="Main content">Content here</main></body> </html>Use this for quick prototyping of accessible web pages.
-
Enhance a form with ARIA for accessibility: First, provide a base form string, then execute
openclaw execute web-html --action enhance --target '<form><input type="text"></form>' --params '{"addAria": true}'. Output:<form aria-label="User Form"> <label for="input1">Label:</label> <input id="input1" type="text" aria-required="true"> </form>This ensures WCAG compliance for form elements in existing code.
Graph Relationships
- Related Skills: web-css (for styling generated HTML), web-js (for scripting Web Components)
- In Cluster: web-dev
- Connected Tags: html, accessibility, semantic, web
- Dependencies: Requires web-dev cluster for full functionality