src/autoskillit/skills_extended/arch-lens-module-dependency/SKILL.md
Create Module Dependency architecture diagram showing package coupling, layering, and fan-in/fan-out. Structural lens answering "How are modules coupled?"
npx skillsauth add talont-org/autoskillit arch-lens-module-dependencyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Cognitive Mode: Structural Primary Question: "How are modules coupled?" Focus: Package Dependencies, Layering, Coupling Patterns, Fan-In/Fan-Out
/autoskillit:arch-lens-module-dependency or /autoskillit:make-arch-diag dependencyNEVER:
run_in_background: true is prohibited)ALWAYS:
/autoskillit:mermaid skill using the Skill tool - this is MANDATORYtemp/arch-lens-module-dependency/...
save path to absolute by prepending the full CWD:
diagram_path = /absolute/cwd/temp/arch-lens-module-dependency/{filename}.md
This token is MANDATORY — the pipeline cannot proceed without it./autoskillit:arch-lens-module-dependency [context_path]
If a context_path positional argument is present:
context_pathIf no context_path is provided, skip this step and explore the full CWD in Step 1.
Spawn Explore subagents to investigate:
Layer Identification
Import Analysis by Layer
Circular Dependency Detection
High Fan-In Modules
Cross-Domain Imports
Create a matrix showing:
layer3 layer2 layer1
layer3 - X X
layer2 - - X
layer1 ? ? -
Where:
X = valid imports (downward)? = potential violations to investigate- = no importsCRITICAL - Analyze Read/Write Direction: For EVERY dependency relationship:
Note: Import direction (A imports B) doesn't always equal data flow direction (B may return data to A). Document both.
For key modules:
Use graph with:
Direction: TB for layer hierarchy
Subgraphs for Layers:
Node Styling:
cli class: Application layer modulesphase class: Service/business logic layer moduleshandler class: Infrastructure/utility modulesstateNode class: High fan-in modules (highlight)integration class: External dependenciesConnection Types:
Write the diagram to: {{AUTOSKILLIT_TEMP}}/arch-lens-module-dependency/arch_diag_module_dependency_{YYYY-MM-DD_HHMMSS}.md (relative to the current working directory)
After writing the diagram file, emit a structured output line:
IMPORTANT: Emit the structured output tokens as literal plain text with no markdown formatting on the token names. Do not wrap token names in
**bold**,*italic*, or any other markdown. The adjudicator performs a regex match on the exact token name — decorators cause match failure.
diagram_path = {absolute_path_to_diagram_file}
# Module Dependency Diagram: {Project Name}
**Lens:** Module Dependency (Structural)
**Question:** How are modules coupled?
**Date:** {YYYY-MM-DD}
**Scope:** {What was analyzed}
## Layer Structure
| Layer | Modules | May Import From |
|-------|---------|-----------------|
| N - Application | app/ | services/, utils/ |
| N-1 - Services | services/ | utils/ |
| N-2 - Utilities | utils/ | (internal only) |
| 0 - External | stdlib, packages | N/A |
## Dependency Diagram
```mermaid
%%{init: {'flowchart': {'nodeSpacing': 50, 'rankSpacing': 70, 'curve': 'basis'}}}%%
graph TB
%% CLASS DEFINITIONS %%
classDef cli fill:#1a237e,stroke:#7986cb,stroke-width:2px,color:#fff;
classDef phase fill:#6a1b9a,stroke:#ba68c8,stroke-width:2px,color:#fff;
classDef handler fill:#e65100,stroke:#ffb74d,stroke-width:2px,color:#fff;
classDef stateNode fill:#004d40,stroke:#4db6ac,stroke-width:2px,color:#fff;
classDef integration fill:#c62828,stroke:#ef9a9a,stroke-width:2px,color:#fff;
subgraph LayerN ["LAYER N - APPLICATION"]
direction LR
APP1["app/<br/>━━━━━━━━━━<br/>Entry points"]
end
subgraph LayerN1 ["LAYER N-1 - SERVICES"]
direction LR
SVC1["services/<br/>━━━━━━━━━━<br/>Business logic"]
end
subgraph LayerN2 ["LAYER N-2 - UTILITIES"]
direction LR
UTIL1["utils/core/<br/>━━━━━━━━━━<br/>Core utilities"]
UTIL2["utils/helpers/<br/>━━━━━━━━━━<br/>Helper functions"]
end
subgraph Layer0 ["LAYER 0 - EXTERNAL"]
direction LR
EXT1["External Libs<br/>━━━━━━━━━━<br/>Third-party"]
end
%% VALID DEPENDENCIES (Downward) %%
APP1 -->|"imports"| SVC1
APP1 -->|"imports"| UTIL1
SVC1 -->|"imports"| UTIL1
SVC1 -->|"imports"| UTIL2
UTIL1 --> EXT1
UTIL2 --> EXT1
%% VIOLATIONS (if any) - dashed %%
UTIL1 -.->|"VIOLATION"| SVC1
%% HIGH FAN-IN MODULES %%
HI_FAN["High Fan-In Module<br/>━━━━━━━━━━<br/>{N} dependents"]
%% CLASS ASSIGNMENTS %%
class APP1 cli;
class SVC1 phase;
class UTIL1,UTIL2 handler;
class HI_FAN stateNode;
class EXT1 integration;
Color Legend: | Color | Category | Description | |-------|----------|-------------| | Dark Blue | Apps | Application layer entry points | | Purple | Services | Service/business logic layer | | Orange | Utilities | Shared utilities and infrastructure | | Teal | High Fan-In | Core modules with many dependents | | Red | External | External dependencies | | Dashed Lines | Violation | Architectural violations |
app services utils
app - X X
services - - X
utils - ?* -
Legend: X = valid imports, ?* = violation (investigate)
| Metric | Value | Assessment | |--------|-------|------------| | Circular Dependencies | {count} | {risk level} | | High Fan-In Modules | {count} | {list them} | | Layer Violations | {count} | {severity} |
| Source | Target | Type | Severity | |--------|--------|------|----------| | {module} | {module} | {violation type} | {HIGH/MEDIUM/LOW} |
---
## Pre-Diagram Checklist
Before creating the diagram, verify:
- [ ] LOADED `/autoskillit:mermaid` skill using the Skill tool
- [ ] Using ONLY classDef styles from the mermaid skill (no invented colors)
- [ ] Diagram will include a color legend table
---
## Related Skills
- `/autoskillit:make-arch-diag` - Parent skill for lens selection
- `/autoskillit:mermaid` - MUST BE LOADED before creating diagram
- `/autoskillit:arch-lens-c4-container` - For container-level view
development
Generate YAML recipes for .autoskillit/recipes/. Use when user says "make script skill", "generate script", "script a workflow", "write a script", "create a script", "new recipe", "write a pipeline", or when loaded by other skills for script formatting.
data-ai
Create Uncertainty Representation visualization planning spec showing error bar definitions, distribution-aware alternatives, and multi-seed variance protocols. Statistical lens answering "How is uncertainty honestly represented?"
data-ai
Create Temporal Dynamics visualization planning spec showing axis scaling (linear vs log), smoothing disclosure, epoch/step alignment, run aggregation (mean + variance bands), early-stopping markers, and wall-clock vs step-count x-axis. Temporal lens answering "Are training dynamics shown clearly and honestly?"
data-ai
Create Narrative Story Arc visualization planning spec showing visual consistency across the report (same color = same model everywhere), logical figure progression, redundant figure detection, and narrative dependency between figures. Narrative lens answering "Do the figures tell a coherent story across the report?"