Awesome Claude Code: AI Assistant for PHP Architects

Components of Claude Code for PHP: audit, 3-level code review, automatic error correction, generators, code explanations, refactoring. Over 300 components. More than 50 agents. Over 200 skills.

Introduction: A new era of PHP application development using artificial intelligence.

AI assistants for programming have fundamentally changed how we write software. What began as simple autocompletion has evolved into intelligent systems that understand context, suggest architectural patterns, and even find subtle bugs in the code.

I have personally tested Cursor, Windsurf, Antigravity, and Claude Code, and I can say that each of them is strong in its own way, but Claude Code fits best into the terminal workflow and task automation. However, "out of the box," Claude Code is a general-purpose tool. It does not know that you are building an application based on Domain-Driven Design, that your team follows certain PSR standards, or that you need circuit breakers in your architecture.

I want to share my work on Awesome Claude Code—a Composer plugin that turns Claude Code into a specialized assistant for PHP architecture. After months of developing DDD/CQRS applications and constantly feeling that Claude Code did not understand my patterns well enough, I decided to create a toolkit that encapsulates this knowledge.

Problem

Every PHP developer knows this pain: you are creating a new feature, and suddenly you need an Aggregate Root with events, a Repository interface, DTO, Command/Query handlers, and tests. Hours are spent writing the same patterns you have written dozens of times before.

Or perhaps you are reviewing a PR. You scroll through hundreds of lines, looking for SQL injections, N+1 queries, DDD violations, and gaps in tests. It’s tedious, error-prone, and takes time away from real development.

And what about that legacy code you inherited? You suspect that the architecture has "drifted" everywhere, but manually auditing thousands of files is a separate project.

These are solved problems. You shouldn't have to solve them manually.

Solution

Awesome Claude Code — is a Composer plugin that transforms the Claude Code CLI into a powerful tool for PHP development. Install it once — and receive 300+ specialized components (commands, agents, skills) that deeply understand PHP architecture: DDD, CQRS, Clean Architecture, Event Sourcing, CI/CD, Docker, and much more.

Requirements:

  • PHP 8.5+

  • Composer 2.0+

  • Claude Code CLI

Installation:

composer require dykyi-roman/awesome-claude-code

Updates:

# Force update to the latest version (creates a backup)
./vendor/bin/acc upgrade

Usage:

That's it. The plugin automatically copies commands, agents, and skills to the .claude/ directory of your project. No configuration needed.

Intelligent Orchestration

The key feature of ACC is the smart agent and skill matching system. When you invoke a command, the system automatically determines which specialists are needed for the task:

USER COMMAND          COORDINATOR              AGENTS                KNOWLEDGE              GENERATORS
────────────          ───────────              ──────                ─────────              ──────────
/acc-code-review ──→ code-review-coordinator
                            │
                            ├─ LOW ──────→ psr-auditor ─────────→ psr-knowledge ─────────→ create-psr-*
                            │              test-auditor ────────→ testing-knowledge ────→ create-test-*
                            │
                            ├─ MEDIUM ───→ bug-hunter ──────────→ bug-fix-knowledge ────→ generate-bug-fix
                            │              readability-reviewer → code-smells-analyzer
                            │
                            └─ HIGH ─────→ security-reviewer ───→ owasp-skills ─────────→ create-validator
                                           performance-reviewer → optimization-skills
                                           ddd-auditor ─────────→ ddd-knowledge ────────→ create-entity,
                                           │                                               create-value-object,
                                           │                                               create-aggregate...
                                           architecture-auditor → arch-knowledge ───────→ create-*, pattern-*

How it works:

  1. The team accepts your request and determines the context

  2. The coordinator analyzes the task and selects the necessary agents

  3. Specialized agents perform the work using relevant skills

  4. Knowledge Base provides deep expertise for each area

  5. Generator Skills offer refactoring and generate code to fix identified issues

Each agent has access only to the skills they need. The security reviewer uses 14 OWASP skills, while the DDD auditor uses domain design skills with delegation to specialized generators. This is not just a set of tools — it is an ecosystem of experts, each specializing in their area.

An example chain for /acc-audit-architecture:

architecture-auditor (coordinator)
    │
    ├──→ structural-auditor ────→ ddd-knowledge
    │                             clean-arch-knowledge
    │                             hexagonal-knowledge
    │                             solid-knowledge
    │                             grasp-knowledge
    │                             + 6 analyzers
    │
    ├──→ behavioral-auditor ────→ cqrs-knowledge
    │                             event-sourcing-knowledge
    │                             eda-knowledge
    │                             + 14 pattern skills
    │
    ├──→ integration-auditor ───→ saga-knowledge
    │                             outbox-knowledge
    │                             stability-knowledge
    │                             adr-knowledge
    │
    └──→ pattern-generator ─────→ 5 sub-generators → 30+ generator skills

One request /acc-audit-architecture activates multiple agents and dozens of skills, each responsible for its area of expertise.

Three types of skills

Skills are focused knowledge bases and code generators. Each skill does one thing well:

  • Knowledge - Patterns, anti-patterns, PHP-specific guidelines

  • Analyzer - Detection of specific issues

  • Generator - Code generation from templates

This division follows the Single Responsibility Principle. Each component has a clear purpose, making the system maintainable and extensible.

Knowledge skills contain deep expertise: when to use a pattern, when to avoid it, what pitfalls exist. It's like having the books of Evans, Vernon, and Fowler at hand.

Analyzer skills find specific problems: N+1 queries, SQL injections, code smells, violations of SOLID. Each analyzer knows its area and provides actionable recommendations.

Generator skills create production-ready code: Value Objects with validation, Circuit Breaker with correct states, PSR-compliant implementations. The templates have been tested on real projects.

Key Features

Code Review System — 3 levels of analysis

The /acc-code-review command passes your PR through up to 9 specialized reviewers:

  • Low Level - Compliance with PSR-12, test quality

  • Medium level - Low Level + Logical errors, null pointer, naming, complexity

  • High level - Medium level + OWASP Top 10, N+1 queries, memory leaks, DDD compliance, complete architecture

Example:

/acc-code-review feature/payment high -- implement Stripe payment processing

Result:

# Code Review Report

**Branch:** `feature/payment` → `main`
**Files Reviewed:** 12 (+456/-23 lines)

## 🔴 Critical (1)
| ID | Category | Location | Issue |
|----|----------|----------|-------|
| CR-001 | Security | PaymentService.php:45 | SQL injection via string concatenation |

## 🟠 Major (3)
| CR-002 | Bug | Order.php:89 | Null pointer when items empty |
| CR-003 | Performance | CartRepository.php:34 | N+1 query in loop |
| CR-004 | DDD | PaymentService.php:12 | Domain logic in Application layer |

**Task Match:** 85% | **Verdict:** ❌ REQUEST CHANGES

The system also calculates the "task match score" — how well the code meets the stated task. Ideal for catching scope creep.

Bug Fixing System — from Diagnosis to Testing

Found a bug? Don't just fix it — let the system diagnose, fix, and prevent regression:

/acc-bug-fix "NullPointerException in OrderService::process()"
/acc-bug-fix src/Domain/Order.php:45 "off-by-one error"
/acc-bug-fix @storage/logs/error.log -- focus on validation

Process:

  • Diagnostics - Categorizes bugs (9 types), finds root causes

  • Fixing - Generates a minimal, safe fix with a set of specialized skills

  • Testing - Creates a regression test

  • Verification - Applies the fix, runs tests, reports results

    Defined categories of bugs: logical errors, null pointer, edge cases, race conditions, resource leaks, exception handling, type issues, SQL injections, infinite loops

    Architectural audit engine — 10+ patterns

    The team /acc-audit-architecture analyzes your codebase for compliance with industry standards:

    Structural:

    • DDD (Aggregates, Value Objects, Domain Events, Repositories)

    • Clean Architecture (Use Cases, Boundaries)

    • Hexagonal Architecture (Ports & Adapters)

    • Layered Architecture

    • SOLID and GRASP principles

Behavioral:

  • CQRS (separation of Command/Query)

  • Event Sourcing (Event stores, Projections)

  • Event-Driven Architecture

  • GoF Behavioral: Strategy, State, Template Method, Visitor, Iterator, Memento, Chain of Responsibility, Decorator, Null Object

GoF Structural:

  • Adapter, Facade, Proxy, Composite, Bridge, Flyweight

Integration and stability:

  • Saga Pattern (Orchestration, Compensation)

  • Outbox Pattern (Transactional messages)

  • Circuit Breaker, Retry, Rate Limiter, Bulkhead

Each audit provides actionable recommendations with specific locations in the files.

Individual audits

Launching targeted audits without a complete architectural analysis:

Refactoring system — managed process

Code refactoring with analysis and pattern recommendations:

/acc-refactor ./src/Domain/Order.php
/acc-refactor ./src/Services/ -- apply Strategy pattern

The coordinator analyzes code quality, suggests improvements, and generates recommendations.

Code explanation system — 5 modes

The team /acc-explain understands your codebase and explains it at the required level:

/acc-explain src/Domain/Order/Order.php         # Quick — one file
/acc-explain src/Domain/Order/                   # Deep — module analysis with diagrams
/acc-explain .                                   # Onboarding — complete guide to the project
/acc-explain GET /api/orders                     # Route — resolve HTTP route to handler
/acc-explain src/Payment business                # Business — non-technical overview
/acc-explain src/Domain qa -- how are discounts calculated?  # QA — point answer

The system automatically determines the necessary mode: file → quick, directory → deep, . → onboarding, HTTP route or console command → quick. Four specialized agents perform the work:

CI/CD system — Setup, Fix, Optimize

The CI/CD system provides complete management of pipelines through a single coordinator:

/acc-ci-setup                    # Create CI pipeline from scratch
/acc-ci-fix                      # Diagnosis and fixing of pipeline errors
/acc-ci-optimize                 # Optimization of execution time
/acc-audit-ci                    # Comprehensive CI audit

Pipeline architects understand the specifics of PHP:

  • Static analysis: PHPStan levels, Psalm strictness, DEPTRAC layers

  • Testing: unit, integration, parallel execution, coverage

  • Security: composer audit, OWASP checks, secret scanning

  • Docker: multi-stage builds, layer caching, PHP extensions

Docker Expert System — 8 specialized agents

A full-fledged expert system for Docker with a coordinator and narrow-profile specialists:

/acc-generate-docker                  # Generation of Docker components
/acc-audit-docker                     # Comprehensive audit of Docker configuration

System architecture:

docker-coordinator (coordinator)
    │
    ├──→ docker-architect-agent ────→ Multi-stage builds, stage organization
    ├──→ docker-image-builder ─────→ Base images, PHP extensions
    ├──→ docker-compose-agent ─────→ Services, networks, health checks
    ├──→ docker-performance-agent ──→ Build time, image size, caching
    ├──→ docker-security-agent ────→ Security audit, hardening
    ├──→ docker-production-agent ──→ Health checks, graceful shutdown, monitoring
    ├──→ docker-debugger-agent ────→ Build errors, runtime issues
    └──→ docker-agent (CI/CD) ─────→ Docker in CI pipelines

The system understands the specifics of PHP: correct base images, extensions for DDD projects (intl, opcache, redis), multi-stage builds, OPcache optimization, PHP-FPM tuning. Supports 40+ Docker skills — from generating Dockerfiles and docker-compose to optimizing image sizes and auditing container security.

Docker Audit Process:

  • Architecture - Analysis of multi-stage, stage organization

  • Security - Secrets, permissions, vulnerabilities

  • Performance - Image size, layer caching

  • Production - Health checks, graceful shutdown, logging

DevOps Teams

CI Fixes — automatic correction of pipeline errors:

/acc-ci-fix                           # Analyze and fix failing CI
/acc-ci-fix --pipeline=github-actions # Specify a specific CI
/acc-ci-fix @.github/workflows/ci.yml # Fix a specific workflow

Typical problems it solves:

  • PHPStan/Psalm type-level errors

  • Failing tests (analysis + fix + regression test)

  • Code style violations (PSR-12, PHP CS Fixer)

  • Incompatible dependencies in composer.json

  • Security vulnerabilities in packages

Code Generation — 50+ Components

Generation of production-ready code with tests through specialized generators (based on recommendations from /acc-audit-*).

Generates:

Available generators (through architectural audits):

  • DDD - Entity, ValueObject, Aggregate, Repository, DomainEvent, DomainService, Specification, Factory

  • CQRS - Command, Query, Handler, UseCase, ReadModel

  • Patterns - Strategy, State, Decorator, Builder, ObjectPool, CircuitBreaker, Saga, Outbox, Adapter, Facade, Proxy, Composite, Visitor, Memento

  • PSR - Logger (PSR-3), Cache (PSR-6/16), HTTP (PSR-7/15/17/18), Container (PSR-11), Clock (PSR-20)

Comparison with Alternatives

  • PHPStan/Psalm — ACC adds architectural patterns, DDD compliance, code generation

  • Rector — ACC specializes in DDD/CQRS patterns, generates new code

  • Deptrac — ACC adds full architecture audit (DDD, Clean, Hexagonal), generates remediation suggestions

  • GitHub Copilot — ACC has over 300 PHP-specific components, deeply understands architecture

  • Manual CI/CD setup — ACC generates optimized pipelines considering PHP best practices

ACC does NOT replace but complements these tools. Use PHPStan for type checking, Rector for mass refactoring, and ACC for working at the architecture level.

Conclusion

Awesome Claude Code transforms Claude Code from a general AI assistant into a specialized toolkit for PHP architects. It automates repetitive parts of software engineering — boilerplate generation, code review, architectural audits — while teaching you patterns along the way.

GitHub: dykyi-roman/awesome-claude-code

Documentation:

  • Commands — slash commands

  • Agents — specialized sub-agents

  • Skills — skills (knowledge, generators, analyzers)

  • Hooks — PHP/DDD hooks

  • MCP — MCP server configuration

  • Quick Reference — Paths, formats, best practices

License: MIT

Comments