Project graph context
Skill DmitrySelenya/safe-project-graph/skills/project-graph-context
Use when reviewing code, assessing a local diff or blast radius, finding related files or tests, exploring symbols, or preparing non-trivial edits and refactors with project graph context.From its SKILL.md
npx -y skills add DmitrySelenya/safe-project-graph --skill project-graph-contextAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 19 days oldThe repository was created 19 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.8 KB, 587 tokens by cl100k_base, as published. Nobody here has run it
Project Graph Context
Use the bundled wrapper for advisory structural evidence. Always verify graph results by reading the real source files and tests.
Resolve the wrapper
Locate this SKILL.md through the skill path exposed by the agent client. Change to the directory containing it, then invoke the bundled script by its relative path:
cd "<skill-root>"
python3 scripts/project_graph.py --help
Replace <skill-root> with the actual directory containing this file. Never hardcode a home directory or assume the repository contains the skill.
Loading this file is the activation. Do not activate another same-named skill or switch skill roots; duplicate installations may contain different wrappers.
Workflow
- Record
git -C <repo> status --porcelainso the starting worktree state can be compared later. - Run
python3 scripts/project_graph.py doctor --repo <repo>. - Run
python3 scripts/project_graph.py setuponly whendoctorreports that the managed runtime is missing. - Run
build --repo <repo>when the graph database is missing. Otherwise runupdate --repo <repo> --base HEAD. - Query only what the task needs:
python3 scripts/project_graph.py impact --repo <repo> --base HEAD
python3 scripts/project_graph.py find <symbol-or-path> --repo <repo>
python3 scripts/project_graph.py related <symbol-or-path> --repo <repo>
find and related accept --limit (default 20, capped at 100). Raise it only when a broad query returns a truncated list.
- Read the actual files and tests surfaced by the graph before editing or reporting conclusions.
- Re-run
git -C <repo> status --porcelainand confirm it matches the starting state.
Every command fails with a single ERROR: line and a non-zero exit code. Report that line as-is; do not retry blindly. If it says the graph database is missing, has no table, or lacks columns, run build --repo <repo> once and retry.
Safety boundaries
- Use only this wrapper. Do not run upstream
install, hooks,serve,watch, daemon, refactor/apply, embeddings, or wiki commands. - Keep indexes in the wrapper-managed external cache. Never create
.code-review-graph*inside the repository. - If
doctorreports repository-local graph artifacts, stop and report their exact paths. Do not remove them automatically. - Do not edit agent instructions, permissions, hooks, MCP configuration, or repository settings as part of graph setup.
- Treat risk, test-gap, flow, and relationship output as advisory evidence, not proof.
Use tentative language: “The graph suggests…”, followed by the source and test evidence used to verify it.
What ships with it: 2 files
24.4 KB alongside SKILL.md, 1 of them executable
agents/
- openai.yaml257 B
scripts/
- project_graph.pyruns24.1 KB