[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GKHCMPG65W2YP9XK6GJGD2":3,"skill-same:01M6GKHCMPG65W2YP9XK6GJGD2":68},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":50,"ownerHtmlUrl":51,"ownerBlogUrl":52,"ownerDescription":6,"updatedAt":53,"install":54,"resources":67},"01M6GKHCMPG65W2YP9XK6GJGD2","block-scaffolding-from-design",null,"Use when an approved kivo-creator match plan must be emitted - writing the page as block markup, scaffolding the blocks that were missing in the project's conventions (run the project's generator first, then review and copy the prepared files), turning unmatched design values into token proposals and importing media. For deciding which block a section uses use section-matching; for checking the rendered result use visual-fidelity.","hekivo\u002Fkivo-wise","hekivo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F278159278?v=4","01M6GKH8S3Z4CAJ9RRR607G1WJ","Hekivo","01M6GKH8XNM7HTVF4DC86MA8RG",14,"MIT","https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fplugins\u002Fkivo-creator\u002Fskills\u002Fblock-scaffolding-from-design\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"block scaffolding from design","block","scaffolding","design","session context","which","generator","missing","as","project","visual","runner","files","only","use","session","proposals","page","Media","writing","2026-11-10 10:12:30",false,"---\nname: block-scaffolding-from-design\ndescription: Use when an approved kivo-creator match plan must be emitted - writing the page as block markup, scaffolding the blocks that were missing in the project's conventions (run the project's generator first, then review and copy the prepared files), turning unmatched design values into token proposals and importing media. For deciding which block a section uses use section-matching; for checking the rendered result use visual-fidelity.\nlicense: MIT\ncompatibility: Node 20+. Project commands go through the runner from the kivo-wise session context. emit.mjs writes only under .creator\u002F\u003Crun>\u002F.\n---\n\n# Block scaffolding from design\n\nEmit an approved plan. Existing blocks are filled; missing blocks are generated with the project's own generator and then completed with files prepared from the spec.\n\nRunner placeholders (`{{runner.wp}}`, `{{runner.acorn}}`, `{{runner.cache}}`) come from the kivo-wise session context. Never run `wp`, `composer`, `php` or `npm` on the host.\n\n## When to use\n\n- The person approved `match-plan.md`.\n- \"Generate the missing blocks\", \"build the page from the plan\".\n- Not for changing the plan (`section-matching`) or judging the result (`visual-fidelity`).\n\n## Inputs required\n\n1. `.creator\u002F\u003Crun>\u002Fmatch-plan.json` that passes `match.mjs --check`.\n2. The project root and its runner (session context).\n3. The kivo-creator plugin root (two levels above this skill's folder).\n\n## Procedure\n\n1. Emit: `node \u003Ckivo-creator>\u002Fscripts\u002Femit.mjs --run=.creator\u002F\u003Crun> --project=.`. It writes `page.html` (block markup), `scaffold\u002F\u003Cproject paths>` and `emitted.json` (`files`, `commands`, `media`, `gaps`, `proposals`, `notes`, `blockType`, and the section `selector` verify uses). New blocks follow the project's existing block type, not the profile: ACF Composer classes when the project's blocks are ACF, `block.json` when they are native (`blockType`: `type`, `source` = `override` | `count` | `asked`, `counts`). Existing blocks keep their own markup, so one page can mix both. If emit refuses with `New blocks need a block type`, go back to `\u002Fcreator`: the person chooses once and the answer is recorded with `block-type.mjs --set=` or passed as `--blocks=`. Nothing in the project changes yet. When the project's existing blocks do not print `data-block`, add `--selector=\u003Ccss>` for the wrapper they do print.\n2. Token proposals first. Show `emitted.proposals` (value, role, suggested token). Add a token to the `@theme` block only when the person agrees, then run step 1 again so the views use the new utility. Never put a literal value or an arbitrary class (`text-[13px]`) in markup to avoid this step.\n3. For each new block, in order:\n   1. run the project's generator with the runner, exactly as listed in `emitted.commands` (for example `{{runner.acorn}} acf:block Stats --no-interaction`);\n   2. show the difference between the generated files and `scaffold\u002F\u003Cpath>` as a diff;\n   3. check what the prepared view assumes. ACF textarea fields follow the kivo-wise escaping rule `@textarea(...)` when emit finds `Blade::directive('textarea', …)` in the project's own code; otherwise the view uses `{!! nl2br(e(...)) !!}` and `emitted.notes` says so. Keep that fallback (it is not the forbidden `nl2br(esc_html())`), or, if the directive comes from a Composer package emit cannot see, switch back to `@textarea(...)`. Any other directive the view uses must exist in the project; if one does not, ask before changing the escaping;\n   4. copy the reviewed files over the generated ones;\n   5. native blocks (`blockType.type` is `native`, on any profile): `emitted.commands` is empty. If `{{runner.acorn}} list` shows a `make:block` generator, run it first and compare; otherwise copy `block.json`, the view and the CSS notes, then follow `emitted.notes` for the registration and the editor script, matching how the existing blocks do it.\n4. Rebuild caches: `{{runner.acorn}} acf:cache` (or `{{runner.cache}}`) so ACF Composer picks up the new fields.\n5. Media: for each `emitted.media` entry, import the file (`{{runner.wp}} media import \u003Csrc> --porcelain`) and put the attachment id in place of `null` for that field in `page.html`. Ask before importing remote files you do not recognise.\n6. Run the project's own checks on the new files (code style, static analysis, tests), as the project defines them.\n7. Report: blocks filled, blocks created (with paths), gaps with their reasons, tokens added or still proposed, media imported. Then hand over to `visual-fidelity`.\n\n## Verification\n\n- `git status` shows only the new block files, the `@theme` lines the person approved and nothing else.\n- The project's checks pass on the new files.\n- `page.html` has no `null` image ids left, or the report lists each one.\n\n## Failure modes\n\n| Symptom | Cause | Fix |\n|---|---|---|\n| `the match plan is not approved yet` | Open, low-confidence or invalid decisions | Go back to `section-matching` |\n| `New blocks need a block type` | Mixed project or no blocks yet, and no `creator.blocks` \u002F `--blocks` | Ask the person once (recommend `blockType.recommended` when there are no blocks); record it with `block-type.mjs --set=` or pass `--blocks=` |\n| Generator command not found | The project has no ACF Composer generator or uses its own stubs | Run `{{runner.acorn}} list`; use the project's generator; if there is none, ask before creating files by hand |\n| New fields missing in the editor | ACF Composer manifest not rebuilt | `{{runner.acorn}} acf:cache` (or `{{runner.cache}}`) |\n| A view uses a directive the project lacks | The directive is registered somewhere emit does not scan (a Composer package) or not at all | For `@textarea`, the fallback `{!! nl2br(e(...)) !!}` is safe; for anything else ask, do not swap in a different escaping on your own |\n| A proposal keeps coming back | The token was added under another name or namespace | Use the suggested namespace (`--color-*`, `--text-*`) so the mapper finds it |\n\n## Escalation\n\nAsk before adding any `@theme` token, before importing media from an unknown host, and whenever a generated block would duplicate an existing one with a different style.\n","# Block scaffolding from design\n\nEmit an approved plan. Existing blocks are filled; missing blocks are generated with the project's own generator and then completed with files prepared from the spec.\n\nRunner placeholders (`{{runner.wp}}`, `{{runner.acorn}}`, `{{runner.cache}}`) come from the kivo-wise session context. Never run `wp`, `composer`, `php` or `npm` on the host.\n\n## When to use\n\n- The person approved `match-plan.md`.\n- \"Generate the missing blocks\", \"build the page from the plan\".\n- Not for changing the plan (`section-matching`) or judging the result (`visual-fidelity`).\n\n## Inputs required\n\n1. `.creator\u002F\u003Crun>\u002Fmatch-plan.json` that passes `match.mjs --check`.\n2. The project root and its runner (session context).\n3. The kivo-creator plugin root (two levels above this skill's folder).\n\n## Procedure\n\n1. Emit: `node \u003Ckivo-creator>\u002Fscripts\u002Femit.mjs --run=.creator\u002F\u003Crun> --project=.`. It writes `page.html` (block markup), `scaffold\u002F\u003Cproject paths>` and `emitted.json` (`files`, `commands`, `media`, `gaps`, `proposals`, `notes`, `blockType`, and the section `selector` verify uses). New blocks follow the project's existing block type, not the profile: ACF Composer classes when the project's blocks are ACF, `block.json` when they are native (`blockType`: `type`, `source` = `override` | `count` | `asked`, `counts`). Existing blocks keep their own markup, so one page can mix both. If emit refuses with `New blocks need a block type`, go back to `\u002Fcreator`: the person chooses once and the answer is recorded with `block-type.mjs --set=` or passed as `--blocks=`. Nothing in the project changes yet. When the project's existing blocks do not print `data-block`, add `--selector=\u003Ccss>` for the wrapper they do print.\n2. Token proposals first. Show `emitted.proposals` (value, role, suggested token). Add a token to the `@theme` block only when the person agrees, then run step 1 again so the views use the new utility. Never put a literal value or an arbitrary class (`text-[13px]`) in markup to avoid this step.\n3. For each new block, in order:\n   1. run the project's generator with the runner, exactly as listed in `emitted.commands` (for example `{{runner.acorn}} acf:block Stats --no-interaction`);\n   2. show the difference between the generated files and `scaffold\u002F\u003Cpath>` as a diff;\n   3. check what the prepared view assumes. ACF textarea fields follow the kivo-wise escaping rule `@textarea(...)` when emit finds `Blade::directive('textarea', …)` in the project's own code; otherwise the view uses `{!! nl2br(e(...)) !!}` and `emitted.notes` says so. Keep that fallback (it is not the forbidden `nl2br(esc_html())`), or, if the directive comes from a Composer package emit cannot see, switch back to `@textarea(...)`. Any other directive the view uses must exist in the project; if one does not, ask before changing the escaping;\n   4. copy the reviewed files over the generated ones;\n   5. native blocks (`blockType.type` is `native`, on any profile): `emitted.commands` is empty. If `{{runner.acorn}} list` shows a `make:block` generator, run it first and compare; otherwise copy `block.json`, the view and the CSS notes, then follow `emitted.notes` for the registration and the editor script, matching how the existing blocks do it.\n4. Rebuild caches: `{{runner.acorn}} acf:cache` (or `{{runner.cache}}`) so ACF Composer picks up the new fields.\n5. Media: for each `emitted.media` entry, import the file (`{{runner.wp}} media import \u003Csrc> --porcelain`) and put the attachment id in place of `null` for that field in `page.html`. Ask before importing remote files you do not recognise.\n6. Run the project's own checks on the new files (code style, static analysis, tests), as the project defines them.\n7. Report: blocks filled, blocks created (with paths), gaps with their reasons, tokens added or still proposed, media imported. Then hand over to `visual-fidelity`.\n\n## Verification\n\n- `git status` shows only the new block files, the `@theme` lines the person approved and nothing else.\n- The project's checks pass on the new files.\n- `page.html` has no `null` image ids left, or the report lists each one.\n\n## Failure modes\n\n| Symptom | Cause | Fix |\n|---|---|---|\n| `the match plan is not approved yet` | Open, low-confidence or invalid decisions | Go back to `section-matching` |\n| `New blocks need a block type` | Mixed project or no blocks yet, and no `creator.blocks` \u002F `--blocks` | Ask the person once (recommend `blockType.recommended` when there are no blocks); record it with `block-type.mjs --set=` or pass `--blocks=` |\n| Generator command not found | The project has no ACF Composer generator or uses its own stubs | Run `{{runner.acorn}} list`; use the project's generator; if there is none, ask before creating files by hand |\n| New fields missing in the editor | ACF Composer manifest not rebuilt | `{{runner.acorn}} acf:cache` (or `{{runner.cache}}`) |\n| A view uses a directive the project lacks | The directive is registered somewhere emit does not scan (a Composer package) or not at all | For `@textarea`, the fallback `{!! nl2br(e(...)) !!}` is safe; for anything else ask, do not swap in a different escaping on your own |\n| A proposal keeps coming back | The token was added under another name or namespace | Use the suggested namespace (`--color-*`, `--text-*`) so the mapper finds it |\n\n## Escalation\n\nAsk before adding any `@theme` token, before importing media from an unknown host, and whenever a generated block would duplicate an existing one with a different style.\n",{"name":5,"license":15,"description":7,"compatibility":44},"Node 20+. Project commands go through the runner from the kivo-wise session context. emit.mjs writes only under .creator\u002F\u003Crun>\u002F.","main","4045a2f672c1d4c1b4a5a5712b468c5d73ca6724","plugins\u002Fkivo-creator\u002Fskills\u002Fblock-scaffolding-from-design",0,"https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise","https:\u002F\u002Fhekivo.github.io\u002Fkivo-wise\u002F","https:\u002F\u002Fgithub.com\u002Fhekivo","https:\u002F\u002Fhekivo.dev","2026-11-08 06:10:39",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add hekivo\u002Fkivo-wise --skill block-scaffolding-from-design",{"tool":60,"command":61},"bunx","bunx skills add hekivo\u002Fkivo-wise --skill block-scaffolding-from-design",{"tool":63,"command":64},"pnpm","pnpm dlx skills add hekivo\u002Fkivo-wise --skill block-scaffolding-from-design","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fplugins\u002Fkivo-creator\u002Fskills\u002Fblock-scaffolding-from-design\u002FSKILL.md",true,[],[69,95,111,132,151,172],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":39},"01M6GKWJDFKQM27HTFXX20QVTP","wp-rest-api","Use when building, extending, or debugging WordPress REST API endpoints\u002Froutes: register_rest_route, WP_REST_Controller\u002Fcontroller classes, schema\u002Fargument validation, permission_callback\u002Fauthentication, response shaping, register_rest_field\u002Fregister_meta, or exposing CPTs\u002Ftaxonomies via show_in_rest.","https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fthird-party\u002Fwp-rest-api\u002FSKILL.md",[],[76,77,78,79,80,81,82,83,84,85,86,87,88,33,89,90,91,92,93,94],"REST","api","wp rest api","rest api","wordpress","workflows","debugging","authentication","Meta","controller","Bash","shaping","filesystem","schema","show","route","register","with","wp-cli",{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":39},"01M6GKWEA5BMJZ2RPPEEJTCC3N","wp-abilities-api","Use when working with the WordPress Abilities API (wp_register_ability, wp_register_ability_category, \u002Fwp-json\u002Fwp-abilities\u002Fv1\u002F*, @wordpress\u002Fabilities) including defining abilities, categories, meta, REST exposure, and permissions checks for clients.","https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fthird-party\u002Fwp-abilities-api\u002FSKILL.md",[],[77,102,103,80,81,104,84,76,86,105,106,88,107,33,92,108,109,93,110,94],"wp abilities api","cli","permissions","php","json","node","targets","clients","categories",{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":39},"01M6GKWA4GG2BZRFXCR9E73VR7","wp-security-escaping","Use when writing or reviewing code that outputs data, handles input or checks permissions in a WordPress + Acorn project - Blade {{ }} vs {!! !!}, esc_html, esc_attr, esc_url, wp_kses_post, \"&#038; in the URL\", double escaping, sanitize_text_field, nonces, current_user_can, map_meta_cap, permission_callback, $wpdb->prepare, whereRaw, file uploads, escaping ACF values, secrets in .env. For route middleware use acorn-routes-api; for ACF validation use acf-native; for Livewire actions use acorn-livewire.","https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fskills\u002Fwp-security-escaping\u002FSKILL.md",[],[118,119,120,38,121,104,122,84,77,123,124,125,126,91,127,28,128,129,130,131],"security","wp security","wp security escaping","code","actions","secrets","livewire","text","cap","map","middleware","native","URL","routes-api",{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":39},"01M6GKW6VVY73BMZ3JNDMR4CWZ","wp-phpstan","Use when configuring, running or fixing PHPStan in a WordPress project that uses Acorn - phpstan.neon, baseline, szepeviktor\u002Fphpstan-wordpress stubs, larastan, level raising, \"Cannot access property on mixed\", get_field() types, paths for app\u002F. For Pint or Mago formatting use testing-wp; for runtime errors use roots-debugging.","https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fskills\u002Fwp-phpstan\u002FSKILL.md",[],[139,140,80,82,141,142,33,28,143,144,145,146,147,148,149,150],"wp phpstan","testing","baseline","access","get","neon","runtime","formatting","app","paths","types","errors",{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":157,"publishedAt":39},"01M6GKW3JRSRS9N112QFA3SEGT","wp-performance","Use when a WordPress page, query or request is slow or needs profiling - TTFB, slow or N+1 queries, Query Monitor, Server-Timing, wp profile and wp doctor, autoloaded options, Redis object cache hit rate, transients, WP_CACHE_KEY_SALT. Adds the runner and Redis notes on top of the official procedure. For Eloquent query design use acorn-data; for PHP type errors use wp-phpstan.","https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fskills\u002Fwp-performance\u002FSKILL.md",[],[158,159,22,80,160,161,162,163,164,165,166,167,36,33,168,30,169,170,171,150],"performance","wp performance","query design","official","notes","monitor","doctor","cache","server","redis","queries","query","type","timing",{"skillNo":173,"name":174,"nameZh":6,"description":175,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":176,"categories":177,"keywords":178,"publishedAt":39},"01M6GKVZN243XQB5QWZ5ZKMG7P","wp-hooks-lifecycle","Use when adding, moving or debugging WordPress actions and filters in an Acorn project - add_action\u002Fadd_filter priority and accepted_args, where a hook belongs (setup or filters files vs a provider boot()), load order (mu-plugins, plugins_loaded, after_setup_theme, init), when Acorn boots per profile, hooks that never fire on Acorn routes, REST or Livewire requests (template_redirect, wp_head), save_post firing twice in the block editor, the_content priorities. For ACF hooks use acf-native; for provider structure use acorn-stack.","https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fskills\u002Fwp-hooks-lifecycle\u002FSKILL.md",[],[179,180,181,80,182,183,82,122,76,184,124,33,185,186,31,187,188,28,189,190],"lifecycle","hooks","wp hooks lifecycle","init","boot","stack","never","filters","provider","structure","filter","theme"]