|
npx skills add https://github.com/jdevalk/skills --skill wp-github-actions
This skill helps you set up a comprehensive CI/CD pipeline for WordPress plugins using GitHub Actions. The goal is to help plugin authors ship higher-quality code with less manual effort.
There are several categories of workflows that a healthy WordPress plugin should have. Not every plugin needs all of them — the right mix depends on the plugin's complexity, whether it has JavaScript/CSS assets, whether it uses Composer, etc. Your job is to figure out which ones are relevant and set them up.
The workflows fall into these categories:
Read references/workflows.md for the detailed configuration of each workflow, including ready-to-use YAML templates and configuration files.
Before writing any workflow files, figure out what you're working with:
composer.json. If yes, Composer-related workflows (diff, security, autoloading) are relevant.package.json, any JS/CSS source files, or a build process. If yes, JS/CSS linting and possibly a build step matter.tests/ directory, phpunit.xml, or phpunit.xml.dist. If yes, set up the PHPUnit workflow. If not, mention that adding tests would be valuable but don't force it..wordpress-org directory or ask. If yes, the deploy workflow is relevant and you should also set up .distignore.Based on what you found, recommend which workflows to set up. A good default for most plugins:
And conditionally:
Create each workflow as a separate YAML file in .github/workflows/. Using separate files rather than one monolithic workflow gives clearer feedback in PRs (each check shows independently) and makes it easier to enable/disable individual checks.
Use the templates from references/workflows.md as starting points, but adapt them to the specific plugin. Common adaptations include adjusting PHP version matrices, changing the WPCS standard, adjusting file paths, and tweaking the deploy workflow for plugins with build steps.
Depending on which workflows you set up, you may also need:
phpcs.xml.dist — Custom PHPCS ruleset (if the plugin needs rule exclusions or custom config).distignore — Files to exclude from WordPress.org deploymentphpstan.neon or phpstan.neon.dist — PHPStan configurationIf you're adding the deploy workflow, remind the user that they need to configure two repository secrets in GitHub:
SVN_USERNAME — Their WordPress.org usernameSVN_PASSWORD — Their WordPress.org passwordWalk them through: Repository Settings > Secrets and variables > Actions > New repository secret.
Use descriptive workflow file names that make it obvious what each one does:
wpcs.yml — WordPress Coding Standardsphpunit.yml — PHPUnit testslint-php.yml — PHP syntax lintinglint-js-css.yml — JavaScript and CSS lintingphpstan.yml — Static analysiscomposer-diff.yml — Composer dependency diff on PRssecurity.yml — Composer security scanningplayground-preview.yml — WordPress Playground PR previewdeploy.yml — Deploy to WordPress.orgBranch naming: Many WordPress plugin repos use trunk as the default branch (mirroring WordPress.org SVN conventions), while others use main or master. Always check the actual repo and use the correct branch name in workflow triggers.
PHP version matrix: WordPress 6.x requires PHP 7.4+. A good default matrix is ['7.4', '8.0', '8.1', '8.2', '8.3'] for PHPUnit, but use only the latest stable PHP for WPCS and linting (they don't need a matrix).
WordPress version matrix: For PHPUnit, test against at least latest and consider adding the previous major version. Some plugins also test against nightly to catch upcoming issues early.
The 10up ecosystem: 10up maintains a set of well-maintained GitHub Actions specifically for WordPress. Prefer these over generic alternatives when they exist — they handle WordPress-specific edge cases well. The key ones are 10up/wpcs-action for coding standards and 10up/action-wordpress-plugin-deploy for deployment.
Take jdevalk/wp-github-actions from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.