/universe:map [directory]from universe
Generates a high-level architectural map of a codebase showing layers, modules, boundaries, data flow, and dependency directions. Useful for onboarding or understanding project structure.
Ships in universe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Generate a high-level architectural map of the codebase: layers, modules, boundaries, data flow, and dependency directions. The output should give someone who's never seen this codebase a mental model in 2 minutes.
Gather structural data:
ls -la, ls src/)package.json, pyproject.toml, Cargo.toml, go.mod — what's
the stack?next.config.js, vite.config.ts, tsconfig.json, etc.lenskit_status with detailed: true first. It
provides file count, avg risk score, top risk files, circular dependency count, hub count,
and test coverage ratio. This gives you a quantitative foundation before reading any code.Read representative files from each major directory to understand the layer:
Use the layer classification from skills/trace/references/layer-patterns.md to identify
which directory maps to which architectural layer. Common patterns:
app/, pages/, routes/, api/, handlers/, controllers/services/, use-cases/, domain/db/, repositories/, models/lib/, utils/, helpers/components/, ui/, views/middleware/, plugins/, config/For framework-specific patterns (Django, FastAPI, Spring Boot, etc.), see the reference file.
With lenskit-mcp (preferred): Call lenskit_graph to get the full dependency graph
with layer classifications, circular dependencies, hub files, and layer violations
pre-computed. Use this data directly for the module map and observations sections. For the
highest-risk or highest-centrality files, call lenskit_analyze to add risk-score and
coupling detail to the observations.
Note on tsconfig path aliases: If the project uses tsconfig path aliases (e.g.,
@/utils/helpers mapping to src/utils/helpers), lenskit resolves these automatically.
The graph data will show the true file-to-file dependencies even for aliased imports.
If you see aliased imports in the code that don't appear in the graph, check whether
the project's tsconfig.json has paths configured.
Without lenskit-mcp: For each major module/directory, identify what it imports from and what imports it:
# What does src/lib/auth import?
grep -h "from" src/lib/auth/*.ts | sort -u
# What imports from src/lib/auth?
grep -rl "from.*lib/auth" src/ | grep -v "lib/auth"
Build a dependency direction map: which layers depend on which?
Look for:
Report format:
## Architecture Map — {project name}
### Stack
{Framework, language, database, key dependencies — one line each}
### Layer Diagram
┌─────────────────────────────────────────┐
│ Entry (app/api/, app/(routes)/) │ ← External requests
├─────────────────────────────────────────┤
│ Middleware (middleware.ts, lib/auth/) │ ← Auth, rate limiting
├─────────────────────────────────────────┤
│ Business Logic (lib/services/) │ ← Core domain
├─────────────────────────────────────────┤
│ Data Access (lib/db/) │ ← Database operations
├─────────────────────────────────────────┤
│ External Services (lib/clients/) │ ← Third-party APIs
└─────────────────────────────────────────┘
### Module Map
| Module | Purpose | Depends on | Depended by |
|--------|---------|------------|-------------|
| lib/auth | Authentication | lib/db, env | api/*, middleware |
| lib/db | Database access | prisma, env | lib/services, api/* |
| lib/services | Business logic | lib/db, lib/clients | api/* |
| ... |
### Data Flow
{Primary data flow path from entry to storage — reference /trace for detailed flows}
### Boundaries
- **Trust boundary**: All API routes require auth via middleware
- **Package boundary**: (if monorepo) packages communicate via published APIs
- **External boundary**: Database via Prisma, payments via Stripe SDK
### Key Patterns
{2-3 architectural patterns the project follows: repository pattern, service layer,
middleware chain, event-driven, etc.}
### Observations
{Potential issues: circular dependencies, layer violations, god modules, etc.}
/hotspots — Find the riskiest areas in the architecture/trace — Follow a specific feature flow through the layers/explain — Deep-dive into any module you found in the mapFor monorepos (Turborepo, Nx, Lerna, pnpm workspaces):
src/ into another
(should use published package exports instead)What SKILL.md sets; muted values are Claude Code's defaults
20 skills in this plugin
/check-rulesThis skill should be used when the user asks to "check adherence", "check rule adherence", "are my rules being followed", "is Claude following my instructions", "how effective is my CLAUDE.md", "rule compliance", "instruction effectiveness", "how are my rules performing", "which rules are being violated", "audit my rules", "check my CLAUDE.md", mentions "/check-rules", or wants to know whether their coding agent instruction rules are actually being followed across Claude Code sessions./discoverUse when the user wants to infer reusable project conventions from existing code and turn them into instruction rules: "discover conventions", "infer rules from code", "what rules should I add", "generate rules from this codebase", or "/discover". This is for convention mining, not for checking rule adherence or explaining how a specific module works./npx claudepluginhub mbwsims/claude-universe --plugin universeOther plugins' skills for the same job