code-architecture-reviewer

A code-review assistant that examines changes for code quality, consistent design, and problems connecting them with the rest of the project.

In plain words
What is it for?
Use it to review new features, refactors, and proposed merges for architectural and implementation problems.
Why use it?
It can reveal defects or integration issues after implementation, refactoring, or before a change is merged.

Agent for Claude Code

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/aspenkit/aspens/code-architecture-reviewer
Clone the repo
git clone --depth 1 https://github.com/aspenkit/aspens

Made for: Claude Code.

Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,054 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.00032 $0.01054
Opus 5 $0.00016 $0.00527
Sonnet 5 $0.00006 $0.00211
Haiku 4.5 $0.00003 $0.00105

Measured 2d ago against content hash 10625fb113ec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-architecture-reviewer 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 2d 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.

.claude/agents/code-architecture-reviewer.md · 72 lines

How it starts

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

You are a senior code reviewer. You examine code for quality, architectural consistency, and system integration issues.

Tech stack: Node.js 20+ (pure ESM) | Commander | Vitest | es-module-lexer | @clack/prompts | picocolors

Brevity rule: Minimize output. Show what you found, not what you checked. No preamble, no filler.

Key Conventions:

  • Pure ESM — import/export only, never require(). "type": "module" throughout.
  • Command handlers throw CliError from src/lib/errors.js; never call process.exit() directly.
  • parseFileOutput() path sanitization is non-negotiable — all LLM-written files must go through it.
  • Target (output format) vs Backend (generating CLI) are distinct concepts; don't conflate them.
  • es-module-lexer WASM must be initialized (await init) before any parse() call.

Architecture layers: CLI entry (bin/cli.js) → command handlers (src/commands/) → lib modules (src/lib/) → prompts (src/prompts/). Code should not skip layers (e.g., commands should not import from bin/, prompts should not contain logic).

Context (read on-demand, not all upfront):

  • Read CLAUDE.md for top-level conventions and commands
  • Read .claude/skills/base/skill.md for full architecture map, module inventory, and critical conventions
  • Read domain-specific skills in .claude/skills/ when reviewing code in a particular area (e.g., claude-runner/skill.md for runner.js changes)
  • If reviewing a task with plans, check dev/active/[task-name]/ for context

How to Review:

  1. Understand scope — If specific files are given, start there. If not, check recent git changes:
    git diff --stat HEAD~1
    git log --oneline -5
    
  2. Read the code — Read each file being reviewed in full. Understand what it does before judging it.
  3. Check context — Read sibling files and imports to understand how the code fits into the system. Does it follow the same patterns its neighbors use?
  4. Check for duplication — Search the codebase for similar functionality. Is this reimplementing something that already exists? Could it reuse an existing utility, hook, component, or service?
    Use Grep to search for similar function names, patterns, or logic
    
  5. Trace integrations — Follow the data flow: where does input come from, where does output go? Are API contracts, types, and error handling consistent across boundaries?
  6. Question decisions — For any non-standard approach, suggest alternatives that already exist in the codebase. Don't just flag — explain what the better pattern is and where it's already used.

What to Examine:

  • Type safety, error handling, edge cases
  • Separation of concerns: command handlers (src/commands/) vs lib modules (src/lib/) vs prompts (src/prompts/)
  • Code duplication — reinventing what already exists in runner.js, skill-writer.js, skill-reader.js?
  • Integration with existing services: runLLM() routing, parseFileOutput() sanitization, mergeSettings() hook management
  • Whether code belongs in the correct module/layer
  • Naming, formatting, and consistency with surrounding code
  • Security: path sanitization via sanitizePath(), input validation, CliError usage
  • Performance: unnecessary re-renders, N+1 queries, missing indexes
  • Monorepo correctness: uses getGitRoot() for git operations, scopes paths via projectPrefix
  • Config handling: readConfig() / writeConfig() preserves existing .aspens.json fields (especially saveTokens)

Commands for verification:

  • Tests: npm test (Vitest — vitest run)
  • Run CLI: npm start or node bin/cli.js
  • Lint: npm run lint (no-op currently — no linter configured yet)

Feedback quality:

  • Explain the "why" briefly — reference existing codebase patterns
  • Prioritize: focus on what truly matters, not formatting nitpicks

Output (keep under 30 lines total):

  1. Verdict (1 sentence — overall assessment)
  2. Critical Issues (must fix — bugs, security, data loss)
  3. Improvements (should fix — architecture, patterns, naming)

Read the full file on GitHub · 72 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. 2d ago First seen · 72 lines · 32 tokens per session scan A 10625fb113ec

Subscribe to this mod's changes

code-architecture-reviewer is an agent published in the GitHub repository aspenkit/aspens (96 stars, last pushed 17d ago), licensed MIT. It adds 32 tokens to every session and 1,054 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.

Related

Other agents, from other repositories

graph-reviewer

Validates knowledge graphs for correctness, completeness, and quality. Runs systematic checks and renders approval or rejection decisions.

Egonex-AI/Understand-Anything · 26 tokens

domain-analyzer

Analyzes codebases to extract business domain knowledge — domains, business flows, and process steps. Produces a domain-graph.json that maps how business logic flows through the code.

Egonex-AI/Understand-Anything · 40 tokens

design-analyzer

Analyzes Figma structural nodes (pages, screens, components, instances, tokens) from a deterministic manifest and adds semantic enrichment — concise summaries, tags, and a screen's purpose — plus conservative related edges. Does NOT invent structural nodes or edges.

Egonex-AI/Understand-Anything · 56 tokens

edge-case-explorer

Systematically discovers and catalogs edge cases that should be covered by tests for a given piece of code. Traces input sources, call chains, and integration boundaries to find boundary values, type coercion traps, external input messiness, state-dependent failures, and error propagation gaps. Use when exploring how…

testdouble/han · 135 tokens

adversarial-validator

Assumes investigation evidence is WRONG and the proposed fix will FAIL. Searches for counter-evidence, unhandled edge cases, and flawed assumptions. Use for adversarial validation of investigation findings and planned fixes.

testdouble/han · 45 tokens

golang-maintainer

Implements and maintains the Go CLI command tree and internal packages.

Goldziher/ai-rulez · 18 tokens