wordpress-router

Use at the start of WordPress tasks to classify the repo type (plugin, theme, block theme, WP core, full site) and route to the correct workflow/skill (blocks, theme.json, REST API, WP-CLI, performance, security, testing).

⭐3stars🔀0forks📁View on GitHub🕐Updated Jan 2, 2026⬇️1downloads

When & Why to Use This Skill

The WordPress Router is an essential orchestration skill designed to optimize AI-driven WordPress development. It automatically analyzes the structure of a repository to classify it as a plugin, classic theme, block theme, or WordPress core installation. By identifying the specific codebase type at the start of a task, it ensures the agent routes to the most effective sub-skills—such as Gutenberg development, WP-CLI operations, or security auditing—while maintaining environment-specific guardrails and best practices.

Use Cases

  • Automated Project Classification: Use this skill at the beginning of a session to instantly determine if you are working on a standalone plugin, a block-based theme, or a full site environment.
  • Intelligent Workflow Routing: Seamlessly transition from general coding to specialized tasks like Gutenberg block creation or REST API development based on detected file indicators like 'theme.json' or 'block.json'.
  • Environment-Specific Guardrails: Ensure that performance reviews and security audits are applied correctly by identifying whether the codebase targets WordPress Core or third-party extensions.
  • Legacy vs. Modern Theme Support: Automatically distinguish between classic PHP themes and modern block themes to apply the correct templating logic and CSS standards.
namewordpress-router
description"Use at the start of WordPress tasks to classify the repo type (plugin, theme, block theme, WP core, full site) and route to the correct workflow/skill (blocks, theme.json, REST API, WP-CLI, performance, security, testing)."
compatibility"Targets WordPress 6.9+ (PHP 8.0+). Filesystem-based agent with bash + node."

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)
  • User's intent (what they want changed) and any constraints (WP version targets, release requirements)

Procedure

1) Detect project type

Run quick detection checks:

# Check for plugin indicators
ls -la | grep -E "^-.*\.php$" | head -3
grep -l "Plugin Name:" *.php 2>/dev/null

# Check for theme indicators
ls style.css 2>/dev/null && head -20 style.css

# Check for block theme indicators
ls theme.json 2>/dev/null
ls -d templates/ parts/ 2>/dev/null

# Check for WP core
ls wp-includes/ wp-admin/ 2>/dev/null

# Check for full site
ls wp-content/ 2>/dev/null

2) Classify the project

Indicators Type Primary Skill
Plugin Name: in PHP header Plugin wp-plugin-development
style.css with Theme Name: Classic Theme wp-theme-development
theme.json + templates/ Block Theme wp-block-themes
block.json files Has Blocks wp-gutenberg-blocks
wp-includes/ + wp-admin/ WP Core Core development workflow
wp-content/ present Full Site Multiple skills as needed

3) Route to domain workflow

Based on user intent + repo kind:

Intent Route To
Create/modify Gutenberg blocks wp-gutenberg-blocks
Block theme work (theme.json, templates) wp-block-themes
Add interactivity (data-wp-* directives) wp-interactivity-api
Plugin architecture, hooks, Settings API wp-plugin-development
Performance profiling/optimization wp-performance-review
Security audit wp-security-review
WP-CLI operations wp-wpcli-and-ops
Testing in isolation wp-playground

4) Apply guardrails

Before making changes:

  • Confirm any version constraints if unclear
  • Prefer the repo's existing tooling and conventions
  • Check for existing tests/lint configs

Verification

  • Re-run detection if you create or restructure significant files
  • Run the repo's lint/test/build commands if available

Failure modes / debugging

  • If detection is unclear, inspect:
    • Root composer.json, package.json
    • style.css, block.json, theme.json
    • wp-content/ structure
  • If repo is huge, narrow scanning scope

Escalation

If routing is ambiguous, ask:

"Is this intended to be a WordPress plugin, a theme (classic/block), or a full site repo?"