Answer structural questions about a codebase from a Joern call graph - who calls a function, what a change affects and which tests cover it, and which functions look unused. Use when the user asks for the impact or blast radius of a change, callers or callees of a symbol, dead code, or before refactoring or deleting a function in a large or unfamiliar repo.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Graph?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/pierry-graph)
---
name: graph
description: Answer structural questions about a codebase from a Joern call graph - who calls a function, what a change affects and which tests cover it, and which functions look unused. Use when the user asks for the impact or blast radius of a change, callers or callees of a symbol, dead code, or before refactoring or deleting a function in a large or unfamiliar repo.
---
# Code graph
`scripts/graph.py` builds a call graph with Joern (https://joern.io) and stores it in
`.harness/graph.db` (SQLite). It supports what Joern supports: Java, Kotlin, Python,
JavaScript and TypeScript, Go, C and C++, C#, PHP, Ruby, Swift, Rust.
Run everything as `python3 "${CLAUDE_PLUGIN_ROOT}/scripts/graph.py" <command>`; add
`--json` when you will parse the output.
## When it is worth it
Use the graph when grep would give too many or too few answers: a common method name, a
change in a shared module, a refactor across many files, or a deletion. For one file or a
unique name, grep is faster; use it.
## Build
```
graph.py status # is there a graph, and how old
graph.py build [path] # 10 s on a small repo, minutes on a large one
```
If `status` says Joern is missing, tell the user: `brew install joern`, or
https://docs.joern.io/installation (needs Java 17+). Do not install it yourself.
Rebuild after large changes; the graph is a snapshot.
Pass `--frontend-args "--exclude-regex .*/(vendor|generated)/.*"` to skip directories.
## Ask
```
graph.py find charge # locate methods by name
graph.py callers charge -d 3 # who reaches it, up to 3 hops
graph.py callees checkout # what it calls
graph.py impact # uncommitted change
graph.py impact --diff origin/main # a whole branch
graph.py impact --files src/a.py # a file you are about to change
graph.py dead --keep "Controller|Handler"
```
`impact` returns the changed methods, their callers, the tests that call them, and
`tests_mentioning`: test files that name an affected method. Some Joern frontends (Java)
skip test sources, so this list fills that gap. Run those tests.
## Read the answer honestly
The graph sees static calls. It misses reflection, dependency injection, routes and
framework callbacks, functions passed as values, JSX components, dynamic imports, and
calls from other services. So:
- `impact` is a lower bound. Say "at least".
- `dead` lists candidates. Before deleting one, grep for its name, check framework
registration (routes, beans, exports, CLI entry points), and say what you checked.
- A caller marked `by name` was matched by method name only. Confirm it in the code.