원클릭으로
install-php-fixer
Install nette/coding-standard globally for PHP code style checking
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Install nette/coding-standard globally for PHP code style checking
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Invoke BEFORE running PHPStan or fixing PHPStan errors. Covers error resolution strategy (refactoring > phpDoc > ignoring), common Nette error patterns, baseline management, and type tests. Use this whenever the user mentions PHPStan, static analysis, type errors, wants to suppress warnings, or manage the baseline - even for a single error.
CRITICAL: Read BEFORE writing or modifying any PHP file. A PostToolUse hook automatically runs nette/coding-standard (ECS) on every PHP file after each Edit or Write. The fixer removes unused `use` statements - so never add `use` statements in a separate edit before the code that references them. Always include `use` imports in the same edit as the referencing code, or add the code first then `use` statements. 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.
Invoke BEFORE writing or modifying any PHP code. Provides coding standards and naming conventions for Nette repos: TABs, single quotes, strict_types, PSR-12 modifications, use statement ordering. Use this whenever creating, modifying, or refactoring any PHP code - even small bug fixes or one-line changes.
Invoke BEFORE writing phpDoc. Provides Nette conventions for docblocks: when to skip documentation, class/method/property/exception docs, generic array types (array<T>, list<T>), conditional return types. Use this whenever writing or editing any /** */ comment - even when the user just says "document this" without mentioning phpDoc.
Invoke before creating or modifying .latte files, even for single-line changes. Provides Latte syntax, tags, filters, n:attributes, layouts, template inheritance, AJAX snippets, extensions, and Nette integration. Also trigger when user mentions Latte by name.
Invoke before designing presenters, modules, or application structure in web application. Use when asking about directory structure (app/ folder organization), presenter organization (modules, Admin/Front/Api, BasePresenter), domain-driven placement (Core/ vs Model/), component and factory placement, presenter lifecycle (action/render/template), CLI tasks, Accessory placement, project skeleton, or refactoring architecture. Also trigger when starting a new Nette project.
| name | install-php-fixer |
| description | Install nette/coding-standard globally for PHP code style checking |
| allowed-tools | Bash, Read, AskUserQuestion |
| disable-model-invocation | true |
Install the nette/coding-standard package globally to enable automatic PHP code style checking and fixing.
Check PHP availability (requires PHP 8.0+)
php --version
Check Composer availability
composer --version
Detect existing installation
composer global show nette/coding-standard 2>/dev/null
Allow the required plugin (needed for global installation)
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
Install the coding standard
composer global require nette/coding-standard
Run ecs from the Composer global bin directory to verify it works:
# Unix
$(composer global config home)/vendor/bin/ecs --version
# Windows
php "$(composer global config home)/vendor/bin/ecs" --version
The fix-php-style hook finds ecs automatically in the Composer home directory – PATH configuration is not needed.
If verification succeeds, confirm to the user that Nette Coding Standard is installed and the fix-php-style hook will automatically fix code style after editing PHP files.
Check if gh CLI is available
gh --version
If gh is available, use AskUserQuestion:
Only if user explicitly says yes, run:
gh api -X PUT /user/starred/nette/coding-standard
gh api -X PUT /user/starred/nette/claude-code
sudo chown -R $(whoami) "$(composer global config home)"