/php:php-ddd-conventionsfrom php
Guides PHP/Symfony DDD conventions for domain layer purity: forbidden types (UploadedFile, HTTP, Doctrine), allowed patterns (value objects, domain interfaces, SPI). Use when writing domain code.
Ships in php. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The cross-language OOP DDD principles (domain purity, ports & adapters, dependency direction, bounded contexts, aggregates, value objects) are defined in
craft:ddd-principles. This skill keeps PHP/Symfony-specific lists and patterns.
In a Symfony codebase, these concrete classes / types are typical infrastructure leaks:
Symfony\Component\HttpFoundation\File\UploadedFile → use string $filePath or a domain abstraction (UploadFile model)Request, Response, RedirectResponse, etc.EntityManagerInterfacestring, int, array, DateTimeInterface, DateTimeImmutable)Domain/, implemented in Infrastructure/)vendor/acme/contracts)In a Symfony hexagonal project, the convention for the Service Provider Interface (SPI):
src/Domain/Subscription/Port/SubscriptionRepository.php).src/Infrastructure/Doctrine/DoctrineSubscriptionRepository.php).| Forbidden in domain | Why |
|---|---|
UploadedFile | Form-internal type — use domain UploadFile |
Request / Response | HTTP-internal — should never reach the domain |
| Doctrine entities | ORM-internal — keep domain models pure |
| Symfony validators | Framework-internal — use domain invariants |
| Allowed in domain | Examples |
|---|---|
| Pure PHP types | string, int, DateTimeImmutable, array |
| Domain VOs | final readonly class Money { … } |
| Domain interfaces | SPI ports, defined in domain, implemented in infra |
| Contract DTOs | From vendor/acme/contracts |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub fabiensalles/claude-marketplace --plugin php10 skills in this plugin
/php-8-0ACTIVATE when calling a constructor, method or function with four or more arguments in a PHP 8.0+ project — value objects, contract requests, factories, projections, test fixtures. Covers: mandatory named arguments from the fourth argument on. DO NOT use for: calls of three arguments or fewer, PHP 8.1 features (see php-8-1), PHP 8.2 features (see php-8-2), PHP 8.3 features (see php-8-3)./php-8-1ACTIVATE when passing a method as a callback in a PHP 8.1+ project — event listeners, validator callbacks, Twig functions, array_map/usort callables. Covers: mandatory first-class callable syntax (`$this` method reference with `(...)`) over array/string callables. DO NOT use for: general PHP syntax, PHP 8.2 features (see php-8-2), PHP 8.3 features (see php-8-3)./php-8-2ACTIVATE when writing PHP classes, DTOs, or value objects in a PHP 8.2+ project. Covers: mandatory readonly class usage (class-level, not per-property). DO NOT use for: general PHP syntax, PHP 8.3 features (see php-8-3)./php-8-3ACTIVATE when writing PHP class constants in a PHP 8.3+ project. Covers: mandatory typed class constants and default visibility. DO NOT use for: general PHP syntax, PHP 8.2 features (see php-8-2)./php-code-conventionsACTIVATE whenever writing or modifying PHP code in src/, creating controllers, services, repositories, specifications, or any production PHP class. ACTIVATE for code review, formatting questions, or 'coding standards'. Provides PHP-specific code style examples for the cross-language rules defined in craft:code-style-principles, plus PHP-specific rules (no empty(), nullsafe operator access, nowdoc, constructor parameter ordering with promoted properties). DO NOT use for: test code conventions (see phpunit:php-test-conventions), SQL formatting (see php-sql-conventions)./php-composer-conventionsACTIVATE when modifying composer.json, adding/updating dependencies, or running composer commands. ACTIVATE for 'composer require', 'composer update', version constraints. Covers: caret versioning policy, forbidden patterns (*, dev-master, exact versions), internal package exception (dev-main as x.y.z), update strategy. DO NOT use for: autoloading, PHP code, Symfony configuration.