
Wordpress Router
Classify a WordPress repo (plugin, theme, block theme, core checkout) and route the agent to the right WP workflow before editing code.
Overview
WordPress Router is an agent skill most often used in Build (also Ship security and testing) that triages WordPress repos and routes tasks to the correct WP domain workflow.
Install
npx skills add https://github.com/wordpress/agent-skills --skill wordpress-routerWhat is this skill?
- Runs node skills/wp-project-triage/scripts/detect_wp_project.mjs for filesystem-based classification
- Distinguishes plugin vs theme vs block theme vs WP core checkout vs full site
- Surfaces tooling: PHP/Composer, Node, @wordpress/scripts, PHPUnit, Playwright, wp-env
- Decision tree in skills/wordpress-router/references/decision-tree.md for intent-based routing
- Targets WordPress 6.9+ (PHP 7.2.24+); some flows need WP-CLI
Adoption & trust: 2k installs on skills.sh; 1.6k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You opened a WordPress repo and the agent started changing files without knowing if it is a plugin, block theme, or core checkout.
Who is it for?
Agents and builders starting WordPress plugin, theme, block, or core-adjacent tasks who need structured routing.
Skip if: Pure content editing in wp-admin, non-WordPress stacks, or repos where project type and target skill are already explicit and approved.
When should I use this skill?
User asks about WordPress codebases (plugins, themes, block themes, Gutenberg blocks, WP core checkouts) and you need to classify the repo and route to the correct workflow/skill.
What do I get? / Deliverables
You get a classified project profile, guardrails for version and tooling, and delegation pointers to the right WordPress domain skills before implementation.
- Project kind classification from triage output
- Recommended domain skill/workflow route from decision tree
- Guardrail notes on tooling and tests present
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
WordPress work starts with knowing what you are in; routing belongs at Build integrations because most solo WP products are plugins, themes, or blocks touching WP APIs. Repo triage and delegation to domain skills is integration-layer orchestration across Gutenberg, REST, WP-CLI, and release flows—not generic frontend styling alone.
Where it fits
Triage a new clone to decide whether block registration or classic theme PHP is the right edit surface.
Route REST API extension work after detecting plugin structure and Composer autoloading.
Choose PHPUnit vs Playwright vs wp-env workflows once triage lists available test runners.
Apply version guardrails for WordPress 6.9+ before an agent edits security-sensitive plugin code.
How it compares
Meta routing skill for WordPress repos—not a replacement for block, REST, security, or release-specific skills it delegates to.
Common Questions / FAQ
Who is wordpress-router for?
Solo developers and agents working on WordPress plugins, themes, block themes, Gutenberg blocks, or WP core checkouts who need correct workflow selection.
When should I use wordpress-router?
At task start when users ask about WordPress codebases; during Build integrations for new features; during Ship for security, testing, or release packaging paths the decision tree exposes.
Is wordpress-router safe to install?
It runs local Node triage scripts and may assume bash, Node, and optional WP-CLI—review Security Audits on this Prism page and your repo before executing bundled scripts.
SKILL.md
READMESKILL.md - Wordpress Router
# WordPress Router ## When to use Use this skill at the start of most WordPress tasks to: - identify what kind of WordPress codebase this is (plugin vs theme vs block theme vs WP core checkout vs full site), - pick the right workflow and guardrails, - delegate to the most relevant domain skill(s). ## Inputs required - Repo root (current working directory). - The user’s intent (what they want changed) and any constraints (WP version targets, WP.com specifics, release requirements). ## Procedure 1. Run the project triage script: - `node skills/wp-project-triage/scripts/detect_wp_project.mjs` 2. Read the triage output and classify: - primary project kind(s), - tooling available (PHP/Composer, Node, @wordpress/scripts), - tests present (PHPUnit, Playwright, wp-env), - any version hints. 3. Route to domain workflows based on user intent + repo kind: - For the decision tree, read: `skills/wordpress-router/references/decision-tree.md`. 4. Apply guardrails before making changes: - Confirm any version constraints if unclear. - Prefer the repo’s existing tooling and conventions for builds/tests. ## Verification - Re-run the triage script if you create or restructure significant files. - Run the repo’s lint/test/build commands that the triage output recommends (if available). ## Failure modes / debugging - If triage reports `kind: unknown`, inspect: - root `composer.json`, `package.json`, `style.css`, `block.json`, `theme.json`, `wp-content/`. - If the repo is huge, consider narrowing scanning scope or adding ignore rules to the triage script. ## Escalation - If routing is ambiguous, ask one question: - “Is this intended to be a WordPress plugin, a theme (classic/block), or a full site repo?” # Router decision tree (v1) This is a lightweight routing guide. It assumes you can run `wp-project-triage` first. ## Step 1: classify repo kind (from triage) Use `triage.project.kind` and the strongest signals: - `wp-core` → treat as WordPress core checkout work (core patches, PHPUnit, build tools). - `wp-site` → treat as a full site repo (wp-content present; changes might be theme + plugins). - `wp-block-theme` → theme.json/templates/patterns workflows. - `wp-theme` → classic theme workflows (templates PHP, `functions.php`, `style.css`). - `wp-block-plugin` → Gutenberg block development in a plugin (block.json, build pipeline). - `wp-plugin` / `wp-mu-plugin` → plugin workflows (hooks, admin, settings, cron, REST, security). - `gutenberg` → Gutenberg monorepo workflows (packages, tooling, docs). If multiple kinds match, prefer the most specific: `gutenberg` > `wp-core` > `wp-site` > `wp-block-theme` > `wp-block-plugin` > `wp-theme` > `wp-plugin`. ## Step 2: route by user intent (keywords) Route by intent even if repo kind is broad (like `wp-site`): - **Interactivity API / data-wp-* directives / @wordpress/interactivity / viewScriptModule** - Route → `wp-interactivity-api`. - **Abilities API / wp_register_ability / wp-abilities/v1 / @wordpress/abilities** - Route → `wp-abilities-api`. - **Playground / run-blueprint / build-snapshot / @wp-playground/cli / playground.wordpress.net** - Route → `wp-playground`. - **Blocks / block.json / registerBlockType / attributes / save serialization** - Route → `wp-block-development`. - **theme.json / Global Styles / templates/*.html / patterns/** - Route → `wp-block-themes`. - **Plugins / hooks / activation hook / uninstall / Settings API / admin pages** - Route → `wp-plugin-development`. - **RES