blockstudio
3
总安装量
1
周安装量
#55512
全站排名
安装命令
npx skills add https://github.com/enriquo/blockstudio-skills --skill blockstudio
Agent 安装分布
amp
1
cline
1
opencode
1
cursor
1
kimi-cli
1
codex
1
Skill 文档
Blockstudio
Expert in building WordPress custom blocks with the Blockstudio PHP-first framework.
When to Use
- Creating or configuring Blockstudio blocks (
block.json+index.php/ Twig / Blade) - Defining block fields/attributes via the
blockstudiokey inblock.json - Setting up global or per-block asset files (
global-*.css,style.css,script.js) - Configuring
blockstudio.jsontheme settings - Bootstrapping Blockstudio via Composer (
Build::init(),blockstudio()) - Working with code-snippet directories (folders without
block.json) - Debugging asset enqueuing, SCSS compilation, or block registration issues
Reference
Blockstudio ships an official AI context file (/blockstudio-llm.txt) split into documentation and JSON schemas. The references below mirror that split:
| Topic | Reference | Load When |
|---|---|---|
| Framework documentation | references/documentation.md |
Always â installation, block structure, fields, assets, templates, settings |
| JSON schemas | references/schemas.md |
When writing or validating block.json, blockstudio.json, page.json |
Core Concepts
- Block directory: a folder inside
blockstudio/containingblock.json(with"blockstudio"key) and a render template (index.php,index.twig, orindex.blade.php) - Code-snippet directory: a folder without
block.json; used for global assets andinit.phpsnippets - Asset convention:
style.cssâ scoped to block;global-*.cssâ enqueued site-wide;*.inline.cssâ intended to be inlined as<style> - No build step: Blockstudio handles SCSS compilation and JS bundling automatically based on
blockstudio.jsonsettings $avariable: shorthand for block attributes available inside PHP templates
Constraints
MUST DO
- Always include
"blockstudio": {}key inblock.jsonto opt into Blockstudio discovery - Use
get_block_wrapper_attributes()in PHP templates for proper block support attributes - Escape output â use
esc_html(),esc_attr(),wp_kses_post()as appropriate - Place global assets only in one location to avoid duplicate enqueuing
MUST NOT DO
- Nest template parts inside
parts/subdirectories (WordPress FSE limitation) - Call
Build::init()for the same directory more than once per request - Rely on
*.inline.cssin code-snippet directories being inlined â currently served as external<link>(known bug)