atournayre / claude-agents
A comprehensive collection of specialized Claude Code agents for modern PHP development
Requires
- php: >=8.2
Requires (Dev)
- phpunit/phpunit: ^10.0
README
A comprehensive collection of specialized Claude Code agents for modern PHP development, covering architecture patterns, frameworks, testing, and code quality.
π― Overview
This package provides reusable Claude Code agents that can be used across multiple projects to enforce best practices, automate code analysis, and provide expert guidance for complex development tasks.
π¦ Installation
composer require --dev atournayre/claude-agents
π§ Available Agents
PHP Development
php-standards-enforcer
- Enforces PHP 8.2+ standards, strict types, and PSR compliancephpstan-error-resolver
- Surgical resolution of PHPStan level 9 errors with type annotationsquality-assurance-enforcer
- Comprehensive QA tools integration (PHPStan, PHP-CS-Fixer, Rector)
Symfony Framework
symfony-6-4-optimizer
- Symfony 6.4 LTS best practices and performance optimizationsymfony-migration-specialist
- Handles Symfony version migrations and deprecation fixes
Domain-Driven Design
ddd-architect
- DDD architecture patterns with RAD (Rapid Application Development)entity-creator-specialist
- Creates Doctrine entities following DDD principlesvalue-object-designer
- Designs immutable Value Objects with business validationexception-hierarchy-designer
- Creates comprehensive domain exception hierarchies
Messaging & Architecture
message-messagehandler-architect
- CQRS patterns and Symfony Messenger architecturedependency-injection-architect
- Advanced DI patterns with Symfony 6.4elegant-objects-enforcer
- Enforces Elegant Object principles in PHP
Collections & Testing
collection-specialist
- Domain-specific collections with business methodstesting-specialist
- TDD principles with PHPUnit 10 and InMemory objects
Framework Integration
atournayre-framework-specialist
- Expert in atournayre/framework v2 primitives and patterns
π Usage
Each agent is a specialized AI assistant that can be invoked using the Claude Code Task tool:
Use the [agent-name] agent when [specific context]. Examples: - "I'm getting PHPStan level 9 errors" β use `phpstan-error-resolver` - "Need to create a DDD entity" β use `entity-creator-specialist` - "Optimizing Symfony performance" β use `symfony-6-4-optimizer`
π Agent Categories
π΅ Architecture & Design
Focus on software architecture patterns, SOLID principles, and design best practices.
π’ Framework Integration
Specialized knowledge for Symfony, Doctrine, and modern PHP frameworks.
π‘ Code Quality
Static analysis, code style, testing, and quality assurance automation.
π£ Domain Modeling
DDD patterns, entity design, value objects, and business logic encapsulation.
π Messaging & Architecture
CQRS patterns, Symfony Messenger, dependency injection, and messaging architecture.
π Integration Workflow
- Project Setup: Copy relevant agents to
.claude/agents/
directory - Agent Selection: Choose appropriate agent based on your task
- Task Execution: Use Claude Code Task tool with selected agent
- Quality Validation: Run project QA tools to validate changes
π Agent Structure
Each agent follows a consistent structure:
--- name: agent-name description: Brief description with usage examples color: agent-color --- # Specialized prompt and instructions
π― Best Practices
When to Use Specific Agents
- Complex Type Issues β
phpstan-error-resolver
- New Entity Creation β
entity-creator-specialist
- Performance Optimization β
symfony-6-4-optimizer
- Architecture Refactoring β
ddd-architect
- Test Implementation β
testing-specialist
Agent Combination
Agents can be used in sequence for complex tasks:
ddd-architect
for designentity-creator-specialist
for implementationtesting-specialist
for test coveragequality-assurance-enforcer
for validation
π§ Customization
Project-Specific Adaptations
For project-specific needs, create custom agents in your project's .claude/agents/
directory that extend or modify the base agents.
Configuration
Some agents support configuration through project-specific files:
- PHPStan configuration:
phpstan.neon
- PHP-CS-Fixer:
.php-cs-fixer.php
- Rector:
rector.php
π Documentation
Agent Reference
Each agent includes:
- Purpose: What the agent specializes in
- Context: When to use the agent
- Examples: Real-world usage scenarios
- Tools: Available commands and integrations
Framework Integration
- Symfony 6.4 LTS: Optimized for long-term support version
- Doctrine ORM: Entity mapping and repository patterns
- PHPUnit 10: Modern testing approaches with InMemory patterns
π€ Contributing
Adding New Agents
- Create agent in appropriate category directory
- Follow the established YAML frontmatter format
- Include comprehensive examples and usage patterns
- Test with real-world scenarios
Improving Existing Agents
- Analyze agent performance in real projects
- Gather feedback from development teams
- Update patterns and best practices
- Maintain backward compatibility
π License
MIT License - See LICENSE file for details.
Built for modern PHP development teams who value code quality, architectural excellence, and development efficiency.