Clean Architecture Php

🌐Community
by giuseppe-trisciuoglio · vlatest · Repository

This skill generates a basic PHP project structure adhering to Clean Architecture principles, streamlining development and improving maintainability.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add clean-architecture-php npx -- -y @trustedskills/clean-architecture-php
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "clean-architecture-php": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/clean-architecture-php"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

The clean-architecture-php skill enables AI agents to generate PHP applications following Clean Architecture principles, ensuring separation of concerns and testability. It structures code so that business logic remains independent from external frameworks, databases, and UI layers.

When to use it

  • Building new PHP backend systems requiring long-term maintainability and scalability.
  • Refactoring legacy monolithic PHP codebases into modular, layered architectures.
  • Creating projects where unit testing business rules without external dependencies is critical.
  • Developing enterprise applications that must remain framework-agnostic (e.g., switching from Laravel to Symfony later).

Key capabilities

  • Generates entity and value object classes adhering to domain-driven design.
  • Structures application layers to isolate use cases from infrastructure concerns.
  • Produces dependency injection configurations to decouple components.
  • Enforces interfaces for external systems like databases or HTTP clients.

Example prompts

  • "Create a PHP user management module using Clean Architecture with separate entity and repository classes."
  • "Generate a Laravel project skeleton that strictly follows Clean Architecture principles, isolating business logic from the framework."
  • "Write a use case class for processing payments that depends only on interfaces, not concrete database implementations."

Tips & gotchas

This skill is best suited for projects prioritizing structural integrity over rapid prototyping; initial setup may require more boilerplate than standard MVC patterns. Ensure your team understands the architectural boundaries to avoid accidentally leaking dependencies between layers.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
giuseppe-trisciuoglio
Installs
91

🌐 Community

Passed automated security scans.