/ Directory / Playground / symfony-hexagonal-skill
● Community aligundogdu ⚡ Instant

symfony-hexagonal-skill

by aligundogdu · aligundogdu/symfony-hexagonal-skill

Enforces hexagonal architecture in Symfony projects — 10 auto-triggered skills plus 2 review agents that stop you from leaking infrastructure into domain.

A Claude Code plugin for Symfony developers who actually want to keep ports & adapters clean. Auto-triggers on Symfony code patterns to guide domain/application/infrastructure separation. Includes review agents that catch leaks (Doctrine entities imported into domain, controllers calling repositories directly).

Why use it

Key features

Live Demo

What it looks like in practice

symfony-hexagonal-skill.replay ▶ ready
0/0

Install

Pick your client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "symfony-hexagonal-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/aligundogdu/symfony-hexagonal-skill",
        "~/.claude/skills/symfony-hexagonal-skill"
      ],
      "_inferred": true
    }
  }
}

Open Claude Desktop → Settings → Developer → Edit Config. Restart after saving.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "symfony-hexagonal-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/aligundogdu/symfony-hexagonal-skill",
        "~/.claude/skills/symfony-hexagonal-skill"
      ],
      "_inferred": true
    }
  }
}

Cursor uses the same mcpServers schema as Claude Desktop. Project config wins over global.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "symfony-hexagonal-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/aligundogdu/symfony-hexagonal-skill",
        "~/.claude/skills/symfony-hexagonal-skill"
      ],
      "_inferred": true
    }
  }
}

Click the MCP Servers icon in the Cline sidebar, then "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "symfony-hexagonal-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/aligundogdu/symfony-hexagonal-skill",
        "~/.claude/skills/symfony-hexagonal-skill"
      ],
      "_inferred": true
    }
  }
}

Same shape as Claude Desktop. Restart Windsurf to pick up changes.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "symfony-hexagonal-skill",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/aligundogdu/symfony-hexagonal-skill",
        "~/.claude/skills/symfony-hexagonal-skill"
      ]
    }
  ]
}

Continue uses an array of server objects rather than a map.

~/.config/zed/settings.json
{
  "context_servers": {
    "symfony-hexagonal-skill": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/aligundogdu/symfony-hexagonal-skill",
          "~/.claude/skills/symfony-hexagonal-skill"
        ]
      }
    }
  }
}

Add to context_servers. Zed hot-reloads on save.

claude mcp add symfony-hexagonal-skill -- git clone https://github.com/aligundogdu/symfony-hexagonal-skill ~/.claude/skills/symfony-hexagonal-skill

One-liner. Verify with claude mcp list. Remove with claude mcp remove.

Use Cases

Real-world ways to use symfony-hexagonal-skill

Scaffold a new bounded context with hexagonal layers

👤 Symfony devs building non-trivial domain logic ⏱ ~60 min advanced

When to use: You're starting a new feature and want the layering right from day one.

Prerequisites
  • Symfony 6.x+ project — composer create-project symfony/skeleton
  • Skill installed — git clone https://github.com/aligundogdu/symfony-hexagonal-skill ~/.claude/skills/symfony-hexagonal-skill
Flow
  1. Name the context
    Use symfony-hexagonal-skill. Scaffold a 'Billing' bounded context with Invoice aggregate, issue/void commands, and a query for open invoices.✓ Copied
    → src/Billing/Domain, Application, Infrastructure folders with proper separation
  2. Wire the infrastructure
    Add a Doctrine adapter for InvoiceRepository behind the domain port.✓ Copied
    → Interface in Domain, implementation in Infrastructure, services.yaml binding
  3. Expose via controller
    Add an HTTP adapter with a POST /invoices endpoint that dispatches the IssueInvoice command.✓ Copied
    → Controller calls bus, not repository directly

Outcome: A clean bounded context that won't turn into spaghetti in 6 months.

Pitfalls
  • Domain depending on Doctrine annotations — Use XML / attribute mapping in Infrastructure, not on domain entities
Combine with: filesystem

Review a PR for hexagonal layering violations

👤 Tech leads on Symfony teams ⏱ ~20 min intermediate

When to use: Reviewing a PR and you want an automated first-pass on layering.

Flow
  1. Run the review agent
    Use symfony-hexagonal-skill review agent on this diff. Flag any Doctrine / Symfony FW imports in Domain/, any controller->repository direct calls, any ORM leakage into responses.✓ Copied
    → Concrete findings with file+line
  2. Suggest fixes
    For each finding, propose the minimal refactor.✓ Copied
    → Diffs introducing a port or DTO

Outcome: A PR that doesn't silently degrade the architecture.

Combine with: github

Progressively refactor an existing Symfony app toward hexagonal

👤 Teams with a legacy Symfony project ⏱ ~120 min advanced

When to use: Big-bang rewrite is off the table; you want incremental cleanup.

Flow
  1. Identify a seam
    Use symfony-hexagonal-skill. Look at src/Module/Orders — what's the smallest slice I can lift into a clean domain?✓ Copied
    → Specific class identified with extraction plan
  2. Extract incrementally
    Walk me through the extraction in 3 PR-sized steps.✓ Copied
    → Staged plan with tests preserved at each step

Outcome: A legacy codebase getting better, one PR at a time.

Pitfalls
  • Extracting too much in one step — PR-sized slices only; the plugin's review agent helps gate each step
Combine with: git

Combinations

Pair with other MCPs for X10 leverage

symfony-hexagonal-skill + github

Gate PRs on layering review before merge

Run the hex review on the open PR in this repo and post findings as comments.✓ Copied
symfony-hexagonal-skill + filesystem

Apply scaffolds into the actual repo

Apply the context scaffold to my project under src/.✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
context_scaffold context name, aggregates New bounded context 0
port_adapter_pair port interface name, adapter type Adding infrastructure 0
layering_review diff or directory Pre-merge 0
refactor_plan legacy module Starting a cleanup 0

Cost & Limits

What this costs to run

API quota
None
Tokens per call
Moderate — reviews scan files
Monetary
Free
Tip
Scope reviews to the diff, not whole repos, to save tokens.

Security

Permissions, secrets, blast radius

Credential storage: None
Data egress: None from skill

Troubleshooting

Common errors and fixes

Review agent misses violations

Ensure the full diff is in context; very large diffs may need chunking

Scaffold produces old Symfony 5 style

Mention your Symfony version explicitly — 6 vs 7 conventions differ

Alternatives

symfony-hexagonal-skill vs others

AlternativeWhen to use it insteadTradeoff
Deptrac static analysisYou want rule-based static enforcement of layeringNo refactor help; purely gates violations
craftcms-claude-skillYou're on Craft CMS, not SymfonyDifferent framework

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills