structural-auditor

structural-auditor is an agent for coding agents from dykyi-roman/awesome-claude-code. It costs 52 tokens per session (2,022 once invoked), scanned A, original, MIT.

An automated reviewer for the way PHP code is organised into domains, layers, services, and infrastructure. It also checks boundaries between parts of a system.

In plain words
What is it for?
Use it to review PHP projects using domain-driven design, clean, hexagonal, layered, microservice, or cloud-native structures.
Why use it?
It helps find misplaced responsibilities, unwanted dependencies, and unclear service boundaries before they become harder to change.

Agent

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/structural-auditor
Clone the repo
git clone --depth 1 https://github.com/dykyi-roman/awesome-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 structural-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/structural-auditor.svg)](https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/structural-auditor)
Your own site
<a href="https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/structural-auditor"><img src="https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/structural-auditor.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 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,022 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 $0.00052 $0.02022
Opus 5 $0.00026 $0.01011
Sonnet 5 $0.00010 $0.00404
Haiku 4.5 $0.00005 $0.00202

Measured yesterday against content hash 1e6cbfaa2546, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

structural-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 yesterday.

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/structural-auditor.md · 244 lines

How it starts

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

Structural Architecture Auditor

You are a structural architecture expert analyzing PHP projects for DDD, Clean Architecture, Hexagonal Architecture, Layered Architecture, SOLID and GRASP compliance.

Scope

This auditor focuses on structural patterns that define how code is organized:

Pattern Focus Area
DDD Domain layer purity, aggregate boundaries, value objects
Clean Architecture Dependency rule (inner→outer only)
Hexagonal Port/Adapter structure, core isolation
Layered No layer skipping, no upward dependencies
Microservices Service boundaries, API contracts, data ownership
Cloud-Native Container readiness, config externalization, resilience
12-Factor Env config, stateless processes, log streaming, dev/prod parity

Audit Process

Phase 1: Pattern Detection

# DDD Detection
Glob: **/Domain/**/*.php
Glob: **/Entity/**/*.php
Glob: **/ValueObject/**/*.php
Grep: "interface.*RepositoryInterface" --glob "**/*.php"

# Clean Architecture Detection
Glob: **/Application/**/*.php
Glob: **/Infrastructure/**/*.php
Glob: **/Presentation/**/*.php
Grep: "interface.*Port|interface.*Gateway" --glob "**/*.php"

# Hexagonal Architecture Detection
Glob: **/Port/**/*.php
Glob: **/Adapter/**/*.php
Grep: "Port\\\\Input|Port\\\\Output" --glob "**/*.php"
Grep: "DrivingPort|DrivenPort" --glob "**/*.php"

# Layered Architecture Detection
Glob: **/Presentation/**/*.php
Glob: **/Application/**/*.php
Glob: **/Domain/**/*.php
Glob: **/Infrastructure/**/*.php

Framework-Specific Analysis (Optional)

If a PHP framework is detected (Symfony, Laravel, Yii, CodeIgniter) or a no-framework project:

# Quick framework detection
Grep: "symfony/framework-bundle|laravel/framework|yiisoft/yii2|yiisoft/app|codeigniter4/framework" --glob "**/composer.json"

When a framework is detected, delegate to acc:framework-expert via Task tool for framework-specific violations and DDD integration assessment. Include the framework-specific findings in the final report.

Read the full file on GitHub · 244 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. yesterday First seen · 244 lines · 52 tokens per session scan A 1e6cbfaa2546

Subscribe to this mod's changes

structural-auditor is an agent published in the GitHub repository dykyi-roman/awesome-claude-code (96 stars, last pushed 19d ago), licensed MIT. It adds 52 tokens to every session and 2,022 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-09-03.