wp-patterns
БесплатноБез исполняемых скриптовНе проверенPattern: create or update WordPress block patterns (starter pages, templates, template parts, Query Loop layouts), review pattern registration, block markup…
от WordPress★ 2 419 звёзд на GitHubОб этом скилле
WordPress Block Patterns
Inputs required
- Repo root and target theme/plugin directory.
- Pattern type: section, starter page, template, template part, or manually registered plugin pattern.
- Theme/plugin slug, pattern slug, and text domain.
- Pattern title, categories, keywords, block types, template types, and inserter visibility.
- Target WordPress version if it differs from this repo's compatibility contract.
- Available
theme.jsonpresets for colors, typography, spacing, layout, and gradients. - Asset paths for images/icons, including whether assets are decorative or informational.
- Verification environment: WordPress Playground, wp-env, local WordPress, or manual Code Editor check.
- If updating an existing pattern: current slug, current file path, and whether existing inserted content must remain compatible.
- For child themes: child theme slug, text domain, and asset root; do not reuse the parent namespace unless explicitly intended.
Guardrails
Block markup only — express all visual design through block comment attributes and
presetslugs. No inline<style>tags, no custom CSS classes, no arbitrary HTML outside of block wrappers. Readreferences/design-with-tokens.mdfor the core principle.No JavaScript — patterns are static
block markup. For interactivity, use blocks that natively support it (Navigation, Search, Query Loop).Registration-time PHP — pattern files execute PHP once during registration, not at render. Read
references/pattern-registration.mdfor safe output functions, i18n, and functions to avoid.Valid nesting — read
references/block-markup-reference.mdfor comment syntax and nesting rules.Native blocks for behavior — use Query Loop, Search, Navigation, Social Icons, or an existing form block instead of custom PHP/HTML behavior. For newsletter, donation, payment, or map behavior, create a CTA/placeholder or use an existing block/plugin.
Local assets — use
get_theme_file_uri()withesc_url(); no external placeholder URLs unless the user approves. Readreferences/pattern-registration.mdandreferences/anti-patterns.mdfor examples.
Procedure
0) Triage and locate the pattern target
- Run triage when working in a repository:
node skills/wp-project-triage/scripts/detect_wp_project.mjs
- For block themes, locate the target theme root:
node skills/wp-block-themes/scripts/detect_block_themes.mjs
- Confirm the pattern belongs in a theme
patterns/directory or needs manual plugin registration. - If multiple themes/plugins exist, scope all changes to the requested target.
If the user did not provide required inputs, infer only low-risk defaults. Ask before inventing a theme slug, text domain, asset path, custom post type, taxonomy, event date field, or theme-specific preset. If theme.json is missing or presets cannot be verified, use conservative core presets or ask before using theme-specific slugs.
Done when: target theme/plugin root, pattern type, and registration path are confirmed.
1) Design thinking
Make five deliberate design decisions — purpose, tone, spatial composition, typography hierarchy, and color strategy — before writing block markup.
Read references/design-with-tokens.md for the decision framework and preset mapping.
For pattern-type metadata (starter pages, template patterns, template parts, query loops, forms/CTAs, comparison/pricing, social/navigation/search, 404), read references/pattern-categories-and-types.md — including the Query Loop patterns section when using core/query.
When the request calls for a visually distinctive composition, read references/visual-composition.md.
Done when: all five design decisions are made and recorded before markup.
2) Plan block structure
Sketch the nesting tree before writing markup. Example for a hero pattern:
Group (full-width, constrained layout, dark bg, vertical padding 80)
Group (constrained inner, flex vertical, center align)
Paragraph (uppercase label, small, letter-spacing, accent color)
Heading (h2, xx-large, heading font, tight line-height)
Paragraph (lead text, large, secondary color)
Buttons (flex, center)
Button (primary bg, base text)
Button (outline style)
Done when: nesting tree is sketched and hierarchy is intentional before writing comment tags.
3) Write the pattern file
Assemble the PHP header and block markup. Read references/pattern-registration.md for header fields, PHP rules, manual registration, and file examples.
Use categories and template types from step 1. Read references/pattern-categories-and-types.md when header metadata was not decided in step 1.
Block markup body:
- Follow the nesting tree from step 2
- Use
presetslugs for colors, font sizes, spacing - Use placeholder text that reflects real content — not "Lorem ipsum"
Done when: PHP header and block markup file are written.
4)
Установить wp-patterns в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл wp-patterns?
Pattern: create or update WordPress block patterns (starter pages, templates, template parts, Query Loop layouts), review pattern registration, block markup, categories, accessibility, or i18n/escaping, or improve pattern design quality. Route custom blocks to wp-block-development; route frontend interactivity to wp-interactivity-api.
Как установить скилл wp-patterns?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл wp-patterns запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic