con un clic
dependency-graph
Map and visualize module dependencies, detect circular imports, and identify coupling hotspots. Use when the user asks to analyze dependencies, find circular imports, or understand module relationships.
Menú
Map and visualize module dependencies, detect circular imports, and identify coupling hotspots. Use when the user asks to analyze dependencies, find circular imports, or understand module relationships.
Generate a mock API server from OpenAPI specs, TypeScript interfaces, or endpoint descriptions for frontend development and testing. Use when the user asks to create a mock server, fake API, or stub endpoints.
Generate typed error classes, error handling middleware, and HTTP error mapping following project conventions. Use when the user asks to set up error handling, create error classes, or implement error middleware.
Create, manage, and clean up feature flags for gradual rollouts and safe deployments. Use when the user asks to add a feature flag, toggle, or manage feature gating.
Generate docker-compose.yml files for local development with application services, databases, caches, and queues. Use when the user asks to set up a local dev environment or create docker-compose configuration.
Generate OpenSearch Dashboards (Kibana) saved objects — index patterns, visualizations, and dashboards as JSON. Use when the user asks to create dashboards, charts, or visualizations for OpenSearch/Elasticsearch/Kibana.
Design and create automation workflows — shell scripts, Cursor hooks, GitHub Actions, cron jobs, and task runners. Use when the user asks to automate a process, create a script, or set up a workflow.
| name | dependency-graph |
| description | Map and visualize module dependencies, detect circular imports, and identify coupling hotspots. Use when the user asks to analyze dependencies, find circular imports, or understand module relationships. |
Analyze module import relationships to detect circular dependencies, identify coupling hotspots, and visualize the dependency structure.
When the user asks to analyze dependencies, find circular imports, map module relationships, or reduce coupling.
module A → [module B, module C, ...]| Category | Examples |
|---|---|
| External | express, lodash, zod |
| Internal package | @myorg/shared, @myorg/utils |
| Relative | ./service, ../models/user |
| Type-only | import type { X } (TypeScript) |
CIRCULAR: A → B → C → A
CIRCULAR: X → Y → X
import/require) — must fiximport type) — usually safe| Metric | Formula | Healthy Threshold |
|---|---|---|
| Fan-out | Number of modules this module imports | < 10 |
| Fan-in | Number of modules that import this module | High = shared utility |
| Instability | Fan-out / (Fan-in + Fan-out) | 0 = stable, 1 = unstable |
| Depth | Longest import chain from entry point | < 8 |
graph TD
A[controllers] --> B[services]
B --> C[models]
B --> D[utils]
C --> D
A --> E[middleware]
E --> D
style A fill:#4CAF50
style C fill:#FF9800
Module Dependency Report
========================
Total modules: 45
External dependencies: 23
Circular dependencies: 2
Max depth: 6
Top Fan-In (most imported):
1. src/utils/logger.ts (imported by 28 modules)
2. src/types/common.ts (imported by 22 modules)
3. src/config/index.ts (imported by 18 modules)
Top Fan-Out (most imports):
1. src/handlers/order/create/handler.ts (imports 12 modules)
2. src/services/order.service.ts (imports 10 modules)
Circular Dependencies:
⚠ src/services/user.ts → src/services/order.ts → src/services/user.ts
⚠ src/models/product.ts → src/utils/pricing.ts → src/models/product.ts
common/ or types/node_modules, dist, coverage, and test files from analysisDependency report with metrics, circular dependency detection, hotspot analysis, and improvement suggestions.
import() calls as "dynamic — not fully trackable"