agent-architecture-audit
Skill0 starsChanged 5 months agoMITView on GitHub
Full-stack diagnostic for agent/LLM applications — audits the 12-layer agent stack for wrapper regression, memory pollution, tool-discipline failures, hidden repair loops, and rendering corruption, then produces severity-ranked, code-first fixes. Use as a PRE-SHIP gate for any LLM system (signal generation, executors, tool-calling/multi-step/memory features), or when "the agent is getting worse", a prompt works in isolation but breaks in the wrapper, or you've debugged agent behavior >15 min without a root cause. Trigger on: "agent audit", "agent got worse", "tools flaky", "LLM app broken", "why is the output weird", "review my agent architecture". Adapted from ECC (MIT).
14 other projects use a version of this.
Adopted by
Most recently taken up by
- ahmadvahidi/skill-atlastheir own version, first seen Nov 8, 2026
- renepf/claude-skillstheir own version, first seen Oct 25, 2026
- davidanthonyn/claude-skillstheir own version, first seen Oct 20, 2026
- Ronnasayd/aipptheir own version, first seen Oct 20, 2026
- gongyijie85/dsh-ecctheir own version, first seen Oct 13, 2026
- NISTALTALSON/essential-claude-skillstheir own version, first seen Oct 11, 2026
Used with
Projects with it also use prompt-optimizer, api-design and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SentrySkillprompt-optimizer
Creates, optimizes, and iteratively refines agent prompts, system prompts, developer prompts, and reusable prompt templates. Use when asked to improve a prompt, optimize a system prompt, rewrite an agent prompt, tune prompt wording, make a prompt more reliable, port prompts between OpenAI, Claude, or Gemini, or build prompt evals.
Also in 3 projects that use this
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 3 projects that use this
SentrySkillsecurity-review
Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.
Also in 3 projects that use this
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- Fmarzochi/EGC★ 61same name
- gongyijie85/dsh-ecc★ 8same name
- genfeedai/genfeed.ai★ 4same name
- ronmkr/PromptBook★ 2same name
- NISTALTALSON/essential-claude-skills★ 1same name
- romaintoso78/claude-skills★ 1same name
- Ronnasayd/aipp★ 1same name
- SamuelNDCE/claude-super-skill-library★ 1same name
- agenticluke/agent-xray-plus★ 0same name
- ahmadvahidi/skill-atlas★ 0same name
4 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- code-review-disciplineSkill
- cost-aware-llm-pipelineSkill
- dataviz-designSkill
- design-systemSkill
- docs-designSkill
- editorial-report-designSkill
- layout-interaction-designSkill
- llm-trading-agent-securitySkill
- marketing-microsite-designSkill
- tool-calculator-designSkill
- working-with-claudeSkill
The file
Files
Agent Architecture Audit
A diagnostic for agent systems that hide failures behind wrapper layers, stale memory, retry loops, or transport/rendering mutations. Falsify the wrapper before blaming the model. Code-first fixes, not prompt-first.
Use (esp.) before shipping any change that touches prompts, tools, memory, or the decide loop; when behavior degraded after a wrapper change; when the same model is fine in a probe but wrong in prod.
The 12-layer stack (any layer can corrupt the answer)
1 System prompt (conflicting/bloated instructions) · 2 Session history (stale context) · 3 Long-term memory (cross-session pollution) · 4 Distillation (compressed artifacts re-entering as facts) · 5 Active recall (redundant re-summary) · 6 Tool selection (wrong/skipped routing) · 7 Tool execution (hallucinated — claims to call but doesn't) · 8 Tool interpretation (misread output) · 9 Answer shaping (format corruption) · 10 Platform rendering (UI/API/CLI mutates a valid answer) · 11 Hidden repair loops (silent 2nd LLM pass) · 12 Persistence (expired/cached state reused as live evidence).
Quick diagnostic (answer these)
| Q | If yes → |
| Can the model skip a required tool and still answer? | tool not code-gated |
| Does old conversation/topic appear in new turns? | memory contamination |
| Same info in system prompt AND memory AND history? | context duplication |
| Does a second LLM pass run before delivery? | hidden repair loop |
| Output differs internal-vs-delivered? | rendering corruption |
| "Must use tool X" only in prompt text? | tool-discipline failure |
| Can the agent's own monologue become persistent memory? | memory poisoning |
Evidence collection (grep for anti-patterns — Python/TS stack)
rg "must.*tool|required.*call" -t md # tool rules only in prose
rg "tool_call|tool_use|messages\.create|llm\.invoke" -t py -t ts # exec + hidden LLM calls
rg "fallback|retry.*llm|re-?prompt|repair" -t py -t ts # silent repair loops
rg "memory.*admit|persist.*memory|long.*term.*update" -t py -t ts # memory admission
rg "rewrite.*response|transform.*output|mutate" -t py -t ts # output mutationFor each finding record: symptom · mechanism · source layer · root cause · evidence file:line · confidence (0–1).
Fix order (code-first)
1 Code-gate tool requirements (enforce in code, not prompt) → 2 Remove/narrow hidden repair agents (make fallback explicit) → 3 Cut context duplication (same info via prompt+history+memory+distillation) → 4 Tighten memory admission (user corrections > agent assertions) → 5 Tighten distillation triggers → 6 Reduce rendering mutation (pass-through) → 7 Typed JSON envelopes over freeform prose internally.
Severity → action
critical (confidently wrong operational behavior) fix before release · high (frequent degradation) this
sprint · medium (fragile/wasteful) next cycle · low (cosmetic) backlog.
Output
Lead with severity-ranked findings (most critical first), then the architecture diagnosis (which layer corrupted what, why), then an ordered code-first fix plan. Be direct — if it's broken, say so; no compliment preamble. Don't let a clean current state erase a dirty historical incident; don't trust markdown prose as an internal protocol; don't accept "must use tool" that code never enforces.
Sources
Adapted from ECC skills/agent-architecture-audit (MIT, origin "oh-my-agent-check"); pairs with
code-review-discipline (evidence/confidence gate) and working-with-claude (context engineering).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

