Skip to main content
command

architecture-review — Claude Code command: what it does

A Claude slash command that maps your project structure, patterns and dependencies, then hands back an improvement plan. Useful before a big refactor.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --command team/architecture-review
Open on GitHub

What architecture-review does

The command runs an architecture pass and returns a written assessment. It starts by gathering context: it looks for .js, .ts, .py and .go files, guesses the project type from package.json, requirements.txt or go.mod, checks for test files and counts documentation files. Then it works through six areas — component hierarchy, implemented patterns and anti-patterns, coupling between modules, data flow, scaling and caching, and trust boundaries in the security layer.

You can narrow the scope with an argument: [scope], --modules, --patterns, --dependencies or --security. With no argument it takes on the whole codebase, which on a large project means a longer run. Its tools are read-only: Read, Glob, Grep, Bash. Nothing gets modified, so you can fire it off at any point.

What you get back is an assessment plus refactoring strategies and an implementation roadmap. That is worth checking before you start rewriting modules: the report shows where coupling is tangled and which parts to touch first.

What it helps with

  • map a codebase before a large refactor
  • spot anti-patterns and inconsistent design patterns
  • find circular dependencies between modules
  • review trust boundaries and authorization flows
  • lay out an order of work for paying down technical debt

Example prompts for the agent

  • /architecture-review --patterns
  • /architecture-review --dependencies
  • /architecture-review src/api --security

How to install architecture-review

1claude-code-templates

npx claude-code-templates@latest --command team/architecture-review

2Manually: put the files in place

.claude/commands/architecture-review.md

Call it with /architecture-review. For all projects use ~/.claude/commands/

Questions about architecture-review

How do I install architecture-review in Claude?

Use the templates CLI: npx claude-code-templates@latest --command team/architecture-review. The command file then lives at .claude/commands/architecture-review.md.

What does architecture-review do?

It analyses system architecture: component structure, design patterns, dependencies, data flow, scalability and security. The output is a set of improvement recommendations, refactoring strategies and an implementation roadmap.

What arguments does the command take?

A review scope: [scope], --modules, --patterns, --dependencies or --security. With no argument it reviews the whole project.

Source text

architecture-review.md · MIT
---
allowed-tools: Read, Glob, Grep, Bash
argument-hint: "[scope] | --modules | --patterns | --dependencies | --security"
description: Comprehensive architecture review with design patterns analysis and improvement recommendations
---

# Architecture Review

Perform comprehensive system architecture analysis and improvement planning: **$ARGUMENTS**

## Current Architecture Context

- Project structure: !`find . -name "*.js" -o -name "*.ts" -o -name "*.py" -o -name "*.go" | head -5 && echo "..."`
- Package dependencies: !`[ -f package.json ] && echo "Node.js project" || [ -f requirements.txt ] && echo "Python project" || [ -f go.mod ] && echo "Go project" || echo "Multiple languages"`
- Testing framework: !`find . -name "*.test.*" -o -name "*spec.*" | head -3 && echo "..." || echo "No test files found"`
- Documentation: !`find . -name "README*" -o -name "*.md" | wc -l` documentation files

## Task

Execute comprehensive architectural analysis with actionable improvement recommendations:

**Review Scope**: Use $ARGUMENTS to focus on specific modules, design patterns, dependency analysis, or security architecture

**Architecture Analysis Framework**:
1. **System Structure Assessment** - Map component hierarchy, identify architectural patterns, analyze module boundaries, assess layered design
2. **Design Pattern Evaluation** - Identify implemented patterns, assess pattern consistency, detect anti-patterns, evaluate pattern effectiveness
3. **Dependency Architecture** - Analyze coupling levels, detect circular dependencies, evaluate dependency injection, assess architectural boundaries
4. **Data Flow Analysis** - Trace information flow, evaluate state management, assess data persistence strategies, validate transformation patterns
5. **Scalability & Performance** - Analyze scaling capabilities, evaluate caching strategies, assess bottlenecks, review resource management
6. **Security Architecture** - Review trust boundaries, assess authentication patterns, analyze authorization flows, evaluate data protection

**Advanced Analysis**: Component testability, configuration management, error handling patterns, monitoring integration, extensibility assessment.

**Quality Assessment**: Code organization, documentation adequacy, team communication patterns, technical debt evaluation.

**Output**: Detailed architecture assessment with specific improvement recommendations, refactoring strategies, and implementation roadmap.

© davila7 · MIT · davila7/claude-code-templates

Similar slash commands

All slash commands for Code review and refactoring →
Critical thinking mode instructions official github Forces the engineer to justify technical decisions by repeatedly asking "Why?". It questions assumptions without modifying project files. ★ 40,418repo stars cto-review Alireza Rezvani A slash command that asks six hard questions about your architecture before you approve it. Useful before a big change, a hiring push, or a build-vs-buy call. 399installs hexagonal-architecture affaan-m Guides you in structuring Ports and Adapters systems across TypeScript, Java, Kotlin, and Go. Helps isolate domain logic when code gets tangled with I/O. CX Codex +1 4,800installs feature-dev official Anthropic Guides new feature work by exploring the codebase, asking for missing details, shaping the architecture, and waiting for approval before implementation. 179installs modernize official Anthropic This command guides a legacy-code modernization: it finds the system, records the goal and constraints, then gives the next command. Use it before the build work starts. ★ 44,635repo stars modernize-map official Anthropic Builds an interactive dependency and topology map of a legacy codebase, showing entry points and data flows. Helps map connections between modules before refactoring. ★ 44,635repo stars modernize-harden official Anthropic Scans a legacy system for vulnerabilities and drafts patches for Critical and High findings. It leaves the source code untouched. ★ 44,635repo stars modernize-assess official Anthropic Assesses a legacy system for code size, complexity, technical debt, and security risks. Use it before planning a modernization effort for one system or a portfolio. ★ 44,635repo stars

From the same set205

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor