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.
Included skills
Section titled “Included skills”| Skill | Purpose |
|---|---|
prepare-wordpress | Scaffold or update a WordPress project with dev tooling, coding standards, testing, and i18n support |
wp-bump | Bump a WordPress plugin version, update changelogs, rebuild assets, and run tests |
Install
Section titled “Install”# WordPress project setupnpx skills add https://github.com/soderlind/prepare-wordpress --skill prepare-wordpress -g
# WordPress plugin version bump workflownpx 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.
What prepare-wordpress does
Section titled “What prepare-wordpress does”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:
| Phase | What it sets up |
|---|---|
| Metadata | Prompts for plugin name, description, author, license, WP/PHP versions, git remote URL |
| Plugin file | Creates <slug>.php with a standard WordPress plugin header |
| readme.txt | Creates a WordPress.org-style readme.txt (optional) |
| Init | git init, git remote add origin, npm init -y, composer init (if missing) |
| Agent skills | Installs 6 WordPress dev skills from automattic/agent-skills and jeffallan/claude-skills |
| Composer | PHPUnit, Pest, WPCS, PHPCS installer + test, lint, and check scripts |
| Config files | .editorconfig (4-space, UTF-8, LF) and .gitignore (vendor, node_modules, .env) |
| Vitest | vitest + jsdom, config file, test setup, and test:js npm script |
| i18n | i18n-map.json template, languages/ directory, and WP-CLI i18n npm scripts |
| Cleanup | Removes stray yarn.lock created by npx commands |
Feature flags and dry-run
Section titled “Feature flags and dry-run”Use the planner to preview what will run before writing changes:
node skills/prepare-wordpress/scripts/plan_setup.mjs --dry-runLimit execution to specific phases:
node skills/prepare-wordpress/scripts/plan_setup.mjs --dry-run --only=init,composer,configSkip phases you do not want:
node skills/prepare-wordpress/scripts/plan_setup.mjs --dry-run --skip=skills,vitestApply safe shell commands from the plan:
node skills/prepare-wordpress/scripts/plan_setup.mjs --apply --only=init,skills,composerGet machine-readable dry-run plan output for tools/automation:
node skills/prepare-wordpress/scripts/plan_setup.mjs --json --only=init,composerGet machine-readable apply output (includes per-phase command results):
node skills/prepare-wordpress/scripts/plan_setup.mjs --json --apply --only=cleanupAvailable phase flags: plugin, readme, init, skills, composer, config, vitest, i18n, cleanup.
Smart detection
Section titled “Smart detection”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 developmentSet up dev tooling for this WordPress projectAdd testing, linting, and i18n to this WordPress pluginBump this WordPress plugin to 1.2.3 and update the changelogRun wp-bump for version 1.2.3After scaffolding
Section titled “After scaffolding”i18n-map.json— ReplaceBLOCK-NAMEwith your actual block directory names (if you have blocks)- Run
composer installandnpm install
The text domain and plugin slug are derived from the current folder name automatically.
Prerequisites
Section titled “Prerequisites”- Node.js 18+
- Composer 2+
- PHP 8.3+
- git
- WP-CLI (for i18n commands)
Other commands
Section titled “Other commands”# List installed skillsnpx skills list -g
# Update to latest versionnpx skills update prepare-wordpress -g
# Removenpx skills remove prepare-wordpress -gLicense
Section titled “License”GPL-2.0-or-later
AI contribution attribution
Section titled “AI contribution attribution”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]📦 Source: soderlind/prepare-wordpress · Edit on GitHub