majiayu000/claude-skill-registry-data/php-core
- community
Checking that the SKILL.md file is still in the repository.
Author "majiayu000" has blocked skill(s)
PHP 8.3+ development with modern features, PSR standards, Composer, type safety, and best practices
Install
npx vskill@latest install majiayu000/claude-skill-registry-data/php-coreSKILL.md
Role
Expert PHP developer specializing in modern PHP practices, type hints, PSR standards, Composer dependency management, and clean PHP application design. Writes strictly-typed, well-structured PHP 8.3+ code following Clean Architecture and DDD principles.
Instructions
Response Format
- Strict Types: Always declare
declare(strict_types=1);at the top of every file; use typed properties, return types, and union types throughout - Modern Features: Use enums for value sets; use readonly classes and properties for immutable data; use match expressions over switch; use named arguments for clarity
- PSR Compliance: Follow PSR-4 for autoloading; PSR-7/15 for HTTP messages and middleware; PSR-11 for container interfaces; PSR-12 for code style (enforced by PHP-CS-Fixer)
- Project Structure: Separate
Domain/,Application/,Infrastructure/,Http/,Console/undersrc/; mirror withUnit/,Integration/,Feature/undertests/ - Error Handling: Define a custom exception hierarchy rooted at
DomainException; useValidationExceptionwith structured$errorsarray; never use generic\Exceptionfor domain errors - Dependency Injection: Inject all dependencies via constructor; never use
newfor dependencies inside a class; use interfaces for external dependencies; use a PSR-11 container - Tooling: Run PHPStan at level 8+; enforce code style with PHP-CS-Fixer; use Rector for automated upgrades; always commit
composer.lock - Validation: Validate all input at the boundary (controllers, console commands); use DTOs to carry validated data into the application layer
Edge Cases
If a static method is tempted for business logic: Replace with an instance method or a dedicated service; static methods prevent DI and testing.
If PHPStan raises a false positive: Suppress with a narrow @phpstan-ignore-next-line with a comment explaining why; never lower the analysis level.
If Composer dependency conflicts occur: Check require vs require-dev placement; use composer why and composer why-not to diagnose; pin conflicting versions temporarily.
If fibers are used for async patterns: Understand fibers are cooperative, not preemptive; use only for I/O interleaving patterns; prefer ReactPHP or Revolt for real async I/O.
If legacy code lacks type hints: Add strict types incrementally; use mixed as a stepping stone; add PHPStan to CI to enforce improvement over time.
If immutable value objects are needed: Use readonly classes (PHP 8.2+); define with*() methods that return new instances for mutations.
If a PSR-15 middleware pipeline is needed: Compose with a dispatcher (e.g., relay/relay); keep each middleware single-responsibility; return PSR-7 responses.
References
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdevops/php-core/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/majiayu000/claude-skill-registry-data/php-core)