Help us improve
Share bugs, ideas, or general feedback.
From php-fixer
Automatically runs nette/coding-standard (ECS) on PHP files after every Edit/Write, fixing formatting and removing unused use statements. Essential for all PHP creation, editing, refactoring, or bug fixes to avoid import issues.
npx claudepluginhub nette/claude-code --plugin php-fixerHow this skill is triggered — by the user, by Claude, or both
Slash command
/php-fixer:php-auto-fixerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A PostToolUse hook runs `ecs fix` on every PHP file after each Edit or Write operation. The file is automatically reformatted and cleaned up - no manual formatting needed.
Provides Nette-specific PHP coding standards including TAB indentation, single quotes, strict_types=1, PSR-12 modifications, and use statement ordering. Invoke before writing, modifying, or refactoring any PHP code.
Review PHP code using PhpStorm inspections. Use when editing PHP files, reviewing code quality, fixing PHP issues, or when asked about PHP best practices.
Modernizes PHP codebases with PHP 8.1-8.5 features, PSR/PER-CS compliance, static analysis via PHPStan/Rector/PHP-CS-Fixer, and type-safety patterns like DTOs, enums, and readonly classes.
Share bugs, ideas, or general feedback.
A PostToolUse hook runs ecs fix on every PHP file after each Edit or Write operation. The file is automatically reformatted and cleaned up - no manual formatting needed.
use StatementsThe fixer removes any use statement not referenced in the file. This creates a timing trap between consecutive edits:
use App\Model\Foo;Foo is not used anywhere → removes the use statementFoo → fails because the use is goneAlways add use statements in the same Edit as the code that references them. Alternatively, add the code first, then add the use statement in a follow-up edit.
Never add use statements alone in a separate Edit - they will be removed before the next edit adds the referencing code.
Single edit with both use and code (preferred):
use App\Model\UserRepository;
public function getUsers(UserRepository $repo): array
{
return $repo->findAll();
}
Code first, use second (also safe):
UserRepositoryuse App\Model\UserRepository; - now it's referenced, fixer keeps ituse first, code second (broken):
use App\Model\UserRepository; - fixer removes this immediatelyUserRepository undefinedWhen adding code that references several new classes, include all their use statements in the same edit. Do not split use statements and code across separate edits.
use statementsuse statements alphabeticallyDo not manually fix formatting - the fixer handles it automatically after every edit.
use statements manually - the fixer handles unused importsuse statements manually - the fixer sorts themThe hook exits with an error when ECS cannot auto-fix all issues. Common causes:
If the fixer is not installed, run /php-fixer:install-php-fixer.