Skip to content
Back to skills

Graph

ASecurity

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.

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 2, 2026
ai-agentsjavascripttypescriptpythonrustgojavarubyphpswiftkotlin

Works with

  • cli

Security analysis

A100/100

Scanned December 2, 2026

npx -y skills add Pierry/harness --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/pierry-graph/badge)](https://www.skillsdirectory.com/skills/pierry-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: 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.

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.