wp-block-themes
Use when developing WordPress block themes: theme.json (global settings/styles), templates and template parts, patterns, style variations, and Site Editor troubleshooting (style hierarchy, overrides, caching).
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o wp-block-themes.zip https://jpskill.com/download/17346.zip && unzip -o wp-block-themes.zip && rm wp-block-themes.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17346.zip -OutFile "$d\wp-block-themes.zip"; Expand-Archive "$d\wp-block-themes.zip" -DestinationPath $d -Force; ri "$d\wp-block-themes.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
wp-block-themes.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
wp-block-themesフォルダができる - 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
- 同梱ファイル
- 8
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
WP Block Themes
どのような時に使うか
このスキルは、以下のようなブロックテーマの作業に使用します。
theme.jsonの編集 (プリセット、設定、スタイル、ブロックごとのスタイル)- テンプレート (
templates/*.html) およびテンプレートパーツ (parts/*.html) の追加または変更 - パターン (
patterns/*.php) の追加と、インサーターに表示される内容の制御 - スタイルバリエーション (
styles/*.json) の追加 - 「スタイルが適用されない」/「エディターが theme.json を反映しない」のデバッグ
必要な入力
- リポジトリのルートと、対象となるテーマ (複数のテーマが存在する場合はテーマディレクトリ)。
- 対象の WordPress バージョン範囲 (theme.json のバージョンと機能はコアのバージョンによって異なります)。
- 問題が発生する場所: サイトエディター、投稿エディター、フロントエンド、またはすべて。
手順
0) トリアージとブロックテーマのルートの特定
- トリアージを実行します。
node skills/wp-project-triage/scripts/detect_wp_project.mjs
- テーマのルートと主要なフォルダーを検出します。
node skills/wp-block-themes/scripts/detect_block_themes.mjs
複数のテーマが存在する場合は、1 つを選択し、すべての変更をそのテーマのルートに限定します。
1) 新しいブロックテーマの作成 (必要な場合)
新しいブロックテーマをゼロから作成する場合 (またはクラシックテーマを変換する場合):
- ファイルレイアウトを推測するのではなく、既知の正常なスキャフォールドから開始する (または WP 環境からエクスポートする) ことを推奨します。
theme.jsonのスキーマバージョンが異なるため、サポートされる最小の WordPress バージョンを明示的に指定してください。
参照:
references/creating-new-block-theme.md
テーマのルートを作成したら、detect_block_themes を再度実行し、以下に進みます。
2) テーマタイプの確認と期待値のオーバーライド
- ブロックテーマの指標:
theme.jsonが存在するtemplates/および/またはparts/が存在する
- スタイルの階層を覚えておいてください。
- コアのデフォルト → theme.json → 子テーマ → ユーザーのカスタマイズ
- ユーザーのカスタマイズにより、theme.json の編集が「無視された」ように見えることがあります。
参照:
references/debugging.md(スタイルの階層 + 最速のチェック)
3) theme.json の変更を安全に行う
変更する内容を決定します。
- settings (UI で許可されるもの): プリセット、タイポグラフィスケール、色、レイアウト、間隔
- styles (デフォルトの外観): 要素/ブロックの CSS のようなルール
参照:
references/theme-json.md
4) テンプレートとテンプレートパーツ
- テンプレートは
templates/の下に存在し、HTML です。 - テンプレートパーツは
parts/の下に存在し、サブディレクトリにネストしてはいけません。
参照:
references/templates-and-parts.md
5) パターン
テーマが所有するパターンが必要な場合は、patterns/ の下のファイルシステムのパターンを推奨します。
参照:
references/patterns.md
6) スタイルバリエーション
スタイルバリエーションは、styles/ の下の JSON ファイルです。注: ユーザーがスタイルバリエーションを選択すると、その選択は DB に保存されるため、ファイルを変更しても「ユーザーが見るものが自動的に更新される」とは限りません。
参照:
references/style-variations.md
検証
- サイトエディターが、期待される場所 (スタイル UI、テンプレート、パターン) で変更を反映していること。
- フロントエンドが、期待されるスタイルでレンダリングされること。
- スタイルが変更されない場合は、ユーザーのカスタマイズがテーマのデフォルトをオーバーライドしているかどうかを確認します。
- アセット (フォント、カスタム JS/CSS ビルド) が関係する場合は、リポジトリのビルド/リントスクリプトを実行します。
失敗モード / デバッグ
まずはこちらから:
references/debugging.md
よくある問題:
- 間違ったテーマのルート (非アクティブなテーマを編集している)
- ユーザーのカスタマイズがデフォルトをオーバーライドしている
- 無効な
theme.jsonの形状/タイプミスにより、適用が妨げられている - テンプレート/パーツが間違ったフォルダーにある (またはネストされたパーツ)
エスカレーション
アップストリームの動作が不明確な場合は、標準的なドキュメントを参照してください。
theme.json、テンプレート、パターン、およびスタイルバリエーションについては、Theme Handbook および Block Editor Handbook を参照してください。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
WP Block Themes
When to use
Use this skill for block theme work such as:
- editing
theme.json(presets, settings, styles, per-block styles) - adding or changing templates (
templates/*.html) and template parts (parts/*.html) - adding patterns (
patterns/*.php) and controlling what appears in the inserter - adding style variations (
styles/*.json) - debugging “styles not applying” / “editor doesn’t reflect theme.json”
Inputs required
- Repo root and which theme is targeted (theme directory if multiple exist).
- Target WordPress version range (theme.json version and features vary by core version).
- Where the issue manifests: Site Editor, post editor, frontend, or all.
Procedure
0) Triage and locate block theme roots
- Run triage:
node skills/wp-project-triage/scripts/detect_wp_project.mjs
- Detect theme roots + key folders:
node skills/wp-block-themes/scripts/detect_block_themes.mjs
If multiple themes exist, pick one and scope all changes to that theme root.
1) Create a new block theme (if needed)
If you are creating a new block theme from scratch (or converting a classic theme):
- Prefer starting from a known-good scaffold (or exporting from a WP environment) rather than guessing file layout.
- Be explicit about the minimum supported WordPress version because
theme.jsonschema versions differ.
Read:
references/creating-new-block-theme.md
After creating the theme root, re-run detect_block_themes and continue below.
2) Confirm theme type and override expectations
- Block theme indicators:
theme.jsonpresenttemplates/and/orparts/present
- Remember the style hierarchy:
- core defaults → theme.json → child theme → user customizations
- user customizations can make theme.json edits appear “ignored”
Read:
references/debugging.md(style hierarchy + fastest checks)
3) Make theme.json changes safely
Decide whether you are changing:
- settings (what the UI allows): presets, typography scale, colors, layout, spacing
- styles (how it looks by default): CSS-like rules for elements/blocks
Read:
references/theme-json.md
4) Templates and template parts
- Templates live under
templates/and are HTML. - Template parts live under
parts/and must not be nested in subdirectories.
Read:
references/templates-and-parts.md
5) Patterns
Prefer filesystem patterns under patterns/ when you want theme-owned patterns.
Read:
references/patterns.md
6) Style variations
Style variations are JSON files under styles/. Note: once a user picks a style variation, that selection is stored in the DB, so changing the file may not “update what the user sees” automatically.
Read:
references/style-variations.md
Verification
- Site Editor reflects changes where expected (Styles UI, templates, patterns).
- Frontend renders with expected styles.
- If styles aren’t changing, confirm whether user customizations override theme defaults.
- Run the repo’s build/lint scripts if assets are involved (fonts, custom JS/CSS build).
Failure modes / debugging
Start with:
references/debugging.md
Common issues:
- wrong theme root (editing an inactive theme)
- user customizations override your defaults
- invalid
theme.jsonshape/typos prevent application - templates/parts in wrong folders (or nested parts)
Escalation
If upstream behavior is unclear, consult canonical docs:
- Theme Handbook and Block Editor Handbook for
theme.json, templates, patterns, and style variations.
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (3,968 bytes)
- 📎 references/creating-new-block-theme.md (1,378 bytes)
- 📎 references/debugging.md (721 bytes)
- 📎 references/patterns.md (592 bytes)
- 📎 references/style-variations.md (439 bytes)
- 📎 references/templates-and-parts.md (442 bytes)
- 📎 references/theme-json.md (2,214 bytes)
- 📎 scripts/detect_block_themes.mjs (2,736 bytes)