code-architect
Skill2 starsChanged 8 months agoMITView on GitHub
Advanced software architecture analysis and code review at staff/principal engineer level. Use this skill whenever the user asks for architecture review, code quality analysis, refactoring strategy, system design critique, complexity analysis, dependency audit, performance bottleneck detection, or design pattern recommendations. Also trigger when the user says things like "review my architecture", "is this code well structured", "how should I refactor this", "what patterns should I use", "analyze my codebase", "tech debt assessment", "code smell detection", "coupling analysis", or any request that requires deep software engineering expertise beyond simple code review.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- waybarrios/opencode-power-packtheir own version, first seen Oct 13, 2026
- mcabreradev/hermes-sdd-agencytheir own version, first seen Sep 17, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- waybarrios/opencode-power-pack★ 547same name
- mcabreradev/hermes-sdd-agency★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Every analysis follows a structured investigation.
- Distinctive: line 33
Check the Stable Dependencies Principle
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code Architect
Deep software architecture analysis at staff/principal engineer level. This skill does not just review code -- it evaluates architectural decisions through the lens of computer science theory, distributed systems principles, and decades of software engineering research.
Analysis Framework
Every analysis follows a structured investigation. Not all sections apply to every codebase.
Phase 1: Structural Reconnaissance
Dependency Graph Analysis
- Build the module/package dependency DAG
- Identify cycles -- cyclic dependencies are the #1 indicator of architectural decay
- Compute fan-in (afferent coupling) and fan-out (efferent coupling) for each module
- Calculate Martin's instability metric: I = Ce / (Ca + Ce)
- I near 0 = stable (many dependents) -- should be abstract
- I near 1 = unstable (many dependencies) -- should be concrete
- Check the Stable Dependencies Principle
- Identify load-bearing modules (high fan-in, change cascades everywhere)
Layering Analysis
- Are layer boundaries respected? (presentation -> business logic -> data access)
- Skip-layer violations? (UI directly querying database)
- Dependency Inversion at layer boundaries?
Component Cohesion
- Common Closure Principle: classes that change together belong together
- Common Reuse Principle: classes used together belong together
- LCOM (Lack of Cohesion of Methods): high = class does too many things
- God modules? (utils, common, shared, helpers)
Phase 2: Complexity Analysis
Cyclomatic Complexity
- Functions with CC > 10 (warning) or > 20 (critical)
- Map complexity distribution across the codebase
Cognitive Complexity
- Nesting depth (each level multiplies cognitive load)
- Control flow breaks (break, continue, early return in middle)
- Boolean logic complexity
- State mutation distance from declaration
Asymptotic Complexity
- Nested loops over collections -- hidden O(n^2)
- Repeated linear searches (should be hash maps)
- String concatenation in loops
- N+1 query patterns in ORM code
- Unbounded recursion without memoization
Concurrency Complexity
- Shared mutable state and synchronization
- Potential deadlocks (lock ordering violations)
- Race conditions in lock-free patterns
- TOCTOU vulnerabilities
- Thread pool sizing (Amdahl's Law)
Phase 3: Design Pattern Analysis
Pattern Detection
- Creational: Factory, Builder, Singleton, Prototype
- Structural: Adapter, Decorator, Facade, Proxy, Composite
- Behavioral: Strategy, Observer, Command, State, Chain of Responsibility
- Architectural: MVC/MVP/MVVM, Clean Architecture, Hexagonal, CQRS, Event Sourcing
Anti-Pattern Detection
- God Object/Class: > 500 lines, > 20 methods
- Shotgun Surgery: one change touches many unrelated files
- Feature Envy: methods using more data from other classes
- Primitive Obsession: strings/ints where domain types add safety
- Speculative Generality: abstractions serving no current purpose
- Dead Code: unreachable code, unused exports
- Leaky Abstraction: implementation details bleeding through interfaces
- Anemic Domain Model: data classes + separate service classes
- Distributed Monolith: microservices deployed together
- Big Ball of Mud: no discernible architecture
Phase 4: API and Interface Design
- Interface Segregation: are interfaces too broad?
- Contract Analysis: are function signatures honest about behavior?
- Error handling consistency (exceptions vs result types vs error codes)
- Nullability discipline
- Type system utilization (branded types, phantom types, type state)
- Generics usage (too little = duplication, too much = unreadable)
Phase 5: Resilience and Operability
- Failure modes: what happens when external dependencies fail?
- Circuit breakers, retries with backoff, graceful degradation
- Timeout strategies
- Cascading failure risks
- Observability: structured logging, correlation IDs, metrics
- Data integrity: transactions, consistency, idempotency
Phase 6: Evolution and Maintainability
Change Impact Analysis
- Blast radius of common changes
- Git hotspots (high modification frequency)
- Testability (can components be tested in isolation?)
Technical Debt Classification (Fowler's quadrant)
| Type | Description | Urgency |
| Reckless/Deliberate | "No time for design" | High |
| Prudent/Deliberate | "Ship now, refactor later" | Medium |
| Reckless/Inadvertent | "What is a design pattern?" | High |
| Prudent/Inadvertent | "Now we know how to build it" | Low |
Refactoring Roadmap Prioritized sequence:
- Quick wins (high impact, low effort)
- Structural improvements (medium effort)
- Architectural changes (high effort)
- Rewrites (when justified)
Each recommendation includes: What, Why (theory), Risk, Effort, Dependencies.
Output Format
# Architecture Review: [Project Name]
## Executive Summary
[2-3 sentences: health, top concerns, key recommendation]
## Findings
### Critical (must address)
### Warning (should address)
### Observation (consider)
## Metrics
[Coupling, complexity, instability scores]
## Refactoring Roadmap
[Prioritized with effort estimates]
## References
[Papers and patterns that informed the analysis]Guiding Principles
- SOLID Principles (Martin)
- Package Principles (Martin)
- Law of Demeter
- Conway's Law
- Lehman's Laws of Software Evolution
- Parnas's Information Hiding
- Amdahl's Law
- CAP Theorem
- Two Generals Problem
- Hyrum's Law
Calibrating Depth
- Small script (< 500 LOC): complexity + API design
- Library (500-5000 LOC): add dependency + pattern review
- Application (5000-50000 LOC): full except distributed systems
- Large system (> 50000 LOC): full analysis
- Distributed system: full + extra Phase 5
Interaction Style
- Be direct about problems but constructive about solutions
- Cite specific lines/files, not vague generalities
- Explain the "why" using CS theory
- Acknowledge trade-offs in every decision
- Scale recommendations to the team's context
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

