Wordpress Router
Use when the user asks about WordPress codebases (plugins, themes, block themes, Gutenberg blocks, WP core checkouts) and you need to quickly
What Is This?
Overview
The WordPress Router is a classification and routing skill designed for AI agents working with WordPress codebases. When a user presents a WordPress project, whether it is a plugin, theme, block theme, Gutenberg block, or a WP core checkout, this skill analyzes the repository structure and directs the workflow to the appropriate specialized handler. Rather than applying generic code assistance, the router ensures that each type of WordPress project receives targeted, context-aware support.
The skill operates as a filesystem-based agent using bash and Node.js, with optional WP-CLI integration for deeper inspection. It targets WordPress 6.9 and later, with PHP 7.2.24 as the minimum supported runtime. By identifying the project type early in the workflow, the router eliminates guesswork and reduces the time spent applying incorrect patterns to a codebase.
This routing layer sits at the entry point of a broader set of WordPress-specific workflows covering blocks, theme.json configuration, REST API development, WP-CLI scripting, performance optimization, security auditing, testing, and release packaging. It acts as the intelligent dispatcher that connects a user's request to the correct downstream skill.
Who Should Use This
- WordPress plugin developers who need consistent, type-aware assistance across multiple projects
- Theme and block theme authors working with Full Site Editing and theme.json configurations
- Gutenberg block developers building custom blocks with block.json and React-based edit components
- Agencies and freelancers managing diverse WordPress codebases that span multiple project types
- DevOps engineers automating WordPress deployments and release packaging pipelines
- AI agent developers building WordPress-focused toolchains who need a reliable classification layer
Why Use It?
Problems It Solves
- Misrouted assistance: Without classification, a generic agent may apply plugin patterns to a block theme or REST API conventions to a WP-CLI script, producing incorrect or misleading guidance.
- Time lost on context-setting: Developers repeatedly explaining project type and structure to get relevant help is inefficient. The router automates this identification step.
- Inconsistent workflows: Different WordPress project types require different file structures, APIs, and tooling. The router enforces the correct workflow for each type automatically.
- Tooling mismatches: Some workflows require WP-CLI, others require Node.js build tools. The router detects available tooling and routes accordingly.
Core Highlights
- Automatically classifies WordPress repositories into plugins, themes, block themes, Gutenberg blocks, or core checkouts
- Routes each project type to a specialized downstream workflow or skill
- Operates with bash and Node.js, requiring no additional runtime beyond a standard WordPress development environment
- Supports WP-CLI integration for projects that require database or environment inspection
- Targets WordPress 6.9 and later with backward compatibility to PHP 7.2.24
- Reduces repeated context-setting by capturing project type at the start of every session
- Serves as the entry point for workflows covering REST API, performance, security, testing, and release packaging
How to Use It?
Basic Usage
The router inspects the repository root to determine project type. A typical classification check looks at key indicator files:
## Check for plugin indicator
if [ -f "$(ls *.php | head -1)" ]; then
grep -l "Plugin Name:" *.php
fi
## Check for block theme indicator
if [ -f "theme.json" ] && [ -f "templates/index.html" ]; then
echo "block-theme"
fi
## Check for standalone block
if [ -f "block.json" ]; then
echo "gutenberg-block"
fiSpecific Scenarios
Scenario 1: Incoming plugin repository. The router detects a PHP file containing the Plugin Name: header, confirms the presence of a readme.txt, and routes the session to the plugin workflow covering hooks, filters, REST API endpoints, and release packaging.
Scenario 2: Block theme project. The router finds both theme.json and an templates/index.html file, confirming Full Site Editing structure, then routes to the block theme workflow for theme.json schema validation and template part management.
Real-World Examples
A developer opens a repository containing my-plugin.php with a plugin header. The router classifies it as a plugin and immediately applies plugin-specific linting rules and packaging conventions.
An agency submits a theme folder with theme.json and a parts/ directory. The router identifies it as a block theme and loads the appropriate theme.json and Gutenberg template workflows.
Important Notes
Requirements
- WordPress 6.9 or later in the target environment
- PHP 7.2.24 or higher on the server or local development environment
- Bash and Node.js available in the agent execution environment
- WP-CLI installed for workflows that require environment or database inspection
FAQ
Q: How does the Wordpress Router skill help with navigating WordPress codebases?
The Wordpress Router skill quickly directs Happycapy AI agents to the right resources for plugins, themes, block themes, Gutenberg blocks, and WP core checkouts. This makes it easier to find relevant code sections within large WordPress projects.
Q: Can I use the Wordpress Router skill to locate specific WordPress plugin files?
Yes, this skill allows Happycapy Skills to efficiently identify and route requests to specific plugin files within a WordPress codebase, streamlining plugin development and troubleshooting.
Q: Is the Wordpress Router skill compatible with AI agent workflows for theme development?
Absolutely, the skill is designed to support AI agent workflows by helping them access and organize theme and block theme files in WordPress projects.
Q: What types of WordPress components can the Wordpress Router skill handle?
The skill supports routing for plugins, themes, block themes, Gutenberg blocks, and WP core checkouts, making it a versatile addition to your Happycapy Skills toolkit.
Q: How do I add the Wordpress Router skill to my Happycapy AI agent setup?
You can integrate the Wordpress Router skill by following the instructions on its GitHub page. Once added, it enhances your AI agent's ability to navigate and manage WordPress codebases using Happycapy Skills.
More Skills You Might Like
Explore similar skills to enhance your workflow
Vertex AI API Dev
Guides the usage of Gemini API on Google Cloud Vertex AI with the Gen AI SDK. Use when the user asks about using Gemini in an enterprise
Wp Playground
Use for WordPress Playground workflows: fast disposable WP instances in the browser or locally via @wp-playground/cli (server, run-blueprint,
Xlsx
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs t
CQRS Implementation
Comprehensive guide to implementing CQRS (Command Query Responsibility Segregation) patterns
Go Concurrency Patterns
Production patterns for Go concurrency including goroutines, channels, synchronization primitives, and context management
Localization Pipeline
argument-hint: "[scan|extract|validate|status|brief|cultural-review|vo-pipeline|rtl-check|freeze|qa]"