AGENT SKILL

creator

Use when the person runs the creator command to turn a Figma frame, an HTML file or a URL into a WordPress page on the Roots stack - routes the source, runs the ingest, builds and checks the match plan, and stops for approval before anything is emitted. Resumes a run with --run=.creator/<run>. For one step on its own use html-ingest, figma-ingest, section-matching, block-scaffolding-from-design or visual-fidelity.

License 许可
MIT
所属仓库
hekivo/kivo-wise
最近更新
2026-11-08
Stars
★ 14
Forks
0

01 前言 Front Matter

name
creator
license
MIT
description
Use when the person runs the creator command to turn a Figma frame, an HTML file or a URL into a WordPress page on the Roots stack - routes the source, runs the ingest, builds and checks the match plan, and stops for approval before anything is emitted. Resumes a run with --run=.creator/<run>. For one step on its own use html-ingest, figma-ingest, section-matching, block-scaffolding-from-design or visual-fidelity.
compatibility
Requires the kivo-wise plugin (stack detection, runner context). Node 20+; Playwright in the target project for HTML sources and verification; the official Figma MCP server for Figma sources.
disable-model-invocation
true

03 SKILL.md 正文

/creator

Arguments: <figma.com URL | file.html | https URL> or --run=.creator/<run> to resume.

When to use

  • The person typed the command with a source or a run folder.
  • Never start it on your own; the individual skills cover single steps.

Inputs required

  1. A source (Figma frame URL with node-id, an .html file or an http(s) URL), or an existing run folder.
  2. The target stack: .roots-stack.json at the project root. If it is missing, run kivo-wise /roots-detect --write first (or ask the person).
  3. The kivo-creator plugin root (two levels above this skill's folder).

Procedure

  1. Route the source. figma.com/design/... or figma.com/file/... → figma-ingest. A path ending in .html or an http(s) URL → html-ingest. --run= → skip to step 3 with that folder. Anything else: ask. There is no fallback: if the Figma MCP server is missing, stop with the instructions from figma-ingest.
  2. Ingest with the routed skill. It ends with valid specs in .creator/<run>/specs/.
  3. Match with section-matching until node <kivo-creator>/scripts/match.mjs --run=.creator/<run> --check --project=. passes.
    • Block type for new blocks. New blocks follow the project's existing pattern: ACF Composer projects get ACF blocks, block.json projects get native blocks, whatever the profile. match.mjs prints blockType (also in match-plan.json and match-plan.md). creator.blocks in .roots-stack.json wins (source: "override"); otherwise the count of existing blocks decides when one type holds at least 80% (source: "count").
    • When blockType.type is null and the plan scaffolds anything, ask the person once: for reason: "mixed" show counts and ask which type new blocks use; for reason: "none" recommend blockType.recommended (the profile default). Then offer to record the answer: node <kivo-creator>/scripts/block-type.mjs --set=<acf|native> --project=. writes "creator": { "blocks": "<type>" } into .roots-stack.json and keeps its other keys. If the person does not want it recorded, pass --blocks=<type> to match.mjs --check and later to emit.mjs (source: "asked"). Never pick the type yourself.
  4. Stop. Show .creator/<run>/match-plan.md, the gaps and any question still open, and ask the person to approve the plan. Do not emit, scaffold or edit project files in this turn.
  5. After the person approves (a later message): block-scaffolding-from-design, then visual-fidelity (at most three fix rounds). Finish with the fidelity report.

Verification

  • At the stop point the working tree of the project is unchanged apart from .creator/ (git status).
  • match.mjs --check passes on the plan you show.

Failure modes

Symptom Cause Fix
No profile found No .roots-stack.json and no detector output Run kivo-wise /roots-detect --write, then resume with --run=
Figma tools unavailable The Figma MCP server is not connected in this session Stop; follow the connection steps in figma-ingest
Plan check fails Open or invalid decisions Finish section-matching before stopping
New blocks need a block type Mixed project (neither type reaches 80%) or no blocks yet, and no creator.blocks Ask the person once; record with block-type.mjs --set= or pass --blocks=
creator.blocks must be "acf" or "native" Invalid value in .roots-stack.json Fix the value (or remove the key to go back to counting)
Files appear in the project before approval Emit started too early Revert them; emitting waits for approval

Escalation

Every run stops at the match plan for the person's approval. Ask again before emitting if the plan changed after it was approved.

04 同仓库更多 Skills

hekivo
hekivo/kivo-wise

wp-rest-api

Use when building, extending, or debugging WordPress REST API endpoints/routes: register_rest_route, WP_REST_Controller/controller classes, schema/argument validation, permission_callback/authentication, response shaping, register_rest_field/register_meta, or exposing CPTs/taxonomies via show_in_rest.

★ 14
hekivo
hekivo/kivo-wise

wp-abilities-api

Use when working with the WordPress Abilities API (wp_register_ability, wp_register_ability_category, /wp-json/wp-abilities/v1/*, @wordpress/abilities) including defining abilities, categories, meta, REST exposure, and permissions checks for clients.

★ 14
hekivo
hekivo/kivo-wise

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.

★ 14
hekivo
hekivo/kivo-wise

wp-phpstan

Use when configuring, running or fixing PHPStan in a WordPress project that uses Acorn - phpstan.neon, baseline, szepeviktor/phpstan-wordpress stubs, larastan, level raising, "Cannot access property on mixed", get_field() types, paths for app/. For Pint or Mago formatting use testing-wp; for runtime errors use roots-debugging.

★ 14
hekivo
hekivo/kivo-wise

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.

★ 14
hekivo
hekivo/kivo-wise

wp-hooks-lifecycle

Use when adding, moving or debugging WordPress actions and filters in an Acorn project - add_action/add_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.

★ 14