Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Analyze and visualize software architecture patterns, dependencies, and module boundaries for migration planning
.claude/skills/a5c-ai-architecture-analyzer/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 125% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 119% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 129% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 59% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 97% | 0% |
Analyzes and visualizes software architecture patterns and dependencies to support migration planning, module boundary identification, and architectural decision-making.
Enable comprehensive architecture analysis for:
This skill can leverage the following external tools when available:
| Tool | Purpose | Integration Method | |------|---------|-------------------| | Structure101 | Architecture visualization | Export analysis | | Lattix | Dependency analysis | CLI / API | | NDepend | .NET architecture analysis | CLI | | JDepend | Java package dependencies | CLI | | Madge | JavaScript/TypeScript | CLI | | deptree | Python dependencies | CLI | | go-arch-lint | Go architecture | CLI | | ast-grep | Pattern matching | MCP Server |
bash# Invoke skill for architecture analysis # The skill will analyze structure and dependencies # Expected inputs: # - targetPath: Path to codebase root # - analysisDepth: 'module' | 'package' | 'class' | 'function' # - outputFormat: 'json' | 'dot' | 'mermaid' | 'plantuml' # - includeMetrics: boolean
json{ "analysisId": "string", "timestamp": "ISO8601", "target": { "path": "string", "language": "string", "moduleCount": "number", "totalFiles": "number" }, "architecture": { "pattern": "string (layered|modular|monolithic|microservices)", "layers": [ { "name": "string", "modules": ["string"], "allowedDependencies": ["string"] } ], "boundedContexts": [ { "name": "string", "modules": ["string"], "interfaces": ["string"] } ] }, "modules": [ { "name": "string", "path": "string", "files": "number", "linesOfCode": "number", "dependencies": ["string"], "dependents": ["string"], "metrics": { "afferentCoupling": "number", "efferentCoupling": "number", "instability": "number", "cohesion": "number" } } ], "dependencies": [ { "from": "string", "to": "string", "type": "import|call|inherit|implement", "count": "number" } ], "violations": [ { "type": "circular|layer-bypass|abstraction-leak", "severity": "high|medium|low", "from": "string", "to": "string", "description": "string", "recommendation": "string" } ], "metrics": { "averageCoupling": "number", "maxCoupling": "number", "cyclomaticComplexity": "number", "circularDependencies": "number", "layerViolations": "number" }, "graphs": { "dot": "string (file path)", "mermaid": "string (file path)", "plantuml": "string (file path)" } }
This skill integrates with the following Code Migration/Modernization processes:
Create .architecture-analyzer.json in the project root:
json{ "analysisDepth": "module", "excludePaths": [ "node_modules", "vendor", "dist", "build", ".git", "__tests__" ], "modulePatterns": { "javascript": "src/*", "java": "src/main/java/**", "python": "src/*" }, "layers": { "enabled": true, "definitions": [ { "name": "presentation", "patterns": ["**/ui/**", "**/views/**", "**/controllers/**"], "allowedDependencies": ["business", "shared"] }, { "name": "business", "patterns": ["**/services/**", "**/domain/**"], "allowedDependencies": ["data", "shared"] }, { "name": "data", "patterns": ["**/repositories/**", "**/dao/**"], "allowedDependencies": ["shared"] }, { "name": "shared", "patterns": ["**/common/**", "**/utils/**"], "allowedDependencies": [] } ] }, "rules": { "maxCoupling": 10, "maxModuleSize": 5000, "forbiddenDependencies": [ {"from": "presentation", "to": "data"} ] }, "visualization": { "formats": ["mermaid", "dot"], "groupBy": "layer", "showMetrics": true } }
When ast-grep MCP Server is available for pattern detection:
javascript// Example architecture pattern detection { "tool": "ast_grep_search", "arguments": { "pattern": "import { $_ } from '../data/$_'", "language": "typescript", "path": "./src/ui" } }
┌─────────────────────────────────┐
│ Presentation Layer │
│ (UI, Controllers, Views) │
└──────────────┬──────────────────┘
│
┌──────────────▼──────────────────┐
│ Business Layer │
│ (Services, Domain, Logic) │
└──────────────┬──────────────────┘
│
┌──────────────▼──────────────────┐
│ Data Layer │
│ (Repositories, DAOs, ORM) │
└─────────────────────────────────┘┌─────────────────────────────────────────────┐
│ Application Shell │
├───────────┬───────────┬───────────┬─────────┤
│ Module A │ Module B │ Module C │ Shared │
│ ┌─────┐ │ ┌─────┐ │ ┌─────┐ │ ┌─────┐ │
│ │ UI │ │ │ UI │ │ │ UI │ │ │Utils│ │
│ ├─────┤ │ ├─────┤ │ ├─────┤ │ └─────┘ │
│ │Logic│ │ │Logic│ │ │Logic│ │ │
│ ├─────┤ │ ├─────┤ │ ├─────┤ │ │
│ │Data │ │ │Data │ │ │Data │ │ │
│ └─────┘ │ └─────┘ │ └─────┘ │ │
└───────────┴───────────┴───────────┴─────────┘┌─────────┐ ┌─────────┐ ┌─────────┐
│Service A│ │Service B│ │Service C│
│ ┌───┐ │ │ ┌───┐ │ │ ┌───┐ │
│ │API│ │ │ │API│ │ │ │API│ │
│ └─┬─┘ │ │ └─┬─┘ │ │ └─┬─┘ │
│ │ │ │ │ │ │ │ │
│ ┌─▼─┐ │ │ ┌─▼─┐ │ │ ┌─▼─┐ │
│ │DB │ │ │ │DB │ │ │ │DB │ │
│ └───┘ │ │ └───┘ │ │ └───┘ │
└─────────┘ └─────────┘ └─────────┘
│ │ │
└────────────┼────────────┘
│
┌──────▼──────┐
│ Event Bus │
└─────────────┘| Metric | Formula | Good | Warning | Bad | |--------|---------|------|---------|-----| | Afferent Coupling (Ca) | Incoming dependencies | < 10 | 10-20 | > 20 | | Efferent Coupling (Ce) | Outgoing dependencies | < 10 | 10-20 | > 20 | | Instability (I) | Ce / (Ca + Ce) | 0-0.3 or 0.7-1.0 | 0.3-0.7 | - | | Abstractness (A) | Abstract classes / Total | Context dependent | - | - |
D = |A + I - 1|
static-code-analyzer: Code-level analysisdomain-model-extractor: DDD boundary identificationtechnical-debt-quantifier: Architecture debt assessmentlegacy-system-archaeologist: Uses this skill for architecture discoverymicroservices-decomposer: Uses this skill for boundary identificationddd-analyst: Uses this skill for context mappingmigration-readiness-assessor: Uses this skill for architecture evaluation| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 4,314 | 5,453 | +26% | 1 | 1 | 0% | 262 | 3,243 | +1138% | 0 | 0 | — |
case-02 | fail→pass | 12,365 | 15,519 | +26% | 1 | 1 | 0% | 2,967 | 6,669 | +125% | 0 | 0 | — |
case-03 | fail→pass | 14,439 | 18,562 | +29% | 1 | 1 | 0% | 3,186 | 6,992 | +119% | 0 | 0 | — |
case-04 | fail→fail | 8,057 | 6,647 | -18% | 1 | 1 | 0% | 1,339 | 4,164 | +211% | 0 | 0 | — |
case-05 | fail→fail | 8,745 | 6,671 | -24% | 1 | 1 | 0% | 1,720 | 4,158 | +142% | 0 | 0 | — |
case-06 | fail→pass | 9,324 | 4,697 | -50% | 1 | 1 | 0% | 1,619 | 3,701 | +129% | 0 | 0 | — |
case-07 | fail→fail | 10,935 | 7,450 | -32% | 1 | 1 | 0% | 2,193 | 4,070 | +86% | 0 | 0 | — |
case-08 | fail→fail | 9,237 | 7,317 | -21% | 1 | 1 | 0% | 1,730 | 4,182 | +142% | 0 | 0 | — |
case-09 | fail→fail | 10,238 | 2,631 | -74% | 1 | 1 | 0% | 1,738 | 3,347 | +93% | 0 | 0 | — |
case-10 | fail→fail | 7,012 | 1,614 | -77% | 1 | 1 | 0% | 1,208 | 3,168 | +162% | 0 | 0 | — |
case-11 | fail→fail | 8,580 | 3,944 | -54% | 1 | 1 | 0% | 1,527 | 3,577 | +134% | 0 | 0 | — |
case-12 | fail→fail | 7,870 | 3,206 | -59% | 1 | 1 | 0% | 1,593 | 3,455 | +117% | 0 | 0 | — |
case-13 | fail→pass | 10,912 | 2,491 | -77% | 1 | 1 | 0% | 2,115 | 3,367 | +59% | 0 | 0 | — |
case-14 | fail→fail | 10,518 | 6,933 | -34% | 1 | 1 | 0% | 2,112 | 4,190 | +98% | 0 | 0 | — |
case-15 | fail→fail | 12,773 | 12,212 | -4% | 1 | 1 | 0% | 2,381 | 5,324 | +124% | 0 | 0 | — |
case-16 | fail→pass | 11,985 | 10,150 | -15% | 1 | 1 | 0% | 2,282 | 4,489 | +97% | 0 | 0 | — |
case-17 | fail→pass | 8,287 | 1,255 | -85% | 1 | 1 | 0% | 1,709 | 3,052 | +79% | 0 | 0 | — |
case-18 | fail→pass | 15,709 | 2,705 | -83% | 1 | 1 | 0% | 2,396 | 3,285 | +37% | 0 | 0 | — |
case-19 | fail→fail | 11,534 | 6,138 | -47% | 1 | 1 | 0% | 1,647 | 3,679 | +123% | 0 | 0 | — |
case-20 | fail→pass | 3,178 | 8,827 | +178% | 1 | 1 | 0% | 497 | 4,286 | +762% | 0 | 0 | — |
case-21 | fail→fail | 13,521 | 20,749 | +53% | 1 | 1 | 0% | 2,224 | 5,972 | +169% | 0 | 0 | — |
case-22 | fail→fail | 15,426 | 11,775 | -24% | 1 | 1 | 0% | 2,216 | 4,930 | +122% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +36 percentage points is the difference between those two pass rates over the 21 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.