WordPress Best Practices
Comprehensive coding standards for WordPress development, optimized for AI agents and LLMs.
Overview
This skill provides 25 rules organized across 8 categories:
- Security Hardening (security-) - Output escaping, input sanitization, nonces [CRITICAL]
- Database Optimization (database-) - Autoload options, transients, meta queries [HIGH]
- Performance (perf-) - Asset enqueuing, lazy loading, heartbeat [HIGH]
- Plugin Development (plugin-) - Prefixing, hooks, activation/deactivation [MEDIUM-HIGH]
- Theme Development (theme-) - Template hierarchy, child themes, customizer [MEDIUM]
- REST API (api-) - Permissions, schemas, namespacing [MEDIUM]
- Multisite (multisite-) - Network admin, site switching [LOW-MEDIUM]
- Gutenberg/Blocks (blocks-) - Block patterns, InnerBlocks [LOW-MEDIUM]
Usage
Reference this skill when:
- Developing WordPress plugins
- Creating or modifying themes
- Building custom Gutenberg blocks
- Implementing REST API endpoints
- Optimizing WordPress performance
Build
pnpm build # Compile rules to AGENTS.md
pnpm validate # Validate rule files