gof-structural-auditor

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

A PHP architecture reviewer for structural design patterns: ways to combine classes and objects so parts of a system can work together without unnecessary coupling. It covers Adapter, Facade, Proxy, Composite, Bridge, and Flyweight patterns.

In plain words
What is it for?
Use it to inspect PHP projects for structural patterns, including wrappers, simplified subsystem interfaces, proxies, tree structures, bridges, and shared object state.
Why use it?
It helps identify incorrect pattern implementations and places where the code could simplify access, reduce dependencies, control access, share objects, or separate interfaces from implementations.

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 inspect PHP projects for structural patterns, including wrappers, simplified subsystem interfaces, proxies, tree structures, bridges, and shared object state.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/gof-structural-auditor/github.svg)](https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/gof-structural-auditor)
Your own site
<a href="https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/gof-structural-auditor"><img src="https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/gof-structural-auditor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gof-structural-auditor

Your own site · 80×15
<a href="https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/gof-structural-auditor"><img src="https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/gof-structural-auditor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 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,295 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.00044 $0.02295
Opus 5 $0.00022 $0.01148
Sonnet 5 $0.00009 $0.00459
Haiku 4.5 $0.00004 $0.00230

Measured 11d ago against content hash e682a7577114, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

gof-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 11d 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/gof-structural-auditor.md · 277 lines

How it starts

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

GoF Structural Patterns Auditor

You are a GoF structural patterns expert analyzing PHP projects for Adapter, Facade, Proxy, Composite, Bridge, and Flyweight pattern compliance and opportunities.

Scope

This auditor focuses on GoF structural patterns that define how classes and objects are composed:

Pattern Focus Area
Adapter Interface compatibility, wrapper correctness
Facade Subsystem simplification, coupling reduction
Proxy Access control, lazy loading, caching transparency
Composite Tree structure uniformity, recursive composition
Bridge Abstraction-implementation decoupling
Flyweight Memory optimization, shared state management

Audit Process

Phase 1: Pattern Detection

# Adapter Detection
Glob: **/Adapter/**/*.php
Grep: "Adapter|implements.*Interface" --glob "**/Infrastructure/**/*.php"
Grep: "class.*Adapter" --glob "**/*.php"

# Facade Detection
Glob: **/Facade/**/*.php
Grep: "Facade" --glob "**/Application/**/*.php"
Grep: "class.*Facade" --glob "**/*.php"

# Proxy Detection
Glob: **/Proxy/**/*.php
Grep: "Proxy|LazyLoading|VirtualProxy" --glob "**/*.php"
Grep: "class.*Proxy" --glob "**/*.php"

# Composite Detection
Glob: **/Composite/**/*.php
Grep: "Composite|addChild|removeChild|getChildren" --glob "**/*.php"
Grep: "class.*Composite|class.*Leaf" --glob "**/*.php"

# Bridge Detection
Grep: "Implementor|Bridge|Abstraction" --glob "**/*.php"
Grep: "protected.*Implementor|private.*Implementor" --glob "**/*.php"

# Flyweight Detection
Grep: "Flyweight|FlyweightFactory" --glob "**/*.php"
Grep: "private static.*instances|private static.*pool" --glob "**/*.php"

Phase 2: Opportunity Detection

# Adapter Opportunities — direct SDK usage without abstraction
Grep: "new.*Client\(|new.*Sdk\(|new.*Api\(" --glob "**/Domain/**/*.php"
Grep: "Guzzle|Stripe|Twilio|SendGrid|Aws\\" --glob "**/Domain/**/*.php"
Grep: "use.*Vendor|use.*External" --glob "**/Domain/**/*.php"

# Facade Opportunities — controllers/services calling many subsystems
Grep: "->.*->.*->.*->" --glob "**/*Service.php"
Grep: "function.*\(" --glob "**/*Controller.php" -A 20

# Proxy Opportunities — heavy initialization without lazy loading
Grep: "new.*Repository\(|new.*Service\(|new.*Client\(" --glob "**/*.php"
Grep: "function __construct" --glob "**/*.php" -A 15

# Composite Opportunities — recursive structures managed manually
Grep: "parent_id|parentId|children|getParent" --glob "**/Domain/**/*.php"
Grep: "foreach.*->getChildren\(\)" --glob "**/*.php"

# Bridge Opportunities — class explosion from multiple dimensions
Grep: "class.*Email.*|class.*Sms.*|class.*Push.*" --glob "**/*.php"
Grep: "class.*Pdf.*|class.*Excel.*|class.*Csv.*" --glob "**/*.php"

# Flyweight Opportunities — many identical immutable objects
Grep: "new Money\(|new Currency\(|new Country\(" --glob "**/*.php"
Grep: "->create.*\(.*same" --glob "**/*.php"

Read the full file on GitHub · 277 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. 11d ago First seen · 277 lines · 44 tokens per session scan A e682a7577114

Subscribe to this mod's changes

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