By fatonh
Modernize Symfony 7 projects with opinionated conventions for API Platform 4, Doctrine ORM 3, DDD, CQRS with Messenger, JWT auth, layered architecture, structured error handling, and testing patterns.
Use when exposing data through API Platform 4 — defining #[ApiResource], operations, DTO resources, state providers/processors, serialization groups, filters, and pagination. Use when the task mentions API Platform, ApiResource, state processor, or exposing an entity as a REST/GraphQL endpoint.
Use when structuring a Symfony project's src/ directory, organizing code into modules, configuring services, or deciding where a class belongs. Covers the modular monolith layout, service configuration, and config/ conventions for Symfony 7 (Flex, no app bundle).
Use when creating or refactoring Symfony console commands — never extends Command. On Symfony 8.1+ put #[AsCommand] on a method of a service class (even for a single command); on 7.x use the invokable attribute class. Also covers typed CLI inputs via value resolvers and #[MapInput] DTOs. Use when the task mentions console command, #[AsCommand], bin/console, #[Argument], #[Option], or a CLI task.
Use when changing the database schema in Symfony — generating Doctrine migrations, writing reversible up()/down(), data migrations, and deploy-safe (zero-downtime) changes. Use when the task mentions migration, schema change, ALTER TABLE, or doctrine:migrations.
Use when creating Doctrine ORM 3 entities, associations, repositories, enums, or UUID identifiers in Symfony. Defines entity conventions, attribute mapping, fetch strategy, and repository structure. Use when the task mentions entity, Doctrine, repository, association, or mapping.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Production-ready Claude Code skills that teach the agent your Symfony conventions — not generic PHP from a 2019 blog post.
Jump to: Quick start · Before / After · Skill catalog · Why · Stack assumptions · Anatomy of a skill · Contributing
AI coding agents are fluent in scripting languages but hallucinate in Symfony. Left alone, an agent will:
HttpException,EAGER associations and N+1 queries,A skill is a markdown file the agent reads before it touches your code. It encodes your stack, your patterns, and the exact mistakes agents make in that domain (the Gotchas section).
These skills target a modern Symfony stack:
Most patterns apply to Symfony 6.4 LTS too; differences are noted inline.
The code in these skills was written and reviewed against these exact versions. Newer patch/minor releases are expected to work; if something breaks on a different version, open an issue.
| Component | Version |
|---|---|
| PHP | 8.3 |
| Symfony | 7.2.x |
| Doctrine ORM | 3.3 |
| Doctrine Migrations | 3.8 |
| API Platform | 4.0 |
| Symfony Messenger | 7.2 |
| LexikJWTAuthenticationBundle | 3.x |
| PHPUnit | 11.x |
| zenstruck/foundry | 2.x |
These skills ship sensible defaults, not the only way. Each SKILL.md states why it picks a pattern, so when your project differs you can override it: edit the copied skill in your .claude/skills/ (it's yours now), or add a project-specific note to its Gotchas. Common override points — UUID vs. auto-increment IDs, API Platform vs. hand-rolled controllers, Lexik vs. another JWT bundle, Foundry vs. fixture files — are called out in the relevant skill.
As a Claude Code plugin (recommended — installs all skills, auto-updates):
/plugin marketplace add fatonh/symfony-skills
/plugin install symfony-skills@symfony-skills
Skills become available as symfony-skills:<name> in a new session — no file copying, and they update when you re-sync the marketplace.
Or as plain files in your project (no plugin system, pick a subset). From the root of your Symfony project:
# every skill:
curl -sSL https://raw.githubusercontent.com/fatonh/symfony-skills/main/install.sh | bash
# ...or only the ones you want (pass skill names):
curl -sSL https://raw.githubusercontent.com/fatonh/symfony-skills/main/install.sh | bash -s -- doctrine-orm api-platform-resources dto-and-validation
The script copies the chosen skills into .claude/skills/ (re-run any time to update). Don't have Claude Code yet? npm install -g @anthropic-ai/claude-code.
curl | bash)?git clone https://github.com/fatonh/symfony-skills /tmp/symfony-skills
mkdir -p .claude/skills
# a few skills...
cp -r /tmp/symfony-skills/skills/doctrine-orm .claude/skills/
# ...or the whole set
cp -r /tmp/symfony-skills/skills/* .claude/skills/
# or run the installer from the clone:
/tmp/symfony-skills/install.sh doctrine-orm dto-and-validation
Claude Code auto-discovers anything in .claude/skills/ and loads a skill automatically when your task matches its description trigger — no flags, no config.
Verify it loaded: inside Claude Code, run /skills to list discovered skills, or just ask "add an orders endpoint" and watch it pull in layered-architecture / dto-and-validation before writing code.
Commit the skills to your repo. Putting
.claude/skills/under version control means every teammate (and every CI agent run) gets the same conventions. That's the point — the skills are your team's shared standards.
npx claudepluginhub fatonh/symfony-skills --plugin symfony-skillsA Symfony-focused toolkit for Claude Code providing TDD (Pest/PHPUnit), Doctrine ORM, API Platform, Messenger, Voters, quality checks (PHP-CS-Fixer/PHPStan), and pragmatic architecture patterns - Docker Compose and Symfony Docker (FrankenPHP) compatible
API Platform development skills — resources & DTOs, filters, state providers/processors, operation security, collection isolation, validation, pagination, serialization, errors, GraphQL, Mercure, MCP (AI agent tools/resources), OpenAPI docs and functional tests. Covers Symfony and Laravel integrations.
AI agent skills for the Symfony UX frontend stack: Stimulus, Turbo, TwigComponent, LiveComponent, Icons, and Map.
PHP and WordPress development capabilities
5 playbook skills — PHP upgrade, Composer dependencies, branch finishing, ticket delivery, and worktree ops
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.