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-fixerThis skill uses the workspace's default tool permissions.
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.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
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.