wordpress-plugin-dev
Skill28 starsChanged 7 months agoMITView on GitHub
Helps agents develop, review, test, secure, optimize, design, integrate, package, and release modern WordPress plugins. Use for WordPress plugin architecture, Gutenberg block work, block.json, REST API, WP admin screens, shortcode implementation, Settings API, WP-CLI workflows, PHPUnit tests, wp-env environments, Plugin Check, WordPress.org release preparation, security audit, performance optimization, plugin UI/UX design, Classic Editor compatibility, SEO/cache/theme/page-builder integrations, and compatibility audits.
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- wordpress-plugin-devSkill
- wordpress-plugin-devSkill
- wordpress-plugin-devSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
73 rules. About 0 are common, 52 are distinctive, and 21 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈52
Distinctive · estimate
This author's own choices. Worth a look.
21
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Before planning or editing, identify the primary task type:
- Distinctive: line 55
Do not write unsafe PHP. Treat request data, options, meta, block attributes, REST payloads, shortcode attributes, and external responses …
- Distinctive: line 56
Check both capability and nonce for browser/admin actions that change data.
- Very specific: line 59
Prefer block.json and server-side block registration for blocks.
- Very specific: line 60
Prefer @wordpress/scripts for JavaScript builds unless the existing project has a clear reason to use custom webpack, Vite, or another …
- Distinctive: line 61
Use WordPress i18n functions for new public strings in PHP and JavaScript.
- Distinctive: line 63
Do not optimize by removing security checks, validation, escaping, capability gates, or nonces.
- Very specific: line 66
Prefer bounded queries, pagination, no_found_rows when totals are not needed, and fields => 'ids' when only IDs are required.
- Distinctive: line 68
Do not store large rarely used data in autoloaded options.
- Distinctive: line 69
Do not make remote HTTP calls during frontend render without caching, timeout, and fallback.
- Very specific: line 70
Do not call flush_rewrite_rules() on normal requests.
- Very specific: line 71
Use block.json and conditional block assets for Gutenberg where suitable.
- Distinctive: line 73
Prefer WordPress-native UI patterns and components for admin/editor UI.
- Distinctive: line 74
Never improve visuals by reducing accessibility, security, performance, or i18n quality.
- Distinctive: line 75
Every generated UI should consider empty, loading, success, error, and edge states.
- Distinctive: line 77
Do not use placeholders as labels, do not rely on color alone, and give destructive actions clear labels plus confirmation.
- Distinctive: line 79
If using experimental WordPress UI packages, verify current docs first.
- Distinctive: line 80
Prefer WordPress core APIs before third-party plugin/theme-specific APIs.
- Distinctive: line 81
Use feature detection before integration code.
- Distinctive: line 82
Do not output duplicate SEO meta, schema, canonical, robots, Open Graph, or Twitter tags.
- Distinctive: line 83
Do not cache user-specific/private data in public page cache, and do not purge all cache on every request.
- Distinctive: line 84
Do not disable cache, SEO, or minification plugins as the first solution.
- Distinctive: line 85
Do not load Elementor, Divi, or theme-specific adapters unless the dependency is detected.
- Distinctive: line 86
Do not globally override theme CSS.
- Distinctive: line 88
Verify current third-party docs before release-sensitive integration work.
- Very specific: line 113
Read references/plugin-architecture.md, then choose a minimal architecture for the plugin size.
- Very specific: line 114
Create a safe bootstrap with plugin headers, ABSPATH guard, constants, lifecycle hooks, and service registration.
- Distinctive: line 115
Add only the required surfaces: admin, REST, shortcode, blocks, cron, privacy, or uninstall.
- Very specific: line 116
Add templates from assets/templates/ only as starting points.
- Distinctive: line 117
Run available validation, lint, tests, or audit scripts and document anything unavailable.
- Very specific: line 121
Read references/hooks-rest-admin.md and references/wordpress-security.md.
- Distinctive: line 124
Add tests or smoke checks for authorized, unauthorized, invalid, and successful requests.
- Very specific: line 128
Read references/blocks-gutenberg.md.
- Very specific: line 132
Use @wordpress/scripts unless the existing project already standardizes on another build tool.
- Very specific: line 143
Read references/release-wordpress-org.md, references/testing-and-ci.md, and references/source-map.md.
- Distinctive: line 144
Verify current official docs before relying on release, Plugin Check, or SVN details.
- Very specific: line 145
Check plugin headers, readme.txt, stable tag, changelog, license compatibility, assets, built files, and excluded development files.
- Distinctive: line 146
Run Plugin Check and available test/build scripts.
- Very specific: line 150
Read references/performance-optimization.md and the performance workflow in references/review-checklists.md.
- Very specific: line 163
Keep permission_callback, validation, and sanitization intact.
- Distinctive: line 164
Add pagination, bounded queries, response shape limits, and safe caching only when data is public or correctly scoped.
- Distinctive: line 169
Treat block attributes as untrusted and escape output.
- Distinctive: line 171
Add fragment caching only with a clear TTL and invalidation hooks.
- Very specific: line 182
Use fields => 'ids', no_found_rows => true, and cache priming where appropriate.
- Distinctive: line 183
Prefer WordPress APIs; use prepared SQL and indexes when custom tables are justified.
- Distinctive: line 188
Use WordPress-native layout, clear labels/help text, Settings API save flow, capability checks, nonces, and scoped admin assets.
- Distinctive: line 195
Use cards/sections only when they improve scanning and keep the screen native to wp-admin.
- Distinctive: line 200
Use semantic HTML, scoped wrapper classes, escaped output, accessible controls, responsive CSS, and RTL-friendly logical properties.
- Distinctive: line 201
Avoid global resets, hardcoded fonts, and large frontend bundles unless explicitly justified.
- Distinctive: line 205
Use the canvas for primary content, toolbar for important contextual actions, and InspectorControls for advanced settings.
- Very specific: line 206
Prefer @wordpress/components, i18n-ready labels, placeholders for setup, and stable selected/unselected states.
- Distinctive: line 207
Keep frontend output close to editor preview without adding unnecessary editor or frontend weight.
- Very specific: line 211
Read references/design-ux-ui.md and the design workflow in references/review-checklists.md.
- Distinctive: line 217
Keep setup steps short, optional where appropriate, and reversible.
- Distinctive: line 219
Do not use dark patterns or hide consequences.
- Distinctive: line 225
Keep messages actionable, translatable, and safe.
- Very specific: line 229
Read references/integrations-compatibility.md and the compatibility workflow in references/review-checklists.md.
- Very specific: line 236
Read references/top-100-plugin-compatibility.md and refresh data/top-100-popular-plugins.json when release-sensitive accuracy matters.
- Distinctive: line 238
Check namespacing, hooks, REST namespaces, block names, shortcodes, options, transients, cron hooks, database tables, scripts/styles, …
- Distinctive: line 239
Add optional adapters only behind feature detection and versioned manual verification.
- Distinctive: line 244
Check whether the target site uses a WordPress.org theme, child theme, block theme, classic theme, builder shell, or premium theme such as …
- Distinctive: line 246
Prefer theme-safe output and scoped assets before adding theme-specific adapters.
- Very specific: line 250
Check use_block_editor_for_post_type() and keep block/editor assets scoped.
- Distinctive: line 251
Add metabox or shortcode fallback only when users need non-block workflows.
- Distinctive: line 258
Avoid duplicate meta, canonical, robots, Open Graph, Twitter, breadcrumbs, and schema output.
- Distinctive: line 259
Use documented hooks/APIs where available and fallback only when no SEO plugin handles the concern.
- Distinctive: line 264
Add targeted purge/invalidation hooks only for relevant content or settings changes.
- Distinctive: line 265
Avoid purge-all on normal requests and document manual cache exclusions only as fallback.
- Distinctive: line 269
Prefer semantic, theme-friendly output and scoped CSS before theme-specific hooks.
- Distinctive: line 276
Use documented hooks/APIs and avoid builder internals.
- Distinctive: line 283
Use unknown instead of pretending support exists.
- Distinctive: line 294
Verify the current official WordPress, Block Editor, WP-CLI, Plugin Check, npm, Composer, or PHPUnit documentation before giving …
- Distinctive: line 295
Do not invent APIs, flags, hooks, metadata fields, or release rules.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
WordPress Plugin Dev
Act as a senior WordPress plugin engineer. Build in the style of the target codebase, prefer official WordPress APIs, keep changes scoped, and make security, maintainability, accessibility, and release readiness part of the default workflow.
Start By Classifying The Task
Before planning or editing, identify the primary task type:
new pluginfeature implementationcode reviewsecurity auditGutenberg/block workREST/admin/settings workperformance optimizationperformance auditfrontend asset optimizationdatabase/query optimizationblock render optimizationREST/admin performance reviewadmin UI designsettings page UXplugin dashboard designfrontend output designGutenberg block UI designonboarding/setup wizardUX/accessibility reviewvisual polishdesign system alignmentClassic Editor compatibilitySEO plugin integrationcache plugin compatibilityperformance plugin compatibilitytheme compatibilitypage builder compatibilitytop-100 plugin compatibilitytop-100 theme compatibilitycompatibility auditintegration adapter implementationcompatibility matrix creationtesting/CIrelease to WordPress.org
Then inspect the plugin structure and load only the references needed for that task. For review tasks, use the advanced workflow in references/review-checklists.md that matches the requested review type before writing findings.
Mandatory Rules
- Do not write unsafe PHP. Treat request data, options, meta, block attributes, REST payloads, shortcode attributes, and external responses as untrusted.
- Check both capability and nonce for browser/admin actions that change data. Use capabilities for authorization and nonces for intent.
- Sanitize on input, validate before use, and escape on output for the exact context.
- Give every REST route a real
permission_callback; use explicit public access only when the route truly exposes public data. - Prefer
block.jsonand server-side block registration for blocks. - Prefer
@wordpress/scriptsfor JavaScript builds unless the existing project has a clear reason to use custom webpack, Vite, or another pipeline. - Use WordPress i18n functions for new public strings in PHP and JavaScript.
- For public release, check
readme.txt, plugin headers, licenses, assets, build artifacts, and Plugin Check output. - Do not optimize by removing security checks, validation, escaping, capability gates, or nonces.
- Measure or identify hot paths before optimizing; avoid expensive work on every request.
- Scope assets, hooks, queries, REST responses, admin screens, and block rendering.
- Prefer bounded queries, pagination,
no_found_rowswhen totals are not needed, andfields => 'ids'when only IDs are required. - Cache expensive safe operations with explicit TTL and invalidation. Do not cache private/user-specific data globally.
- Do not store large rarely used data in autoloaded options.
- Do not make remote HTTP calls during frontend render without caching, timeout, and fallback.
- Do not call
flush_rewrite_rules()on normal requests. - Use
block.jsonand conditional block assets for Gutenberg where suitable. - Design must fit WordPress unless a custom branded experience is explicitly justified.
- Prefer WordPress-native UI patterns and components for admin/editor UI.
- Never improve visuals by reducing accessibility, security, performance, or i18n quality.
- Every generated UI should consider empty, loading, success, error, and edge states.
- Frontend output should inherit theme styles where possible and scope plugin CSS.
- Do not use placeholders as labels, do not rely on color alone, and give destructive actions clear labels plus confirmation.
- Admin assets must be scoped to relevant screens, and generated UI text must be translation-ready.
- If using experimental WordPress UI packages, verify current docs first.
- Prefer WordPress core APIs before third-party plugin/theme-specific APIs.
- Use feature detection before integration code; never fatal when an optional plugin, theme, or builder is missing.
- Do not output duplicate SEO meta, schema, canonical, robots, Open Graph, or Twitter tags.
- Do not cache user-specific/private data in public page cache, and do not purge all cache on every request.
- Do not disable cache, SEO, or minification plugins as the first solution.
- Do not load Elementor, Divi, or theme-specific adapters unless the dependency is detected.
- Do not globally override theme CSS.
- Classic Editor and Block Editor compatibility must use separate scoped assets/flows where needed.
- Verify current third-party docs before release-sensitive integration work.
Reference Routing
- Architecture, lifecycle, layout, activation, deactivation, uninstall:
references/plugin-architecture.md - Security, capabilities, nonces, sanitization, escaping, REST permissions:
references/wordpress-security.md - PHP/JS/CSS/docs standards and compatibility tooling:
references/coding-standards.md - Hooks, REST, admin menus, Settings API, CPTs, taxonomies:
references/hooks-rest-admin.md - Gutenberg blocks,
block.json, dynamic blocks, build tooling:references/blocks-gutenberg.md - Interactivity API and script modules:
references/interactivity-api.md - Performance optimization, hot paths, queries, caching, assets, REST/admin/block performance:
references/performance-optimization.md - Design, admin UX, frontend output, Gutenberg UI, visual review, and a11y-aware polish:
references/design-ux-ui.md - Classic Editor, SEO/cache/theme/page-builder integration, optional adapters, and compatibility audits:
references/integrations-compatibility.md - Top-100 popular plugin watchlist, broad ecosystem conflict prevention, and versioned verification workflow:
references/top-100-plugin-compatibility.md - Top-100 popular theme watchlist, Newspaper/tagDiv notes, theme conflict prevention, and child theme verification workflow:
references/top-100-theme-compatibility.md - i18n, accessibility, privacy, personal data workflows:
references/i18n-a11y-privacy.md wp-env, WP-CLI, PHPUnit, Plugin Check, CI:references/testing-and-ci.md- WordPress.org readme, assets, SVN/release workflow:
references/release-wordpress-org.md - Review workflows and acceptance checklists for architecture, security, blocks, REST, admin settings, release, performance, design/UX/UI, integrations/compatibility, and a11y/i18n:
references/review-checklists.md - Official source index and version-sensitive verification:
references/source-map.md
Common Workflows
build-new-plugin
- Read
references/plugin-architecture.md, then choose a minimal architecture for the plugin size. - Create a safe bootstrap with plugin headers,
ABSPATHguard, constants, lifecycle hooks, and service registration. - Add only the required surfaces: admin, REST, shortcode, blocks, cron, privacy, or uninstall.
- Add templates from
assets/templates/only as starting points; replace placeholders and adapt to the project. - Run available validation, lint, tests, or audit scripts and document anything unavailable.
add-secure-rest-endpoint
- Read
references/hooks-rest-admin.mdandreferences/wordpress-security.md. - Register the route on
rest_api_initwith namespace, method, callback,permission_callback, args, and schema where practical. - Validate and sanitize request data, enforce capability checks, return
WP_REST_ResponseorWP_Error, and avoid leaking private data. - Add tests or smoke checks for authorized, unauthorized, invalid, and successful requests.
create-dynamic-block
- Read
references/blocks-gutenberg.md; readreferences/interactivity-api.mdonly when frontend interactivity is needed. - Define block metadata in
block.jsonwith namespace, attributes, textdomain, assets, and render behavior. - Register the block server-side and keep editor assets separate from frontend assets.
- In render callbacks, sanitize attributes and escape all output.
- Use
@wordpress/scriptsunless the existing project already standardizes on another build tool.
review-plugin-security
- Read
references/wordpress-security.mdandreferences/review-checklists.md. - Inspect admin actions, AJAX, REST routes, shortcodes, block render callbacks, options/meta writes, SQL, filesystem operations, and external HTTP calls.
- Prioritize findings by exploitability and user impact.
- Recommend minimal fixes that preserve plugin behavior.
prepare-wordpress-org-release
- Read
references/release-wordpress-org.md,references/testing-and-ci.md, andreferences/source-map.md. - Verify current official docs before relying on release, Plugin Check, or SVN details.
- Check plugin headers,
readme.txt, stable tag, changelog, license compatibility, assets, built files, and excluded development files. - Run Plugin Check and available test/build scripts; report unresolved warnings clearly.
audit-plugin-performance
- Read
references/performance-optimization.mdand the performance workflow inreferences/review-checklists.md. - Identify plugin type and hot paths before recommending changes.
- Inspect hooks, assets, queries, options/autoload, transients/object cache, REST/AJAX, admin screens, blocks, cron, and external HTTP calls.
- Separate quick wins from changes that require profiling, cache invalidation tests, or rollout monitoring.
optimize-frontend-assets
- Find where frontend scripts/styles are registered and enqueued.
- Scope assets by route, shortcode, block presence, template, or feature state.
- Preserve dependencies, versions, i18n, and security behavior.
optimize-rest-endpoint-performance
- Keep
permission_callback, validation, and sanitization intact. - Add pagination, bounded queries, response shape limits, and safe caching only when data is public or correctly scoped.
- Return
WP_Errorfor invalid or overly expensive requests.
optimize-dynamic-block-rendering
- Treat block attributes as untrusted and escape output.
- Bound render-time queries and avoid remote calls during render.
- Add fragment caching only with a clear TTL and invalidation hooks.
optimize-admin-screen-performance
- Scope admin assets by screen ID.
- Paginate tables, lazy-load expensive data, cache counts, and avoid synchronous remote calls in page render.
- Preserve capability checks and Settings API behavior.
optimize-database-queries
- Bound query size and avoid N+1 patterns.
- Use
fields => 'ids',no_found_rows => true, and cache priming where appropriate. - Prefer WordPress APIs; use prepared SQL and indexes when custom tables are justified.
design-admin-settings-page
- Read
references/design-ux-ui.md,references/hooks-rest-admin.md, andreferences/i18n-a11y-privacy.md. - Use WordPress-native layout, clear labels/help text, Settings API save flow, capability checks, nonces, and scoped admin assets.
- Include empty, loading, success, error, validation, RTL, text expansion, and keyboard/focus states.
improve-plugin-dashboard-ux
- Identify the dashboard's primary user, job, status signals, and next actions.
- Reduce clutter, paginate heavy data, avoid global assets, and keep troubleshooting/status visible.
- Use cards/sections only when they improve scanning and keep the screen native to wp-admin.
design-frontend-output
- Respect the active theme by inheriting typography, colors, and spacing where practical.
- Use semantic HTML, scoped wrapper classes, escaped output, accessible controls, responsive CSS, and RTL-friendly logical properties.
- Avoid global resets, hardcoded fonts, and large frontend bundles unless explicitly justified.
design-gutenberg-block-ui
- Use the canvas for primary content, toolbar for important contextual actions, and InspectorControls for advanced settings.
- Prefer
@wordpress/components, i18n-ready labels, placeholders for setup, and stable selected/unselected states. - Keep frontend output close to editor preview without adding unnecessary editor or frontend weight.
audit-plugin-ui-ux
- Read
references/design-ux-ui.mdand the design workflow inreferences/review-checklists.md. - Inspect admin screens, block UI, frontend output, CSS, forms, notices, and dynamic states.
- Report UX blockers, accessibility blockers, security/performance intersections, and manual visual review needs.
create-onboarding-flow
- Keep setup steps short, optional where appropriate, and reversible.
- Provide progress, back/skip/finish behavior, accessible headings, clear microcopy, and safe defaults.
- Do not use dark patterns or hide consequences.
improve-empty-loading-error-states
- Define what the user sees before data exists, while work is in progress, after success, after failure, and at edge cases.
- Preserve user input on errors and announce important async updates where appropriate.
- Keep messages actionable, translatable, and safe.
audit-plugin-compatibility
- Read
references/integrations-compatibility.mdand the compatibility workflow inreferences/review-checklists.md. - Identify required vs optional integrations and inspect detection, adapters, fallbacks, SEO output, cache behavior, theme CSS, builder code, and editor contexts.
- Produce a compatibility matrix with supported, partial, experimental, planned, not supported, and unknown statuses.
- Separate safe quick fixes from items requiring current third-party docs and manual testing.
prevent-top-100-plugin-conflicts
- Read
references/top-100-plugin-compatibility.mdand refreshdata/top-100-popular-plugins.jsonwhen release-sensitive accuracy matters. - Classify the target plugin's surfaces against the top-100 risk areas: commerce, SEO, cache/performance, forms, security, backup, analytics, builders, multilingual, LMS/membership, media, email, custom fields, search, and admin tooling.
- Check namespacing, hooks, REST namespaces, block names, shortcodes, options, transients, cron hooks, database tables, scripts/styles, cookies, query vars, and rendered output for likely collisions.
- Add optional adapters only behind feature detection and versioned manual verification. Keep untested plugins as watchlisted or planned.
prevent-top-100-theme-conflicts
- Read
references/top-100-theme-compatibility.mdand refreshdata/top-100-popular-themes.jsonwhen release-sensitive accuracy matters. - Check whether the target site uses a WordPress.org theme, child theme, block theme, classic theme, builder shell, or premium theme such as Newspaper.
- Inspect frontend wrappers, CSS, JS handles, template overrides, hooks, shortcodes, blocks, query vars, rewrite rules, image handling, breadcrumbs, schema, cache behavior, editor assets, and WooCommerce/theme template flows.
- Prefer theme-safe output and scoped assets before adding theme-specific adapters. Keep untested themes as watchlisted or planned.
add-classic-editor-fallback
- Check
use_block_editor_for_post_type()and keep block/editor assets scoped. - Add metabox or shortcode fallback only when users need non-block workflows.
- Share save/render services so block and classic flows do not diverge.
- Preserve nonce, capability, sanitization, and escaping.
add-seo-plugin-integration
- Detect active SEO plugins safely and verify current official docs first.
- Avoid duplicate meta, canonical, robots, Open Graph, Twitter, breadcrumbs, and schema output.
- Use documented hooks/APIs where available and fallback only when no SEO plugin handles the concern.
add-cache-plugin-compatibility
- Separate public cacheable output from private/user-specific output.
- Add targeted purge/invalidation hooks only for relevant content or settings changes.
- Avoid purge-all on normal requests and document manual cache exclusions only as fallback.
add-theme-compatibility-layer
- Prefer semantic, theme-friendly output and scoped CSS before theme-specific hooks.
- Detect themes safely and keep adapters optional.
- Respect block themes, classic themes,
theme.json, responsive layout, and RTL.
add-page-builder-adapter
- Load Elementor, Divi, or builder-specific code only after dependency detection.
- Use documented hooks/APIs and avoid builder internals.
- Provide shortcode/block fallback and keep builder assets scoped.
create-compatibility-matrix
- List integrations, status, detection, docs, what works, risks, known issues, and manual tests.
- Mark lightly tested or version-sensitive work as experimental.
- Use unknown instead of pretending support exists.
troubleshoot-plugin-conflict
- Reproduce with the smallest plugin/theme/cache/editor combination possible.
- Identify whether the conflict is security, performance, design, SEO, cache, theme, builder, or editor-context related.
- Fix with feature detection, scoped assets, public hooks, graceful fallback, or documentation rather than global disabling.
When Unsure
- Check
references/source-map.md. - Verify the current official WordPress, Block Editor, WP-CLI, Plugin Check, npm, Composer, or PHPUnit documentation before giving version-sensitive advice.
- Do not invent APIs, flags, hooks, metadata fields, or release rules. If uncertain, say what needs verification and use the safest documented alternative.
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.

