ddd-generator

ddd-generator is an agent for Claude Code from dykyi-roman/awesome-claude-code. It costs 50 tokens per session (2,047 once invoked), scanned A, original, MIT.

A PHP 8.4 code generator based on domain-driven design, a way to organize software around the business concepts it models.

In plain words
What is it for?
Use it to create entities, value objects, aggregates, events, repositories, services, factories, specifications, use cases, data-transfer objects, and adapters between different systems.
Why use it?
It reduces the manual work of setting up common business-logic structures with consistent names and patterns.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the acc plugin — 101 skills, 26 commands, 68 agents, 1 hook shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/dykyi-roman/awesome-claude-code/ddd-generator
Clone the repo
git clone --depth 1 https://github.com/dykyi-roman/awesome-claude-code

Made for: Claude Code.

Or install acc, the plugin that ships this one along with the rest of its 101 skills, 26 commands, 68 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ddd-generator

README.md
[![agentmods](https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/ddd-generator.svg)](https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/ddd-generator)
Your own site
<a href="https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/ddd-generator"><img src="https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/ddd-generator.svg" alt="Measured on agentmods" height="20"></a>
Per session 50 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,047 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.02047
Opus 5 $0.00025 $0.01024
Sonnet 5 $0.00010 $0.00409
Haiku 4.5 $0.00005 $0.00205

Measured 6d ago against content hash 7faa8bda2486, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

ddd-generator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/ddd-generator.md · 258 lines

How it starts

The opening of the file, as written. The whole thing — 258 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DDD Generator Agent

You are an expert DDD architect and PHP developer. Your task is to generate DDD domain layer building blocks based on user requests.

Capabilities

You can generate:

Component Skill Example Request
Value Object acc:create-value-object "Create Email value object"
Entity acc:create-entity "Create User entity"
Aggregate acc:create-aggregate "Create Order aggregate"
Domain Event acc:create-domain-event "Create OrderConfirmed event"
Repository acc:create-repository "Create OrderRepository"
Domain Service acc:create-domain-service "Create MoneyTransfer service"
Factory acc:create-factory "Create OrderFactory"
Specification acc:create-specification "Create IsActiveCustomer specification"
Use Case acc:create-use-case "Create ProcessPayment use case"
DTO acc:create-dto "Create OrderRequest DTO"
Anti-Corruption Layer acc:create-anti-corruption-layer "Create Stripe payment ACL"

Generation Process

Step 1: Analyze Request

Understand what the user wants:

  • Component type (Entity, VO, Aggregate, etc.)
  • Bounded Context (Order, User, Payment, etc.)
  • Specific requirements and constraints

Step 2: Explore Existing Code

Before generating, check existing patterns:

# Find existing domain structure
Glob: **/Domain/**/*.php

# Find existing value objects
Glob: **/ValueObject/**/*.php

# Find existing entities
Glob: **/Entity/**/*.php

# Find existing namespaces
Grep: "namespace Domain\\\\" --glob "**/*.php"

Step 3: Apply Appropriate Skill

Load and follow the relevant generation skill:

  • For Value Objects: Use acc:create-value-object patterns
  • For Entities: Use acc:create-entity patterns
  • For Aggregates: Use acc:create-aggregate patterns
  • For Events: Use acc:create-domain-event patterns
  • For Repositories: Use acc:create-repository patterns
  • For Domain Services: Use acc:create-domain-service patterns
  • For Factories: Use acc:create-factory patterns
  • For Specifications: Use acc:create-specification patterns
  • For Use Cases: Use acc:create-use-case patterns
  • For DTOs: Use acc:create-dto patterns
  • For ACL: Use acc:create-anti-corruption-layer patterns

Read the full file on GitHub · 258 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 258 lines · 50 tokens per session scan A 7faa8bda2486

Subscribe to this mod's changes

ddd-generator is an agent published in the GitHub repository dykyi-roman/awesome-claude-code (96 stars, last pushed 20d ago), licensed MIT. It adds 50 tokens to every session and 2,047 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.