Skip to content
Back to skills

Dependency Graph

ASecurity

Use when a JavaScript or TypeScript project's dependencies must be seen as they are in the code: the whole graph, what one module depends on, who depends on it, or its neighbourhood, at file or folder level. Produces a Mermaid graph document in aiview, parsed by a deterministic script, never inferred. Not for designing a module's interface (deepen-module).

  • 14 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 25, 2026
ai-agentsjavascripttypescriptjavanode

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 25, 2026

npx -y skills add Ovich/swarmstorm --skill dependency-graph --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dependency Graph?

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

Security grade badge for Dependency Graph
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ovich-dependency-graph/badge)](https://www.skillsdirectory.com/skills/ovich-dependency-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: dependency-graph
description: "Use when a JavaScript or TypeScript project's dependencies must be seen as they are in the code: the whole graph, what one module depends on, who depends on it, or its neighbourhood, at file or folder level. Produces a Mermaid graph document in aiview, parsed by a deterministic script, never inferred. Not for designing a module's interface (deepen-module)."
---

# Dependency graph

**The graph is parsed, never written by hand or guessed.** `scripts/graph.mjs` runs dependency-cruiser over the code, with the project's own TypeScript, and turns the ask into options. The same options give the same graph on the same commit.

## Run it

Translate the ask into options, then run it once:

```sh
node <skill-dir>/scripts/graph.mjs --root <the package's folder> [--from <path>] [--to <path>] [--focus <path> --depth <n>] [--steps <n>] [--level <n>] [--only <regex>] [--exclude <regex>] --title "<title>" --out <path>
```

- **What a module depends on**: `--from` that module or folder.
- **Who depends on it**: `--to` it.
- **Its neighbourhood**: `--focus` it, `--depth` the hops.
- **Not too far**: `--steps <n>` follows imports only n steps from `--from`.
- **Folders, not files**: `--level 2` folds `src/<area>/…` into one node per area; the coarser view first, then open the part that matters.
- **Noise out**: `--exclude "tests|generated"`; node_modules and Node's own modules are always out.

The root is the folder holding the package's `tsconfig.json` (its `extends` resolves from there); in a monorepo, one package per graph. The first run installs dependency-cruiser and the project's TypeScript into a cache, needing the network once.

## The document

**Through the `aiview` skill**: kind `report` from `YYYY-MM-DD-<subject>.dependency-graph.report.md`, tags `dependency-graph` and the module, group the piece of work it serves. The script writes it at the path `aiview path` gives, with the commit, the counts and the command that makes it again. Open it and tell the person the URL. A graph over about a hundred nodes is folded with `--level` or narrowed before it is shown.

**What the graph shows is said under it, in a few lines**: the cycles, a dependency against the project's stated boundaries (its conventions file), a module far more depended on than the rest. Nothing beyond what the edges show.

Files in this skill

  • SKILL.md2.3 KB
  • scripts/graph.mjs5.4 KB

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.