# Graph Tools

> Graph Tools

- Skill: `trac3r00/graph-tools` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add trac3r00/graph-tools`
- Raw SKILL.md: https://api.skillmd.com/api/skills/trac3r00/graph-tools/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: trac3r00 (https://skillmd.com/u/trac3r00)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/trac3r00/graph-tools

---


# Graph Tools

Every dependency chain is an edge list until someone makes it queryable.

## Commands

```bash
python3 scripts/graph_tools.py deps.json --stats
python3 scripts/graph_tools.py deps.json --path ui database
python3 scripts/graph_tools.py deps.json --fail-on-cycle   # CI: assert DAG
```

## Input

```json
{"edges": [["ui", "api"], ["api", "db"], ["db", "cache"]]}
```

## Reports

- Node/edge counts, in/out degree per node (`--stats`)
- Cycles as readable paths (`a -> b -> c -> a`), exit 1 when found
- Shortest path via BFS (`--path FROM TO`), exit 1 when none
- `--fail-on-cycle` for CI gates on pipelines, imports, migrations

## Pairs with

`gate-graph` (module overlap via AST fingerprints — the code-level view;
this is the structure-level view), `json-diff` (compare two graph snapshots).

