Skip to content
Back to skills

Graph

ASecurity

Fast read of a repo's import graph and hidden seams. Shows static dependents, covering tests, existing owners, plus non-imported peers linked by git co-change, contract tags, or shared env and data-file names. Use before editing a shared file or adding a helper, client or store.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 1, 2026
ai-agentsgosqlnodegit

Works with

  • cli

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add sgathrid/agent-smith --skill graph --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Graph?

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

Security grade badge for Graph
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sgathrid-graph/badge)](https://www.skillsdirectory.com/skills/sgathrid-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: graph
description: Fast read of a repo's import graph and hidden seams. Shows static dependents, covering tests, existing owners, plus non-imported peers linked by git co-change, contract tags, or shared env and data-file names. Use before editing a shared file or adding a helper, client or store.
---

# Graph

A fast read of static imports and three non-import seam signals, for the moments a text search answers slowly or only in part. It needs `node`, and `git` for `--diff` and co-change history.

```sh
G="${CLAUDE_PLUGIN_ROOT}/scripts/graph.mjs"
node "$G" --impact <file> [file2...]   # before editing: dependents, tests, contracts, co-changed & boundary peers
node "$G" --owners <word>              # before adding a helper: files and exports that already own the concept
node "$G" --diff [base]                # before shipping: cycles, boundary crossings, hubs, untouched peers
node "$G" --cycles                     # every runtime import cycle
node "$G" --help                       # also supports --all, --json, --cwd <dir>, --fan-in <n>
```

## Reading the output

- `tests (N)` lists nearest static-import tests first; `boundary tests (N)` adds integration or e2e tests linked by a shared env var or data filename.
- `contracts (N)` lists peers declared via `LINT.IfChange`/`LINT.ThenChange` (one-way, can target docs or configs) or `@seam <id>` comments (symmetric across source and test files).
- `co-changed (no import)` lists non-imported files that historically changed with the target (`shared/target`, `shared/peer`). Check them for shared formats, commands or mirrored adapters.
- `shared boundaries (no import)` lists non-dependent peers in other modules or languages sharing an env var or data filename (`*.json`, `*.jsonl`, `*.lock`, `*.sock`, `*.db`, `*.sqlite`). `skipped common boundaries` names shared tokens dropped as too common to list; grep those directly if you edit them.
- Re-run `--impact` on any relevant `co-changed` or `shared boundaries` peer to see its own dependents and tests.
- In `--diff`, `high fan-in hubs touched` flags widely imported files, and `untouched contracts`, `untouched co-changed peers` (`>= 40%` of the changed file's commits) and `untouched boundary peers` flag likely forgotten twins.
- A `note:` line counts unresolved imports; treat those files as unseen. `clean` means no graph or seam finding, not that the change is safe.
- `--owners` searches file paths and exported symbols only (not env vars or literals) and splits camel, snake and kebab names; one distinctive word works best.

## One instrument

It sees static imports, git co-change, declared contract tags, and shared env or data-file names. It does not see arbitrary wire strings, runtime hook or event ordering, semantic drift under matching formats, or whether the design is right. Read the peers it surfaces and grep for any command or wire literal you spot in the code.

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.