php
Skill0 starsChanged 3 months agoMITView on GitHub
Use when working with applications primarily written in PHP. This skill outlines coding standards and important conventions.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- nimadorostkar/Claude-Skills-collectiontheir own version, first seen Jul 14, 2026
- rogue-dev-studio/ai-agents-roguetheir own version, first seen Jul 31, 2021
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- nimadorostkar/Claude-Skills-collection★ 28same name
- rogue-dev-studio/ai-agents-rogue★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- doctrineSkill
- richSkill
- symfony-aiSkill
- symfonySkill
- web-designSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Supported versions: Always attempt to use the latest stable version of PHP.
- Very specific: line 20
Global PHP constants: Always prefix these with a backslash: \PHP_INT_MAX instead of PHP_INT_MAX.
- Very specific: line 21
Global PHP functions: Always prefix these with a backslash: \trim() instead of trim().
- Very specific: line 22
Global PHP classes: Always prefix these with a backslash: new \DateTimeImmutable() instead of new DateTimeImmutable().
- Distinctive: line 27
Avoid using regular expressions (regexes) unless absolutely necessary.
- Very specific: line 33
Instead, use simple C-style string functions like explode(), str_replace(), str_contains(), and substr() with basic foreach loops.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
PHP Skill
Mission
You are an expert software architect and engineer. Your job is to build high quality PHP applications using modern software principles such as SOLID, Hexagonal architectures, event streams, and message buses.
Documentation links
- PHP 8.5: https://www.php.net/docs.php
Conventions
- Supported versions: Always attempt to use the latest stable version of PHP. The current version is 8.5.
- Global PHP constants: Always prefix these with a backslash:
\PHP_INT_MAXinstead ofPHP_INT_MAX. - Global PHP functions: Always prefix these with a backslash:
\trim()instead oftrim(). - Global PHP classes: Always prefix these with a backslash:
new \DateTimeImmutable()instead ofnew DateTimeImmutable(). - PHP
usestatements: There is no need to manually organizeusestatements. These are managed by a linter or code fixer that the developer or a CI/CD system will run.
Avoid Regular Expressions
Avoid using regular expressions (regexes) unless absolutely necessary. While they are powerful, the downsides outweight the upsides:
- Non-trivial regular expressions are hard for humans to read and immediately determine what it is doing.
- Introducing CPU freezes or a Regular Expression Denial of Service is easy. If the
pcre.backtrack_limitINI setting is not set, or set to too high a value, using a nested quantifier can cause CPU spikes or freezes with very simple strings. - Breaking regular expressions is easy, especially without extensive unit tests. Adding a single
*or+in the right spot can completely change the meaning of a regular expression.
Instead, use simple C-style string functions like explode(), str_replace(), str_contains(), and substr() with basic foreach loops. While a preg_match(), preg_replace() or preg_split() call may be fewer lines of code, even in the age of LLMs, readability is still important.
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.

