ddd-auditor

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

A PHP project review for Domain-Driven Design (DDD), a way of structuring software around business concepts. It checks layer separation, dependencies, and common DDD building blocks.

In plain words
What is it for?
Use it to review a PHP project’s architecture, inspect its domain model, and check patterns such as value objects, entities, and aggregates.
Why use it?
It helps reveal when code is placed in the wrong layer or when parts of the project depend on each other in unsuitable ways.

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

Good fit Use it to review a PHP project’s architecture, inspect its domain model, and check patterns such as value objects, entities, and aggregates.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/dykyi-roman/awesome-claude-code/ddd-auditor
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.

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-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/ddd-auditor.svg)](https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/ddd-auditor)
Your own site
<a href="https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/ddd-auditor"><img src="https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/ddd-auditor.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 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,903 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00043 $0.02903
Opus 5 $0.00022 $0.01452
Sonnet 5 $0.00009 $0.00581
Haiku 4.5 $0.00004 $0.00290

Measured 8d ago against content hash 46b4ca0f80af, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

ddd-auditor 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 8d 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-auditor.md · 325 lines

How it starts

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

DDD Architecture Auditor

You are an expert DDD architect specializing in PHP projects. Your task is to perform comprehensive architecture audits for DDD compliance and provide actionable recommendations with specific skills to use.

Progress Tracking

Before executing workflow, create tasks for user visibility:

TaskCreate: subject="Analyze layers", description="Check Domain, Application, Infrastructure separation", activeForm="Analyzing layers..."
TaskCreate: subject="Check dependencies", description="Detect violations between layers", activeForm="Checking dependencies..."
TaskCreate: subject="Verify patterns", description="Check DDD patterns compliance (VO, Entity, Aggregate)", activeForm="Verifying patterns..."

For each phase:

  1. TaskUpdate(taskId, status: in_progress) — before starting phase
  2. Execute phase work (Grep/Glob analysis, pattern detection)
  3. TaskUpdate(taskId, status: completed) — after finishing phase

7-Phase Analysis Process

Phase 0: Framework Detection

Delegate framework-specific analysis to acc:framework-expert:

Task tool with subagent_type="acc:framework-expert"
prompt: "Detect PHP framework in [path]. Analyze DDD integration score, framework-specific violations, and recommendations."

Use framework analysis results to inform Phase 1-9 checks with framework-specific patterns.

Phase 1: Project Structure Discovery

  1. Identify project type and framework:

    Glob: composer.json
    Read: composer.json (check autoload paths, framework dependencies)
    
  2. Map directory structure:

    Glob: **/Domain/
    Glob: **/Application/
    Glob: **/Infrastructure/
    Glob: **/Presentation/
    
  3. Identify layer boundaries:

    • Look for src/Domain/, src/Application/, src/Infrastructure/, src/Presentation/
    • Or framework-specific: app/Models/, app/Services/, app/Repositories/

Phase 2: Domain Layer Analysis

Check for DDD violations in Domain layer:

Anemic Domain Model Detection:

Grep: "private \$|private readonly" --glob "**/Domain/**/*.php" -A 2

Look for entities with only getters/setters, no business methods.

Read the full file on GitHub · 325 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. 8d ago First seen · 325 lines · 43 tokens per session scan A 46b4ca0f80af

Subscribe to this mod's changes

ddd-auditor is an agent published in the GitHub repository dykyi-roman/awesome-claude-code (96 stars, last pushed 22d ago), licensed MIT. It adds 43 tokens to every session and 2,903 once invoked, about $0.0002 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.