Skip to content

prepare-wordpress

Feel free to fork and customize this skill for your specific needs. The provided code is a starting point for me when I need to quickly set up a WordPress project with best practices. It can be extended to include additional tools, configurations, or support for specific frameworks (like React, Vue, etc.) as needed.

An agent skill that scaffolds (or updates) a WordPress project with dev tooling, coding standards, testing, and i18n support.

Works with Claude Code, VS Code Copilot, and other agents that support the skills format.

SkillPurpose
prepare-wordpressScaffold or update a WordPress project with dev tooling, coding standards, testing, and i18n support
wp-bumpBump a WordPress plugin version, update changelogs, rebuild assets, and run tests
Terminal window
# WordPress project setup
npx skills add https://github.com/soderlind/prepare-wordpress --skill prepare-wordpress -g
# WordPress plugin version bump workflow
npx skills add https://github.com/soderlind/prepare-wordpress --skill wp-bump -g

-g installs globally (available in all projects). Without it, the skill is installed into the current project only.

When triggered, the skill prompts for plugin metadata, runs a detection script to check your project’s current state, then only adds what’s missing:

PhaseWhat it sets up
MetadataPrompts for plugin name, description, author, license, WP/PHP versions, git remote URL
Plugin fileCreates <slug>.php with a standard WordPress plugin header
readme.txtCreates a WordPress.org-style readme.txt (optional)
Initgit init, git remote add origin, npm init -y, composer init (if missing)
Agent skillsInstalls 6 WordPress dev skills from automattic/agent-skills and jeffallan/claude-skills
ComposerPHPUnit, Pest, WPCS, PHPCS installer + test, lint, and check scripts
Config files.editorconfig (4-space, UTF-8, LF) and .gitignore (vendor, node_modules, .env)
Vitestvitest + jsdom, config file, test setup, and test:js npm script
i18ni18n-map.json template, languages/ directory, and WP-CLI i18n npm scripts
CleanupRemoves stray yarn.lock created by npx commands

Use the planner to preview what will run before writing changes:

Terminal window
node skills/prepare-wordpress/scripts/plan_setup.mjs --dry-run

Limit execution to specific phases:

Terminal window
node skills/prepare-wordpress/scripts/plan_setup.mjs --dry-run --only=init,composer,config

Skip phases you do not want:

Terminal window
node skills/prepare-wordpress/scripts/plan_setup.mjs --dry-run --skip=skills,vitest

Apply safe shell commands from the plan:

Terminal window
node skills/prepare-wordpress/scripts/plan_setup.mjs --apply --only=init,skills,composer

Get machine-readable dry-run plan output for tools/automation:

Terminal window
node skills/prepare-wordpress/scripts/plan_setup.mjs --json --only=init,composer

Get machine-readable apply output (includes per-phase command results):

Terminal window
node skills/prepare-wordpress/scripts/plan_setup.mjs --json --apply --only=cleanup

Available phase flags: plugin, readme, init, skills, composer, config, vitest, i18n, cleanup.

The skill’s detection script checks for existing files and configs before each phase. If something already exists, it’s skipped (or merged in the case of .gitignore). Existing plugin files, readme.txt, git remote origin, and installed agent skills are all detected automatically.

After installation, the skills are triggered automatically when you ask your agent to prepare/scaffold a WordPress project or bump a plugin version. Examples:

Prepare this project for WordPress plugin development
Set up dev tooling for this WordPress project
Add testing, linting, and i18n to this WordPress plugin
Bump this WordPress plugin to 1.2.3 and update the changelog
Run wp-bump for version 1.2.3
  1. i18n-map.json — Replace BLOCK-NAME with your actual block directory names (if you have blocks)
  2. Run composer install and npm install

The text domain and plugin slug are derived from the current folder name automatically.

  • Node.js 18+
  • Composer 2+
  • PHP 8.3+
  • git
  • WP-CLI (for i18n commands)
Terminal window
# List installed skills
npx skills list -g
# Update to latest version
npx skills update prepare-wordpress -g
# Remove
npx skills remove prepare-wordpress -g

GPL-2.0-or-later

When AI tools contribute to development, include an assisted-by tag in relevant commit messages, pull requests, or release notes:

Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]