dykyi-roman/awesome-claude-code/ddd-knowledge

Trust tier 2
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

DDD architecture knowledge base. Provides patterns, antipatterns, and PHP-specific guidelines for Domain-Driven Design audits.

Install

npx vskill@latest install dykyi-roman/awesome-claude-code/ddd-knowledge

SKILL.md

DDD Knowledge Base

Quick reference for DDD architecture patterns and PHP implementation guidelines.

Core Principles

Layer Dependencies (Clean Architecture)
Presentation → Application → Domain ← Infrastructure
↓
Domain (center)

Rule: Dependencies point INWARD. Domain has ZERO external dependencies.

Layer Responsibilities
LayerContainsDepends On
DomainEntities, Value Objects, Aggregates, Domain Services, Repository Interfaces, Domain EventsNothing
ApplicationUse Cases, DTOs, Application ServicesDomain
InfrastructureRepository Implementations, External APIs, DB, Cache, QueueDomain, Application
PresentationControllers, Actions, Request/Response, CLIApplication

Quick Checklists

Domain Layer Checklist
  • [ ] No framework imports (Doctrine, Eloquent, Symfony)
  • [ ] Entities have behavior, not just data
  • [ ] Value Objects for domain concepts (Email, Money, Id)
  • [ ] Repository INTERFACES defined here
  • [ ] Enums for fixed value sets
  • [ ] Domain Events for side effects
  • [ ] No public function set*() methods
Application Layer Checklist
  • [ ] UseCases orchestrate, don't decide
  • [ ] DTOs for input/output
  • [ ] No business logic (if/switch on domain state)
  • [ ] Transaction boundaries here
  • [ ] No HTTP/CLI concerns
Infrastructure Layer Checklist
  • [ ] Implements Domain interfaces
  • [ ] No business logic in repositories
  • [ ] External service adapters
  • [ ] Caching, queuing implementations
Presentation Layer Checklist
  • [ ] Validates input
  • [ ] Maps to DTOs
  • [ ] Calls UseCase
  • [ ] Formats response
  • [ ] No business logic

Common Violations Quick Reference

ViolationWhere to LookSeverity
use Doctrine\\ in DomainDomain/*.phpCritical
use Illuminate\\ in DomainDomain/*.phpCritical
use Infrastructure\\ in DomainDomain/*.phpCritical
Only getters/setters in EntityDomain/Entity/*.phpWarning
=== 'pending' magic stringsAny PHP fileWarning
public function set*()Domain/Entity/*.phpWarning
Business logic in ControllerPresentation/*.phpWarning
Business logic in RepositoryInfrastructure/*.phpWarning

PHP 8.4 DDD Patterns

Value Object
php
final readonly class Email
{
public function __construct(
public string $value
) {
if (!filter_var($value, FILTER_VALIDATE_EMAIL)) {
throw new InvalidArgumentException('Invalid email');
}
}
public function equals(self $other): bool
{
return $this->value === $other->value;
}
}
Entity with Behavior
php
final class Order
{
private OrderStatus $status;
public function __construct(
private readonly OrderId $id,
private readonly CustomerId $customerId
) {
$this->status = OrderStatus::Pending;
}
public function confirm(): void
{
if (!$this->status->canTransitionTo(OrderStatus::Confirmed)) {
throw new DomainException('Cannot confirm order');
}
$this->status = OrderStatus::Confirmed;
}
}
Repository Interface
php
// Domain/Repository/OrderRepositoryInterface.php
interface OrderRepositoryInterface
{
public function findById(OrderId $id): ?Order;
public function save(Order $order): void;
}

References

For detailed information, load these reference files:

  • references/layer-architecture.md — Detailed layer rules and boundaries
  • references/domain-patterns.md — Entity, VO, Aggregate, Repository patterns
  • references/application-patterns.md — UseCase, DTO, Command/Query patterns
  • references/antipatterns.md — Common violations with detection patterns
  • references/php-specific.md — PHP 8.4 specific implementations

Assets

  • assets/report-template.md — Structured audit report template

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationPassed, 73 of 100Effective. 1 run. Evaluated 7 months ago.

Source

Popularity

Repository stars
96
Repository forks
25
7-day trend score
23

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 16 Mar 2026, 7 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/dykyi-roman/awesome-claude-code/ddd-knowledge/badge)](https://verified-skill.com/skills/dykyi-roman/awesome-claude-code/ddd-knowledge)

Something wrong with this skill or its page? Tell us.