wp-devkit-plugin-development
Skill0 starsChanged 34 days agoMITView on GitHub
Build, debug or review WordPress plugin lifecycle, hooks, upgrade routines, storage, scheduled jobs and packaging. Use for activation/upgrade/uninstall failures, hook order or removal bugs, multisite setup and directory readiness; not REST routes, admin screens or WP-CLI.
In this repository20 other files it gives its agents.
- docs/llms.txtllms.txt
- wp-devkit-accessibility-reviewSkill
- wp-devkit-acf-and-content-modelingSkill
- wp-devkit-admin-ui-developmentSkill
- wp-devkit-block-developmentSkill
- wp-devkit-ci-cd-and-release-engineeringSkill
- wp-devkit-headless-and-wpgraphqlSkill
- wp-devkit-migration-upgrade-reviewSkill
- wp-devkit-performance-reviewSkill
- wp-devkit-phpstan-reviewSkill
- wp-devkit-playground-developmentSkill
- wp-devkit-rest-api-developmentSkill
- wp-devkit-security-reviewSkill
- wp-devkit-site-audit-and-onboardingSkill
- wp-devkit-test-strategySkill
- wp-devkit-theme-developmentSkill
- wp-devkit-ui-designSkill
- wp-devkit-wcag-reviewSkill
- wp-devkit-woocommerce-devSkill
- wp-devkit-wpcli-and-opsSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Read references/engineering-contract.md first.
- Very specific: line 33
Read references/plugin-development-workbook.md for symptom triage, worked decisions, benign look-alikes and acceptance checks.
- Distinctive: line 42
Write the expected behavior and the smallest affected boundary.
- Distinctive: line 43
Keep behavior in its current owner.
- Distinctive: line 65
Verify each hit: the callback is reachable, the stage is the one you assumed, and a core API or an existing guard does not already cover it.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Plugin lifecycle and integration
Read references/engineering-contract.md first. Review requests stay read-only: assess, explain and recommend without edits, mutations or untrusted runtime execution. Use the implementation path only when the request authorizes changes.
Applicability
Check uninstall completeness. List every option, transient, user meta, post meta, table, cron event and capability the plugin writes, then compare the list with uninstall.php and the deactivation hook. A key that is written and never removed is a candidate; say who can reach the data.
Inputs and scope
Plugin entry file, loading mode (regular, network-activated, must-use, drop-in), distribution channel (WordPress.org, private ZIP, Composer), declared and actually supported WordPress/PHP versions, multisite yes/no, failing request or symptom, existing tests.
Inspect project evidence before asking. State material assumptions. Ask only what changes the decision or the execution boundary. Follow existing architecture, naming and public contracts (hook names, option keys, table names, REST routes are public API).
Boundaries with sibling skills
Hand off instead of absorbing: REST routes, schemas and permissions go to wp-devkit-rest-api-development; settings pages, list tables and admin assets go to wp-devkit-admin-ui-development; WP-CLI commands, search-replace and runbooks go to wp-devkit-wpcli-and-ops. Exploitable-input analysis beyond the lifecycle questions here belongs to wp-devkit-security-review. This skill owns the plugin skeleton those features hang on.
Code Review Workflow
- Identify the real entry file and loading mode. Trace bootstrap, dependency loading and hook registration to the first point where observed behavior departs from the expected lifecycle.
- Classify each concern into one lifecycle stage: install/activation, versioned upgrade, runtime, deactivation, uninstall. Updates never rerun activation; must-use plugins and drop-ins have no activation hooks.
- For each hook, confirm timing, priority, accepted-args count and (for filters) the return value on every branch. Confirm removal uses the registered callback identity.
- For storage and jobs, check ownership of the schema or option, autoload and size, idempotence of repeat runs, multisite scope and uninstall policy.
- For packaging, compare the declared headers, text domain, shipped files and dependencies against the real runtime. Do not build, install or activate during review.
- Classify per the contract. Pattern hits stay candidates until the reachable path is traced; use
insufficient evidencewhen the target version, loading mode or runtime cannot be established.
Read references/plugin-development-workbook.md for symptom triage, worked decisions, benign look-alikes and acceptance checks. Load topic references only when in scope:
references/lifecycle-and-upgrades.md: read for headers, activation/deactivation/uninstall, versioned upgrades, dbDelta, dependencies, multisite provisioning.references/hooks-and-callbacks.md: read for hook order, priorities, removal, recursion, custom hooks, request-context detection, early-translation notices.references/storage-jobs-and-multisite.md: read for options and autoload, transients and object cache, custom tables,$wpdb->prepare, WP-Cron, Action Scheduler, privacy hooks,switch_to_blogcost.references/packaging-and-compatibility.md: read for directory rules, Plugin Check, readme, Composer and prefixing, PHP-version gates, release ZIP checks.
Implementation workflow
- Write the expected behavior and the smallest affected boundary; state the design and validation plan before editing.
- Keep behavior in its current owner. Register at the hook that supplies the context the code needs. Add a class or layer only for a concrete responsibility or test seam.
- Make every lifecycle step idempotent and safe to retry. Record version markers only after the step is verified.
- Prove the original failure with a test or disposable-site reproduction first, then the fix. Run the acceptance checks below; report any check you could not run as unexecuted.
- Publishing, tagging, deployment and live maintenance need their own task scope.
Search Patterns for Quick Detection
Run only the groups that match the task from the first-party project root; narrow . where possible. These commands read files and never bootstrap WordPress. Hits are leads, not findings; no hit proves nothing (helpers, multiline code and generated files change the result). Exit 0 means a match, 1 none, 2 an error; record errors separately.
# Identity, headers, lifecycle
rg -n -g '*.php' -g '!**/{vendor,node_modules,build,dist,coverage,backups}/**' -e 'Plugin Name:|Requires (PHP|at least|Plugins):|Update URI:|Network:|register_(activation|deactivation|uninstall)_hook|WP_UNINSTALL_PLUGIN' .
# Hook contract and removal
rg -n -g '*.php' -g '!**/{vendor,node_modules,build,dist,coverage,backups}/**' -e 'add_(action|filter)\(|remove_(action|filter)\(|apply_filters|do_action' .
# Content registration and rewrites
rg -n -g '*.php' -g '!**/{vendor,node_modules,build,dist,coverage,backups}/**' -e 'register_(post_type|taxonomy)|add_rewrite_rule|flush_rewrite_rules' .
# Storage, schema, jobs
rg -n -g '*.php' -g '!**/{vendor,node_modules,build,dist,coverage,backups}/**' -e 'dbDelta|\$wpdb->|(add|update)_option\(|set_transient|wp_(schedule|next_scheduled|clear_scheduled)|as_(enqueue|schedule|unschedule)' .
# Assets, paths, translations
rg -n -g '*.php' -g '!**/{vendor,node_modules,build,dist,coverage,backups}/**' -e 'wp_enqueue_(script|style)|plugin_dir_(path|url)|/wp-content/plugins/|load_plugin_textdomain|Text Domain:|Domain Path:' .Verify each hit: the callback is reachable, the stage is the one you assumed, and a core API or an existing guard does not already cover it.
Acceptance checks
Run in a disposable site: wp plugin activate <slug> then wp plugin deactivate <slug> then activate again (no duplicate cron events, no fatal, no "unexpected output"); upgrade from the oldest supported stored version; wp cron event list; wp option get <version-key>; PHPUnit or integration tests for changed hooks; wp plugin check <slug> when targeting the directory; PHPCS with WordPress standards and PHPStan if configured. A pass shows the exercised paths work on that PHP/WordPress pair; it does not prove other versions, multisite, object-cache or high-concurrency behavior.
Output Format
Review: result and reviewed scope first. Each confirmed finding: file:line, actor, trigger, reachable path, impact, confidence, severity (per contract), minimal fix, regression check. List candidates and missing evidence separately. Implementation: changed boundaries, design decision, commands run with exit status, unexecuted checks, rollback note and residual risk.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

