wp-spec-to-goal
Convert a WordPress plugin or feature idea (even a vague one) into a Codex /goal-ready bundle — GOAL.md, VERIFY.md, PROGRESS.md inside goals/<slug>/ — with wp-env + playwright-cli + wp-eval verification baked in. Asks clarifying questions in focused batches (each with options + recommendation + reasoning), reaches 95% confidence, optionally scaffolds a missing plugin folder + .wp-env.json + package.json + AGENTS.md, and emits a tailored /goal command. For new WP plugin or feature work, not bug fixes or non-WordPress projects.
nathanonn · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add nathanonn/agent-skills --skill wp-spec-to-goal技能说明
name: wp-spec-to-goal description: Convert a WordPress plugin or feature idea (even a vague one) into a Codex /goal-ready bundle — GOAL.md, VERIFY.md, PROGRESS.md inside goals// — with wp-env + playwright-cli + wp-eval verification baked in. Asks clarifying questions in focused batches (each with options + recommendation + reasoning), reaches 95% confidence, optionally scaffolds a missing plugin folder + .wp-env.json + package.json + AGENTS.md, and emits a tailored /goal command. For new WP plugin or feature work, not bug fixes or non-WordPress projects. disable-model-invocation: true
wp-spec-to-goal — Vague WP Plugin Idea → Codex /goal Bundle
Turn a rough WordPress plugin or feature idea into the three files Codex /goal needs to drive autonomous implementation:
goals/<slug>/
GOAL.md what done looks like (full WP plugin template)
VERIFY.md how /goal proves it's done (wp-env + playwright-cli + wp-eval, folded in)
PROGRESS.md the audit trail /goal will populate
The skill optionally scaffolds a missing plugin (plugin folder + .wp-env.json + package.json + AGENTS.md) and prints a tailored /goal command at the end.
Prerequisite — playwright-cli. The generated
VERIFY.mddrives browser-visible checks through playwright-cli. Install it once on the machine that runs/goal:npm install -g @playwright/cli@latestthenplaywright-cli install --skills(needs Node.js 18+). If it isn't installed, this skill still produces the bundle — it just prepends a "Setup prerequisites" section toVERIFY.mdso/goalknows to install it first.
Why this skill exists
A full multi-prompt workflow kit is overkill for plugins or features that fit in one or two goal slices. This skill collapses the "spec → goal trio" hop into a single guided conversation that:
- batches clarifying questions (so the user makes 2-3 decisions per round, not 20)
- recommends a default for every choice (so they can move fast when the recommendation looks right)
- bakes in the standard stack: wp-env + playwright-cli + wp-eval
- writes the same template shapes already validated in their templates kit (full WordPress GOAL.md / VERIFY.md)
It does not replace the multi-prompt kit when shipping a complex plugin from a long requirements doc. Use the kit for big builds; use this skill for the small-to-medium ones — and "small to medium" is genuinely small to medium, not just trivially simple.
Core flow
- Probe the project — inspect the cwd to learn what's already in place.
- Decide single goal vs. multi-goal — judge complexity from the spec; if multi-shaped, offer to split via
goals-plan.md. - Ask in focused batches — 2-4 questions per round, each with options + recommendation + reasoning, until 95% confident.
- Optionally scaffold — if the project is missing pieces and the user agrees, create only what they confirm.
- Write the goal trio — GOAL.md + VERIFY.md (with wp-env / playwright-cli / wp-eval folded in) + initial PROGRESS.md, at
goals/<slug>/. - Hand off — print the file paths + a tailored
/goalcommand + a short "how to run" note.
Never write any files until confidence on what's about to be produced is at 95%+.
Step 1 — Probe the project
Before asking the user anything, inspect the cwd. The point is to ground recommendations in reality so questions don't waste the user's time on things already settled by the project state.
Look for:
.wp-env.jsonat root → wp-env is wired; note the port (default 8888)composer.jsonat root or in plugin folder → existing PHP project structure / namespace conventions<candidate-slug>/<candidate-slug>.php→ existing plugin to extend rather than creategoals/folder present → previous goal runs; pick a non-conflicting<slug>if needed.claude/skills/playwright-cli/SKILL.mdavailable → playwright-cli skill is reachablepackage.jsonat root mentioningplaywrightor playwright-cli wrapper scriptsAGENTS.mdpresent → respect existing conventions; surface them in scope decisionsprotocols/run_goal_tests.md→ user already runs the canonical verification protocol
Use this to inform Step 3 recommendations. Skip questions that the probe already answers (e.g., don't ask "should we wire wp-env?" if .wp-env.json is present — only confirm the port).
Step 2 — Judge complexity
Read the user's spec and decide whether it fits one goal or wants to be split. The spec is multi-goal-shaped when any of these hold:
- More than ~3 distinct user stories
- More than ~5 acceptance criteria spread across unrelated surfaces (admin UI + REST + WP-CLI + cron)
- A clear "phase 1 / phase 2" or "MVP then enhancements" reading
- A walking-skeleton step that has to land before vertical slices make sense
- Touches multiple unrelated WordPress subsystems (REST + Block editor + WooCommerce hooks, etc.)
If multi-goal, surface it before any other clarifying questions:
This spec looks like it could be 2-3 separate goals. I can either generate one combined goal or write a
goals-plan.mdand scaffold the first slice. Which do you prefer?
If the user picks split, write goals-plan.md at the project root with a numbered list of proposed goals (each with a 1-2 line description), then ask which slice to generate first. Re-run the skill later for the next slice.
If single, continue.
Step 3 — Ask clarifying questions
Use the AskUserQuestion tool when available. If it isn't (older harness, plain chat, etc.), fall back to natural-language Q&A in chat with the same shape: 2-4 questions per round, each with 2-4 options, with the recommended option first and labeled (Recommended), plus a one-line reason for the recommendation.
Aim for ≤3 rounds total. Skip any question already answered by the spec or the probe.
Round 1 — identity + project context
Sample questions to consider (only
阅读完整来源 ↗