/php-fixer:php-auto-fixerfrom php-fixer
Automatically reformats PHP files to the project's coding standard using DressCode after edits. Removes unused imports and reports unfixable violations.
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: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A PostToolUse hook runs dresscode fix after Claude Code Edit/Write or Codex apply_patch operations. A patch may edit multiple PHP files; the hook processes each one. In Codex, hooks must first be reviewed and trusted via /hooks. Edits made through shell commands are not covered, so run the project's fixer explicitly after those edits.
The hook runs DressCode the way the project runs it: with the nearest dresscode.neon (or dresscode.php) found upwards from the edited file, so the standard and the sets it uses, its decisions, overrides, the target PHP version and the baseline of the project all apply. A project without a configuration file gets the Nette coding standard (dresscode/nette).
Two things differ from a plain dresscode fix: a file the configuration's excludePaths leaves out is left as written, and mistakes.debugOutput is keep, so the debugging calls it would comment out (var_dump(), print_r(), var_export() and whatever mistakes.debugOutputFunctions adds) stay in the code while you are editing.
<file>; the changes below are already in the file": the file on disk no longer matches what you wrote. The diff that follows is what the fixer did, with the imports it removed named above it; build your next Edit on the file as the diff leaves it, or read the file again when the message says the changes are too many to show.<file>, at the lines of the file as it is now": violations the fixer did not fix, each with its line, the message, the path of the decision it breaks (literals.quotes) and what to do about it. Fix them by hand, or leave them when the code is right and the decision is not (see below). Only those on the lines you edited are listed; "further violations are outside the edited lines" counts the rest, which are not yours to fix.<file> did not follow <decision>, so DressCode leaves it as the file writes it": the file keeps its own style there; write your code in that style, not by the standard.dresscode.neon (unknown key or decision, unknown preset, missing extension class). Fix the configuration or tell the user.nette/coding-standard of plugin 1.x, which formatted the file this time. Tell the user and, if they agree, run the migrate-to-dresscode skill.use StatementsThe fixer removes any use statement not referenced in the file. A use added in one edit and the code that needs it in the next therefore loses the import in between; the hook names the import it removed, but the import is gone all the same.
Always add use statements in the same Edit as the code that references them, or add the code first and the use second. Never add use statements alone in a separate Edit before the code.
use statements and sorts the restdeclare(strict_types=1) on the line of the opening tag); in a file just created with Claude Code Write it also adds declare(strict_types=1) where the standard requires it, which in an existing file is left to youWhen the hook is active, let the fixer handle formatting and removal or sorting of use statements. If the hook is unavailable or the edit was made through the shell, run the project's fixer explicitly.
When a reported violation is deliberate, silence that one occurrence in the code by the path of its decision rather than setting the decision to keep for the project:
$a = "double quotes here"; // dresscode:ignore literals.quotes -- the reason
The fixer is configured only by the project's dresscode.neon, never by .nette-claude.json. To stop it from touching certain paths (e.g. fixtures folders), list them in excludePaths:
use: nette
excludePaths:
- fixtures*
vendor, node_modules, temp, tmp, log and hidden directories (.*) are excluded by default, even without a configuration file.
To check or fix more than the edited file, change the configuration, decide risky fixes, write a baseline or upgrade the code to a newer PHP or library version, use the dresscode skill.
If the fixer is not installed, use the install-php-fixer skill explicitly (/php-fixer:install-php-fixer in Claude Code, or select the skill in Codex).
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./install-php-fixerInstall DressCode, globally or into a project with PHPStan, for automatic PHP code style fixing/Other plugins' skills for the same job