graph-query — Claude Code skill for code relationships
This skill queries a project’s code graph to trace component links and assess the reach of a change. Use it before editing a function or model.
npx claude-code-templates@latest --skill ai-maestro/graph-queryWhat graph-query does
After reading a file, the skill prompts the agent to consult the code graph before continuing. Its commands locate callers and callees, connected components, model serializers and associations. Use graph-find-path.sh <from> <to> to trace calls between functions, or graph-index-delta.sh [path] to refresh the graph.
A local AI Maestro instance must be running, and the codebase must be indexed. Install the graph tools by cloning https://github.com/23blocks-OS/ai-maestro-plugins.git, then running cd ai-maestro-plugins && ./install-graph-tools.sh. Without the running service and an index, graph queries cannot show the project’s dependencies.
What it helps with
- trace which functions call a target function
- inspect functions called by a given function
- locate serializers for a model
- trace calls between two functions
- refresh the code graph after code changes
Example prompts for the agent
- Before changing
process_payment, find every function that calls it. - Show the serializers and associations for the
Usermodel. - Trace the call path from
handleRequesttosendResponse.
How to install graph-query
1claude-code-templates
npx claude-code-templates@latest --skill ai-maestro/graph-query2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill graph-query -a claude-code3Manually: put the files in place
~/.claude/skills/graph-query/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/graph-query/
Manually: put the files in place
.agents/skills/graph-query/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/graph-query/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates graph-query2Manually: put the files in place
.github/skills/graph-query/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/ai-maestro/graph-queryManually: put the files in place
.devin/skills/graph-query/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about graph-query
How do I install graph-query in Claude Code?
Run npx claude-code-templates@latest --skill ai-maestro/graph-query.
What does graph-query do?
It queries a codebase graph to find callers, callees, related components, model serializers, associations and call paths.
What does graph-query need to work?
AI Maestro must be running locally, with the codebase indexed. Install the graph tools by running ./install-graph-tools.sh from the plugin repository.