This skill should be used when the user asks to "audit architecture", "check architecture drift", "find module coupling", "detect boundary violations", "review code structure", "check dependency direction", or needs to verify that declared architecture matches actual code organization and dependencies.
From solution-auditnpx claudepluginhub nsalvacao/nsalvacao-claude-code-plugins --plugin solution-auditThis skill uses the workspace's default tool permissions.
references/import-patterns.mdSearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Detect drift between a solution's declared or intended architecture and its actual code structure. Architecture drift is silent — it accumulates gradually and creates maintenance nightmares.
Architecture coherence means module boundaries are respected, dependencies flow in the declared direction, responsibilities are correctly distributed, and abstractions serve real needs. Violations indicate structural debt.
Identify the intended architecture from available sources:
If no explicit architecture docs exist, infer intent from directory naming and package structure. Note this as a finding (missing architecture documentation).
Analyze the codebase to understand real module relationships:
Build the actual dependency graph by analyzing imports:
Use Grep with language-appropriate patterns:
import .* from, require\(from .* import, import .*import ", import \(use, modCompare actual imports against intended architecture:
Evaluate the degree of coupling between modules:
Flag modules with unusually high coupling in either direction.
Verify modules do what their names suggest:
Assess abstraction quality:
Identify accumulated structural issues:
| Severity | Criteria | Example |
|---|---|---|
| Critical | Core boundary violation or circular dependency | Domain module importing from UI layer |
| Warning | Coupling issue or responsibility drift | Utility module growing into business logic |
| Info | Minor structural inconsistency | Slightly inconsistent naming between modules |
For each finding, report:
[SEVERITY] Category: Brief description
Location: module-a → module-b (or file:line)
Expected: Declared/intended relationship
Actual: What the code shows
Fix: Specific refactoring action
Start at 100, subtract per finding:
Score reflects structural integrity of the codebase.
references/import-patterns.md — Language-specific import/dependency detection patterns