Invoke BEFORE writing PHP code. Provides coding standards and naming conventions.
Install globally using /php-fixer:install-php-fixer. After installation, PHP files are automatically fixed when edited - see the php-auto-fixer skill for editing workflow rules (especially use statement ordering).
declare(strict_types=1)@mkdir($dir); // @ - directory may already exist// == accept nullexceptions.php file, and multiple enums into enums.phpIO, DB), PascalCase/camelCase for longer ones (Http, Xml)ArrayIterator)getProvider(), not provider(). A verb is the usual form; the exceptions are settled conventions, namely static factories (fromFile()), conversions (toArray()), interface methods (jsonSerialize()) and fluent interfaces whose names echo the domain rather than an action, as a query builder echoes SQL clausesAbstract, Interface, or I - the type system already distinguishes themfn($a) => $buse import types// Short params - standard single-line
public function getItems(string $type): array
{
// method body
}
// Multi-line params - return type and brace on separate lines
public function example(
string $param,
array $options,
): string
{
// method body
}
count($arr) not \count($arr)use function at the file beginning:
use Nette;
use function count, is_array, is_scalar, sprintf;
use const PHP_OS_FAMILY;
if (is_array($response['data'] ?? null)) instead of if (isset($response['data']) && is_array($response['data']))is_a($obj, $class, allow_string: true)), but not when the method name makes it clear (e.g., setReadonly(true))Foo\Network next to Foo\Networks\*, not inside it) - this keeps the interface discoverable at the package levelarray. Arrays lose type information; typed objects let PHPStan catch errors at analysis time and give full IDE support.Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer