Skip to content
Back to skills

Dep Graph

ASecurity

Maps module dependencies and finds circular imports and coupling issues

  • 10 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 1, 2026
ai-agentsbash

Security analysis

A100/100

Scanned June 1, 2026

npx -y skills add berkcangumusisik/claude-code-practices --skill dep-graph --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dep Graph?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dep Graph
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/berkcangumusisik-dep-graph/badge)](https://www.skillsdirectory.com/skills/berkcangumusisik-dep-graph)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dep-graph
description: Maps module dependencies and finds circular imports and coupling issues
argument-hint: [entry-file]
user-invocable: true
allowed-tools: Bash Grep Read Glob
effort: medium
---

## Dependency Graph Analysis

Entry: **$1** (or `src/index.ts` if not specified)

1. Try dependency analysis tools:
```bash
npx madge --circular src/ 2>/dev/null | head -30
npx depcruise --include-only "^src" --output-type text src/ 2>/dev/null | head -50
```

2. Manual circular dependency search:
```bash
# Files that import each other
grep -rn "^import.*from" src/ --include="*.ts" | awk '{print $NF}' | sort | uniq -c | sort -rn | head -20
```

3. Identify:
   - **Circular imports**: A → B → C → A (breaks tree-shaking, causes runtime issues)
   - **High fan-in**: modules imported by many others (change = high risk)
   - **High fan-out**: modules that import many things (likely doing too much)
   - **Layer violations**: UI importing from DB layer directly

4. For each circular import: propose how to break the cycle (extract shared types, invert dependency, use dependency injection).

5. Draw a simplified text dependency graph for the top-level modules.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…