基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/wpgaurav/WordPress-skills --skill etch-layouts命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Author Bricks Builder (WordPress) layouts, templates, and full designs as paste-ready JSON. Use for any Bricks task — sections, pages, headers/footers, query loops, ACF/dynamic data, faceted filters, conditions, interactions/animations, popups, WooCommerce templates, custom elements, or hooks. Verified against Bricks 2.3.6 source.
Use when pushing content, docs, posts, changelogs, or other updates to Fluent Community spaces through the Fluent Community REST API.
Generate or edit design for WordPress Gutenberg blocks using Greenshift/GreenLight plugin. Convert any data to wordpress blocks or convert greenshift blocks back to html + css + js. Use when user asks to create design with Greenshift or Greenlight blocks for wordpress site, convert anything to wordpress blocks or build charts in content. Triggers on keywords: wordpress, gutenberg, greenshift, greenlight, convert to wordpress, convert greenshift blocks to vanilla html, build chart.
| name | etch-layouts |
| description | Create responsive layouts using Etch page builder patterns and components. |
Use this skill when creating layouts, sections, or components for Etch (the WordPress visual builder).
For detailed reference, read etch-skills/generating-layouts.md in the project root.
Create layouts in gt-design-system/layouts/{component-name}/:
layouts/{component-name}/
├── {component-name}-etch.json # For pasting into Etch (JSON format)
├── {component-name}-preview.html # Browser preview (compiled CSS inline)
└── {component-name}.js # JavaScript (if interactive)
Etch only accepts JSON format for pasting. The structure is:
{
"type": "block",
"gutenbergBlock": {
"blockName": "etch/element",
"attrs": {
"metadata": { "name": "My Section" },
"tag": "section",
"attributes": { "class": "my-section" },
"styles": ["styleId123"]
},
"innerBlocks": [],
"innerHTML": "",
"innerContent": []
},
"version": 2.1,
"styles": {
"styleId123": {
"type": "class",
"selector": ".my-section",
"collection": "default",
"css": "padding: var(--space-2xl) 0;\nbackground: var(--bg-base);\n\n@media (max-width: to-rem(768px)) {\n padding: var(--space-xl) 0;\n}",
"readonly": false
}
}
}
| Field | Description |
|---|---|
type | Always "block" |
gutenbergBlock | Block tree with blockName, attrs, innerBlocks, innerHTML, innerContent |
version | Always 2.1 |
timestamp | ISO 8601 timestamp |
styles | Object mapping style IDs to style definitions |
| Block | Purpose |
|---|---|
etch/element | HTML element with tag, attributes, styles, metadata |
etch/text | Text content with content and metadata attributes |
etch/loop | Iterator with target, itemId, loopParams |
etch/condition | Conditional rendering with condition |
etch/component | Reusable pattern reference with ref |
All 5 fields: blockName, attrs, innerBlocks, innerHTML, innerContent
metadata.name — builder tree labelclass attribute — for CSS targetingstyles array — with own style ID(s) linking to styles map| Case | innerHTML | innerContent |
|---|---|---|
| text block | "" | [] |
| void element (img, br, hr) | "\n\n" | ["\n", "\n"] |
| 0 children (non-void) | "" | [] |
| 1 child | "\n\n" | ["\n", null, "\n"] |
| 2 children | "\n\n\n\n" | ["\n", null, "\n\n", null, "\n"] |
| N children | formula | ["\n", null, "\n\n", ..., null, "\n"] |
{
"type": "class",
"selector": ".class-name",
"collection": "default",
"css": "/* SCSS-like syntax with to-rem() and design system variables */",
"readonly": false
}
Style types: "class" (.selector), "id" (#selector), "element" (tag selector)
data-etch-element — that attribute is from the legacy conversion script onlyetch-section-style or etch-container-styleto-rem() for ALL pixel values — never raw pxsection__element--modifier patternStyles use SCSS-like syntax:
to-rem() for all pixel values: border: to-rem(1px) solid var(--border-default);& for pseudo-classes: &:hover { color: var(--accent); }@media (max-width: to-rem(768px)) { ... }&:hover .card__title { color: var(--accent); }clamp() with to-rem(): font-size: clamp(to-rem(28px), 4vw, to-rem(40px));--bg-base, --bg-subtle, --bg-elevated, --bg-sunken, --bg-overlay-heavy--text-primary, --text-secondary, --text-muted, --text-inverse--accent, --accent-hover--border-light, --border-default, --border-medium--font-sans, --font-mono--fs-xs to --fs-4xl--fw-normal to --fw-black--lh-tight, --lh-snug, --lh-normal, --lh-relaxed--space-3xs to --space-3xl--max-width, --content-width--header-height, --header-height-mobile--radius-xs to --radius-full--shadow-xs to --shadow-xl--duration-fast, --duration-normal--ease-out, --ease-in-out--z-header, --z-modal, --z-tooltipUse {context.path} syntax in attributes and text content:
{site.url} - Site URL{site.name} - Site name{this.title} - Current post title{this.id} - Current post ID{user.displayName} - Current user name{props.myProp} - Component prop{post.title} - Loop item field (when itemId is "post"){post.permalink.relative} - Post permalink{post.featuredImage.url} - Featured image URL{post.date.dateFormat("M j, Y")} - Formatted date{post.excerpt | stripTags | truncate:100} - Filtered excerptetch-skills/generating-layouts.md for full referencecss fields)class, metadata.name, and styles with own ID(s)-etch.json for pasting into Etch-preview.html with compiled CSS for browser testing.js if interactive