This skill helps you write, review, and refactor PHP code by applying security, performance, and PSR-aligned best practices.
npx playbooks add skill jcastillotx/vibe-skeleton-app --skill php-best-practices
Comprehensive coding standards for PHP development, optimized for AI agents and LLMs. Contains 24 rules across 8 categories, prioritized by impact.
Reference these guidelines when:
| Priority | Category | Impact | Prefix |
|----------|----------|--------|--------|
| 1 | Security | CRITICAL | security- |
| 2 | Error Handling | HIGH | error- |
| 3 | Performance | HIGH | perf- |
| 4 | Type Safety | MEDIUM-HIGH | types- |
| 5 | OOP Patterns | MEDIUM | oop- |
| 6 | PSR Standards | MEDIUM | psr- |
| 7 | Testing | MEDIUM | test- |
| 8 | Modern PHP | LOW-MEDIUM | modern- |
security-input-validation - Validate with filter_var()security-output-escaping - Escape based on contextsecurity-password-hashing - Use password_hash()security-csrf-tokens - Implement CSRF protectionsecurity-no-eval - Never use eval()error-exception-handling - Use try-catch properlyerror-custom-exceptions - Create domain exceptionserror-error-reporting - Configure error levelserror-logging - Use PSR-3 loggingperf-opcache-enabled - Enable OPcacheperf-autoloading - Use Composer autoloaderperf-string-interpolation - Prefer interpolationperf-generators-memory - Use generators for large datatypes-strict-types - Declare strict_types=1types-return-types - Always declare return typestypes-nullable-types - Use ?Type for nullabletypes-union-types - Use union typesoop-final-classes - Prefer final classesoop-interface-segregation - Small interfacesoop-dependency-injection - Inject dependenciespsr-coding-style - Follow PSR-12psr-autoloading - Use PSR-4psr-http-messages - Use PSR-7modern-constructor-promotion - Use property promotionRead individual rule files for detailed explanations and code examples.
For the complete guide with all rules expanded: AGENTS.md
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.