بنقرة واحدة
setup
Set up a new WordPress theme with the wp-acf-blocks block development workflow
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Set up a new WordPress theme with the wp-acf-blocks block development workflow
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Scaffold, revise and manage custom ACF Gutenberg blocks for WordPress with Tailwind CSS. Use when the user wants to create a new block, revise/audit blocks, or set up a WordPress blocks project.
Scaffold one or more ACF Gutenberg blocks from GitHub issues, a markdown brief, or interactive prompts. Generates block.json, fields.json, render.php, and optional view.js.
Discuss a new block's purpose and requirements with the user, then create a GitHub issue with a structured breakdown ready for /wp-acf-blocks:add-block.
Deep AI audit of all blocks or specific blocks — runs structural checks first, then uses AI to review content quality, descriptions, grammar, admin render justification, wrapper usage, and empty-state messages.
Fast structural audit of all blocks or specific blocks — checks required files, wrapper attributes, fields.json timestamp, previewImage, viewScript. No AI, runs instantly via script.
Integrate GROQ LLM streaming into a project. Use when the user wants to add GROQ, set up GROQ streaming, or use a GROQ model in their app.
| name | setup |
| description | Set up a new WordPress theme with the wp-acf-blocks block development workflow |
Read @/knowledge/acf-blocks/conventions.md before proceeding.
Ask for all answers before proceeding:
My Client Sitemy-client-siteDefault yes for all:
If a file already exists, ask whether to overwrite or skip. Never silently overwrite.
Copy the entire boilerplate/theme/ directory to themes/{slug}/:
cp -r "$(claude plugin path wp-acf-blocks)/boilerplate/theme" themes/{slug}
Then replace all placeholders throughout the copied files:
| Placeholder | Replace with |
|---|---|
{THEME_NAME} | Human-readable theme name |
{TEXT_DOMAIN} | Theme slug (kebab-case) |
{AUTHOR} | Author name |
Files containing placeholders: style.css, functions.php, package.json.
The scaffolded structure:
themes/{slug}/
├── style.css
├── index.php
├── functions.php THEME_NAME constant, DEV_CSS_MAP stub, requires
├── blocks.json { "blocks": [] }
├── inc/
│ ├── enqueue-assets.php
│ └── auto-include-components.php
├── helpers/
│ └── ui/
│ └── get-block-wrapper-attributes.php
├── blocks/
├── scripts/
│ └── tailwind.js
├── assets/
│ ├── js/
│ │ └── index.entry.ts
│ └── css/
│ └── index.css
├── acf-json/ empty dir tracked via .gitkeep; populated by ACF when saving field groups
├── tsup.config.ts
├── tsconfig.json
├── .gitignore
└── package.json
Copy all three mu-plugins to the WordPress mu-plugins directory:
cp "$(claude plugin path wp-acf-blocks)/boilerplate/mu-plugins/wp-blocks-loader.php" {WP_PATH}/wp-content/mu-plugins/
cp "$(claude plugin path wp-acf-blocks)/boilerplate/mu-plugins/acf-local-json-router.php" {WP_PATH}/wp-content/mu-plugins/
cp "$(claude plugin path wp-acf-blocks)/boilerplate/mu-plugins/tailwind-theme-loader.php" {WP_PATH}/wp-content/mu-plugins/
What each does:
wp-blocks-loader.php — reads blocks.json, registers each block via register_block_type(), adds a project block category in the Gutenberg inserter (label from THEME_NAME constant), fixes WP 6.3+ defer strategy so viewScript files load in footeracf-local-json-router.php — routes ACF field group saves to blocks/{slug}/fields.json (per-block) or acf-json/ (all other groups); required for the per-block fields.json workflowtailwind-theme-loader.php — enqueues Tailwind-built CSS on frontend and inside Gutenberg editor iframe; supports per-developer CSS files via DEV_CSS_MAPThe boilerplate .gitignore already excludes .env.local and generated CSS files. For per-developer CSS, instruct each developer to create .env.local in the theme root:
TAILWIND_USER=theirlogin
Then map WP user IDs in functions.php:
define('DEV_CSS_MAP', [
1 => 'alice',
2 => 'bob',
]);
cd themes/{slug}
pnpm install
pnpm build
Print a summary of what was created and what was skipped. Next steps:
/wp-acf-blocks:plan-block to plan a block and create a GitHub issue/wp-acf-blocks:add-block to scaffold the first block