architecture-audit

architecture-audit is a skill for Claude Code from karsten-s-nielsen/mad-scientist-skills. It costs 174 tokens per session (12,838 once invoked), scanned A, original, MIT.

A code-architecture review tool with a planning mode for new systems and an audit mode for existing codebases. It examines how parts of a system are divided, connected, and organized.

In plain words
What is it for?
Choosing architectural patterns, dividing a system into bounded contexts—separate areas of business responsibility—and checking dependency direction, domain models, SOLID principles, and structural decay.
Why use it?
It helps reveal designs that are hard to change, overly dependent on each other, or drifting away from the intended structure.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Part of the mad-scientist-skills plugin — 11 skills, 4 commands shipped together

Good fit Choosing architectural patterns, dividing a system into bounded contexts—separate areas of business responsibility—and checking dependency direction, domain models, SOLID principles, and structural decay.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/karsten-s-nielsen/mad-scientist-skills/architecture-audit
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.

Any agent
npx skills add karsten-s-nielsen/mad-scientist-skills --skill architecture-audit
Clone the repo
git clone --depth 1 https://github.com/karsten-s-nielsen/mad-scientist-skills

Made for: Claude Code.

Or install mad-scientist-skills, the plugin that ships this one along with the rest of its 11 skills, 4 commands.

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 architecture-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/karsten-s-nielsen/mad-scientist-skills/architecture-audit/github.svg)](https://agentmods.dev/skills/karsten-s-nielsen/mad-scientist-skills/architecture-audit)
Your own site
<a href="https://agentmods.dev/skills/karsten-s-nielsen/mad-scientist-skills/architecture-audit"><img src="https://agentmods.dev/badge/skills/karsten-s-nielsen/mad-scientist-skills/architecture-audit/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 architecture-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/karsten-s-nielsen/mad-scientist-skills/architecture-audit"><img src="https://agentmods.dev/badge/skills/karsten-s-nielsen/mad-scientist-skills/architecture-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 174 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 12,838 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.00174 $0.12838
Opus 5.5 $0.00070 $0.05135
Sonnet 5.5 $0.00035 $0.02568
Haiku 4.5 $0.00017 $0.01284

Measured 1mo ago against content hash 1bbfe7735688, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

architecture-audit 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 1mo 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.

plugins/mad-scientist-skills/skills/architecture-audit/SKILL.md · 635 lines

How it starts

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

Architecture Audit (beta)

A comprehensive architecture audit skill with two modes and a single tier:

Modes:

  • Planning (before code exists) — architectural pattern selection, bounded context decomposition, dependency direction design, SOLID compliance strategy
  • Audit (on existing code) — scanning for architectural drift, coupling violations, domain model anti-patterns, dependency direction violations, and structural decay

Single tier: Architecture analysis is methodology-based — the value is in the analytical framework (dependency graphs, coupling metrics, pattern detection), not in paid tooling. The few tools referenced (import-linter, deptry, Madge) are free/open-source.

Beta: This skill is under active development. Phase coverage and detection patterns will expand based on field testing. Findings should be reviewed with appropriate skepticism — architectural assessment requires more judgment than grep-based vulnerability scanning.

Core question: "Does the structure of this codebase support its evolution?"

Academic and practitioner foundations

This skill synthesizes eleven architectural traditions:

Tradition Key Author(s) Core Contribution Primary Phases
Hexagonal Architecture (Ports & Adapters) Cockburn (2005) Dependency inversion at application boundaries; driving/driven port distinction Phase 2, Phase 3
Domain-Driven Design Evans (2003), Vernon (2013) Bounded contexts, ubiquitous language, strategic/tactical patterns, aggregate design Phase 4, Phase 5
Clean Architecture Martin (2017) The Dependency Rule — source code dependencies point only inward; four concentric rings Phase 2, Phase 3
SOLID Principles Martin (2000s) Five object-oriented design principles for maintainable, extensible code Phase 6
Enterprise Integration Patterns Hohpe & Woolf (2003) Messaging patterns for distributed systems; Splitter, Aggregator, Content-Based Router, Pipes and Filters Phase 4
Coupling and Cohesion Constantine & Yourdon (1979), Martin (package principles) Afferent/efferent coupling, Stable Dependencies Principle, cohesion classification Phase 7
CQRS Young (2010), Fowler Separate read and write models; command handlers mutate state, query handlers are side-effect-free Phase 2, Phase 8
Event Sourcing Young (2010), Fowler Store domain events as the source of truth; derive current state by replaying events Phase 2, Phase 8
Twelve-Factor App Wiggins (2011, Heroku) Twelve principles for building portable, resilient, cloud-native applications Phase 8
API-First Design Swagger/OpenAPI community Design the API contract before implementation; spec drives code generation and testing Phase 2, Phase 8
Architectural Decision Records Nygard (2011) Lightweight documentation of significant architectural decisions with context, consequences, and status Phase 9

Read the full file on GitHub · 635 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. 1mo ago Changed 1bbfe7735688
  2. 2mo ago First seen · 635 lines · 174 tokens per session scan A 6701cb9887e8

Subscribe to this mod's changes

architecture-audit is a skill published in the GitHub repository karsten-s-nielsen/mad-scientist-skills (3 stars, last pushed 1mo ago), licensed MIT. It adds 174 tokens to every session and 12,838 once invoked, about $0.0007 per session on Opus 5.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-31.

Related

architecture-audit compared with skills from other repositories

architecture-audit next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
architecture-auditkarsten-s-nielsen/mad-scientist-skillsSkill31mo agoMITA174Claude Code
auditjlifyio/wyxSkill329d agoMITA81Claude Code
refactorzircote-plugins/refactorSkill25mo agoMITA112Claude Code
releasehyhmrright/brooks-lintSkill1.6kyesterdayMITA135Claude Code, Codex
recipe-front-reviewshinpr/claude-code-workflowsSkill7114d agoMITA29Claude Code
new-skillhyhmrright/brooks-lintSkill1.6kyesterdayMITA145Claude Code, Codex
brooks-audithyhmrright/brooks-lintSkill1.6kyesterdayMITA143Claude Code