/php-fixer:install-php-fixerfrom php-fixer
Installs DressCode for automatic PHP code style fixing, optionally with PHPStan. Detects existing installations and guides migration from the old fixer.
Ships in php-fixer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Install the dresscode/dresscode package for automatic PHP code style fixing after supported edits.
Use this skill only when explicitly requested. Run commands with the client's available shell tool and ask questions through its available question tool or chat. In Codex, the plugin's hooks must also be reviewed and trusted via /hooks before automatic fixing runs. Hooks cover Claude Code Edit/Write and Codex apply_patch, not edits made through shell commands.
Check PHP availability (requires PHP 8.4+)
php --version
Check Composer availability
composer --version
Detect existing installation: composer global show dresscode/dresscode, and vendor/bin/dresscode in the project.
Detect the old fixer: composer global show nette/coding-standard.
migrate-to-dresscode skill instead of this one.DressCode goes globally by default, together with PHPStan, from which it takes the types of the code. When the current project has PHPStan (phpstan/phpstan in require or require-dev of its composer.json), recommend installing it into the project instead, so that it uses the project's PHPStan and its extensions. Let the user choose.
composer global require dresscode/dresscode:^1.3 phpstan/phpstan
composer require --dev dresscode/dresscode:^1.3
For a project installation, run php vendor/bin/dresscode --version in the project root. For the global one, run dresscode from the Composer global bin directory:
# Bash
php "$(composer global config home)/vendor/bin/dresscode" --version
# PowerShell
$composerDir = composer global config home
php "$composerDir/vendor/bin/dresscode" --version
The fix-php-style hook finds dresscode automatically, in the project's vendor/bin first and in the Composer home directory otherwise – PATH configuration is not needed. The project's copy wins, so its configuration may name extensions the global installation does not have.
If verification succeeds, confirm to the user that DressCode is installed and the fix-php-style hook will automatically fix code style after editing PHP files: by the project's dresscode.neon (or dresscode.php) when there is one, by the Nette coding standard otherwise.
When the current project has no dresscode.neon or dresscode.php (nor a .dist variant) in its root, offer to create dresscode.neon there. Without it the hook uses the Nette coding standard without the types of the code. Only if the user agrees, write:
use: nette
paths:
- app
- tests
typeAnalysis: phpstan
paths lists the directories with the project's PHP code; take them from the autoload and autoload-dev sections of composer.json plus the tests directory, and list only those that exist. When the tests are .phpt files (Nette Tester), add fileExtensions: [php, phpt]. typeAnalysis: phpstan needs PHPStan beside DressCode, which Step 1 installed.
Check if gh CLI is available
gh --version
If gh is available, ask the user:
Only if user explicitly says yes, run:
gh api -X PUT /user/starred/dg/dresscode
gh api -X PUT /user/starred/nette/agent-plugins
sudo chown -R $(whoami) "$(composer global config home)"What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub nette/agent-plugins --plugin php-fixer4 skills in this plugin
/dresscodeHow to run and configure DressCode, the PHP code style checker and fixer that also rewrites code for newer PHP and library versions. Use when running `dresscode` yourself (check, fix, config, explain, catalogue, init, baseline, upgrade), writing or changing `dresscode.neon` or `dresscode.php`, reading its report (violations, risky fixes, exit codes), changing a decision, silencing a finding or adding a baseline, choosing a standard or a set, setting DressCode up in CI or a Git hook, or upgrading a project to a newer PHP or library version with it. Ordinary PHP edits do not need it; the php-auto-fixer skill covers the hook that fixes them./migrate-to-dresscodeMoves the php-fixer plugin of a project from the retired nette/coding-standard (ECS) to DressCode. Use when the php-fixer hook says the plugin now formats PHP with DressCode, which is not installed, and the user agrees to migrate. Never run it without the user's consent./php-auto-fixerCRITICAL: Read BEFORE writing or modifying any PHP file. A PostToolUse hook runs DressCode (`dresscode fix`) on PHP files after Claude Code Edit/Write or Codex apply_patch (when hooks are enabled and trusted) and reformats it by the project's coding standard. The hook tells you when it rewrote the file and what it could not fix. The fixer removes unused `use` statements, so add a `use` together with the code that references it, never alone in an earlier edit. This skill should be used whenever creating new PHP files, editing existing PHP code, adding methods, refactoring, or fixing bugs in PHP - even for small one-line changes.Other plugins' skills for the same job