architecture-audit

architecture-audit is a skill for Claude Code from karsten-s-nielsen/mad-scientist-skills. It costs 174 tokens per session (12,809 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 — 10 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 10 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,809 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.12809
Opus 5 $0.00087 $0.06404
Sonnet 5 $0.00035 $0.02562
Haiku 4.5 $0.00017 $0.01281

Measured 12d ago against content hash 6701cb9887e8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 12d 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. 12d 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 13d ago), licensed MIT. It adds 174 tokens to every session and 12,809 once invoked, about $0.0009 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-31.

Related

Other skills, from other repositories

audit

This skill should be used when the user asks to "audit spec coverage", "find uncovered modules", "scan for missing specs", "check wyx coverage", "get spec TODO list", "wyx audit", "wyx", or wants a prioritized list of wyx skill commands for uncovered modules. Scans for coverage gaps, pipeline/sync candidates, and…

jlifyio/wyx · 81 tokens

refactor

Automated iterative code refactoring with swarm-orchestrated specialist agents including deep codebase discovery, confidence-scored code review, and security analysis. Use this skill when the user wants to improve existing code quality, clean up messy code, restructure, simplify, reduce tech debt, or perform…

zircote-plugins/refactor · 112 tokens

recipe-front-review

Reviews completed frontend implementation for governing-source compliance, scope economy, repository quality, and security, then applies user-approved React corrections.

shinpr/claude-code-workflows · 29 tokens

new-skill

Scaffold a new brooks-lint analysis skill so it passes npm run validate and npm run evals on the first try — generates skills/{name}/SKILL.md (with the mandatory "Do NOT trigger for:" clause and a Process section citing guide step ranges) plus skills/{name}/{name}-guide.md (sequentially numbered steps), then appends…

hyhmrright/brooks-lint · 145 tokens

release

Cut a brooks-lint release: set the version in package.json, propagate it across all four plugin manifests and every version-bearing text file (README badges, docs site metadata), write the CHANGELOG entry, validate, then commit, push, tag, and publish the GitHub release. Triggers when the maintainer asks to "release"…

hyhmrright/brooks-lint · 135 tokens

brooks-audit

Architecture audit that maps module dependencies, checks layering integrity, and flags structural decay across a codebase, drawing on twelve classic engineering books. Triggers when: user asks to audit architecture, review folder/module structure, check for circular imports, understand how the codebase is organized…

hyhmrright/brooks-lint · 143 tokens