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.
npx claude-code-templates@latest --command team/architecture-reviewWhat 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-review2Manually: put the files in place
.claude/commands/architecture-review.mdCall it with /architecture-review. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/architecture-review.mdCall it with /prompts:architecture-review. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/architecture-review.prompt.mdManually: put the files in place
.gemini/commands/architecture-review.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
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