01
It starts by itself
PHP code changes. Runs in GitHub Actions or Claude Code routine.
- ↻ PHP code changes
push touching .php files
PHP code checked against modern rules.
Install the PHP Best Practices skill and make it a habit: follow https://gethabit.dev/skills/asyrafhussin/php-best-practices.md
4K installs92 starsMIT licenceSource on GitHub ↗

PHP Best Practices
by asyrafhussin · 4K installs
The skill
PHP Best Practices reviews PHP 8.x code against type safety, modern features, PSR standards, SOLID principles, error handling, performance and security rules, matched to the project's version.
Only when you ask.
The habit
PHP code checked against modern rules.
↻ Runs by itselfPHP code changes
When does it start? How does it check its work? What does it remember?
Stops after one change set per run, with at most one re-scan.
Your agent reads the required PHP version from composer.json and checks php -v.
It checks strict types, return, parameter and property types against the type rules.
It flags where enums, match, readonly and other version-appropriate features fit.
It checks PSR-4, PSR-12, naming and the five SOLID principles.
It checks exception handling, prepared statements, output escaping and password hashing.
It writes each finding as file:line with its category to the run log.
It writes only in its own folder and asks you before anything goes out.
Read both lists. If the left one sounds like you, the PHP Best Practices skill helps.
No. It checks the project version first and only suggests syntax available in that version.
The loop reports findings as file:line notes; applying the fixes is a separate decision.
Copy the prompt at the top into your agent. It installs the skill from asyrafhussin/agent-skills and sets up the habit. Or run npx skills add asyrafhussin/agent-skills --skill php-best-practices.
Yes. It is published under MIT. Habit is free too.
Install the PHP Best Practices skill and make it a habit: follow https://gethabit.dev/skills/asyrafhussin/php-best-practices.md
All asyrafhussin skills →More code skills →
Works in
Made by asyrafhussin, published under MIT. Habit links to the original and never changes it. Is this your skill?