From fuse-php
Use when setting up a PHP package, choosing a coding style, wiring autoloading, or selecting PSR interfaces — PSR-4 autoloading, PER Coding Style 3.0 vs PSR-12, the active PSR catalog, and modern composer.json. Do NOT use for language syntax/features (use php-language-modern) or Laravel-specific conventions (use the laravel plugin).
How this skill is triggered — by the user, by Claude, or both
Slash command
/fuse-php:php-standardsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Before applying a standard, use `TeamCreate` to spawn 3 agents:
Before applying a standard, use TeamCreate to spawn 3 agents:
.php-cs-fixer.php, phpcs.xml), composer.json autoloadAfter changes, run fuse-ai-pilot:sniper for validation.
| Concern | Standard | Notes |
|---|---|---|
| Autoloading | PSR-4 | Recommended; PSR-0 is deprecated |
| Coding style | PER Coding Style 3.0 | "Extends, expands and replaces PSR-12"; PSR-12 remains the Accepted PSR |
| Logging | PSR-3 | LoggerInterface |
| Caching | PSR-6 / PSR-16 | Pool vs Simple Cache |
| HTTP | PSR-7 / 15 / 17 / 18 | Message / Handlers / Factories / Client |
| DI container | PSR-11 | ContainerInterface |
| Events | PSR-14 | Event Dispatcher |
| Time | PSR-20 | ClockInterface — testable "now" |
target-dir are deprecated. See psr4-autoloading.md.Psr\Log\LoggerInterface, not a concrete logger.?> - Core PER/PSR-1 file rules.src/ for library code, tests/ for tests - Wire tests/ via autoload-dev, never autoload.my-package/
├── composer.json # PSR-4 autoload + autoload-dev + scripts
├── src/ # Namespace root (Vendor\Package\)
│ └── Service.php
├── tests/ # PSR-4 dev namespace (Vendor\Package\Tests\)
│ └── ServiceTest.php
└── bin/ # CLI entry points (composer "bin")
→ See project-structure.md for the full layout
| Topic | Reference | When to Consult |
|---|---|---|
| PER Coding Style | per-coding-style.md | Formatting rules, PER vs PSR-12 |
| PSR catalog | psr-catalog.md | Which PSR to depend on / avoid |
| PSR-4 autoloading | psr4-autoloading.md | Namespace-to-path mapping |
| Template | When to Use |
|---|---|
| composer-json.md | Starting or modernizing a package |
| project-structure.md | Laying out directories |
src/ mapped to the vendor namespace@PER-CS ruleset)psr/log, psr/http-message, …)autoload-devtarget-dir (deprecated)npx claudepluginhub fusengine/agents --plugin fuse-phpCreates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.