generateblocks-layouts
БесплатноБез исполняемых скриптовНе проверенBuild layouts using GenerateBlocks V2 elements for WordPress
от wpgaurav★ 24 звезды на GitHubОб этом скилле
GenerateBlocks V2 Layout Builder
Build professional WordPress layouts using GenerateBlocks V2's four core blocks.
Output Requirements
ALWAYS output generated blocks to a file, never inline in the chat.
- Output filename:
{section-name}.html(e.g.,hero-section.html,services-grid.html) - For multiple sections: Create separate files or one combined file
- Include a brief summary in chat describing what was created
Why file output?
- Block code is often 100+ lines and breaks chat formatting
- Easier to copy/paste into WordPress
- Prevents truncation of long outputs
- Allows incremental building of complex layouts
Quick Start
GenerateBlocks V2 uses four block types:
| Block | Class Pattern | Use For |
|---|---|---|
generateblocks/element |
.gb-element-{id} |
Containers (div, section, article, header, nav, footer) |
generateblocks/text |
.gb-text-{id} |
Text content (h1-h6, p, span, a, button) |
generateblocks/media |
.gb-media-{id} |
Images (static only, no dynamic features) |
generateblocks/shape |
.gb-shape-{id} |
SVG icons and decorative shapes |
When to Use Core Blocks
For elements not available in GenerateBlocks or requiring advanced media features, use WordPress Core Blocks:
| Content Type | Use Core Block | Why |
|---|---|---|
| Images with captions | core/image |
Built-in caption support |
| Image galleries | core/gallery |
Lightbox, columns, captions |
| Videos | core/video |
Native video player, controls |
| Embedded media | core/embed |
YouTube, Vimeo, Twitter, etc. |
| Audio files | core/audio |
Native audio player |
| File downloads | core/file |
Download links with filename |
| Tables | core/table |
Structured data tables |
| Lists | core/list |
Semantic ul/ol with .list class |
| Quotes | core/quote |
Blockquote with citation |
| Code blocks | core/code |
Preformatted code display |
| Separators | core/separator |
Horizontal rules |
| Buttons (grouped) | core/buttons |
Multiple button layouts |
| Columns (simple) | core/columns |
Quick equal-width layouts |
| Cover images | core/cover |
Background images with overlays |
| Dynamic post content | core/post-* |
Post title, excerpt, featured image, etc. |
| Query loops | core/query |
Dynamic content from posts |
| Emojis | core/paragraph |
GenerateBlocks doesn't render emojis properly |
Rule of thumb: Use GenerateBlocks for layout structure and custom styling. Use Core Blocks for specialized content types and media with built-in functionality.
Block Template
<!-- wp:generateblocks/{type} {json_attributes} -->
<{tag} class="gb-{type} gb-{type}-{uniqueId}">
{content}
</{tag}>
<!-- /wp:generateblocks/{type} -->
Element blocks add "className":"gb-element-card001 gb-element" to attributes. HTML class order: gb-element-{id} gb-element:
<!-- wp:generateblocks/element {"uniqueId":"card001","tagName":"div","className":"gb-element-card001 gb-element",...} -->
<div class="gb-element-card001 gb-element">...</div>
<!-- /wp:generateblocks/element -->
Required Attributes
Every block needs:
uniqueId- Unique identifier (format:{section}{number}likehero001,card023)tagName- HTML element typestyles- CSS properties as JSON object (camelCase). Supports responsive keys like"@media (max-width:1024px)":{...}css- Generated CSS string (kebab-case, minified, alphabetically sorted)htmlAttributes- Plain object of attribute key-value pairs (for links, IDs, data attributes)
Optional:
className- Additional CSS classes. Must include the uniqueId class: e.g.,"gb-element-card001 gb-element"for element blocks,"gb-element-hero001 gb-element alignfull"for full-width sectionsglobalClasses- Array of global CSS class slugs (e.g.,["lede"])align- Block alignment ("full"for full-width)
CRITICAL: htmlAttributes Format
htmlAttributes MUST be a plain object, NOT an array:
// ✅ CORRECT - Plain object
"htmlAttributes": {"href": "https://example.com/page/", "target": "_blank", "id": "section-id"}
// ❌ WRONG - Array of objects (causes block editor recovery errors)
"htmlAttributes": [
{"attribute": "href", "value": "/contact/"},
{"attribute": "target", "value": "_blank"}
]
Use full absolute URLs, not relative paths. The block editor saves links as absolute URLs; relative paths get converted on save, causing a mismatch that triggers block recovery.
// ✅ CORRECT
"htmlAttributes": {"href": "https://yoursite.com/services/web-development/"}
// ❌ WRONG
"htmlAttributes": {"href": "/services/web-development/"}
Text <a> vs Element <a> Links
| Block Type | htmlAttributes for href |
href in HTML |
Use Case |
|---|---|---|---|
generateblocks/text with tagName: "a" |
No - plugin manages link internally | No | Plain text |
Установить generateblocks-layouts в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл generateblocks-layouts?
Build layouts using GenerateBlocks V2 elements for WordPress
Как установить скилл generateblocks-layouts?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл generateblocks-layouts запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic