install-php-fixer
БесплатноБез исполняемых скриптовНе проверенInstall DressCode, globally or into a project with PHPStan, for automatic PHP code style fixing
от nette★ 47 звёзд на GitHubОб этом скилле
Install DressCode
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.
Step 0: Pre-flight Checks
Check PHP availability (requires PHP 8.4+)
php --version- If fails or version < 8.4: Stop and inform user.
Check Composer availability
composer --version- If fails: Stop and inform user to install Composer from https://getcomposer.org/
Detect existing installation:
composer global show dresscode/dresscode, andvendor/bin/dresscodein the project.- If already installed: Inform user and ask if they want to update (same install command updates to latest). A version older than 1.3 must be updated, the hook needs it.
Detect the old fixer:
composer global show nette/coding-standard.- If installed: the user comes from version 1 of the plugin, whose global installation conflicts with DressCode. Follow the
migrate-to-dresscodeskill instead of this one.
- If installed: the user comes from version 1 of the plugin, whose global installation conflicts with DressCode. Follow the
Step 1: Installation
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.
- Globally:
composer global require dresscode/dresscode:^1.3 phpstan/phpstan - Into the project, in its root:
composer require --dev dresscode/dresscode:^1.3
Step 2: Verification
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.
Step 3: Configuration
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.
Step 4: GitHub Star (Optional)
Check if
ghCLI is availablegh --version- If not available: Skip this step entirely (don't ask the user)
If
ghis available, ask the user:- Question: "Would you like to support these projects with a GitHub star?"
- Options: "Yes, I'd love to!" / "No, thanks"
Only if user explicitly says yes, run:
gh api -X PUT /user/starred/dg/dresscode gh api -X PUT /user/starred/nette/agent-plugins
Troubleshooting
Permission denied during installation
- Unix: Fix ownership of Composer home:
sudo chown -R $(whoami) "$(composer global config home)" - Windows: Run terminal as Administrator
Установить install-php-fixer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadWriteAskUserQuestionВложенные файлы
FAQ
Что делает скилл install-php-fixer?
Install DressCode, globally or into a project with PHPStan, for automatic PHP code style fixing
Как установить скилл install-php-fixer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл install-php-fixer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic