graph-query

graph-query is a skill for Claude Code, Codex from davila7/claude-code-templates. It costs 62 tokens per session (645 once invoked), scanned A, original, MIT.

A tool that queries a map of code relationships, such as which functions call each other and which components depend on one another. The map must first be built from the codebase.

In plain words
What is it for?
Use it to find callers and callees, related components, serializers, model associations, and paths between code elements. It requires AI Maestro running locally with the codebase indexed.
Why use it?
It helps you understand what may be affected before changing a function, model, or component. This reduces the need to search through files manually for callers and dependencies.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to find callers and callees, related components, serializers, model associations, and paths between code elements. It requires AI Maestro running locally with the codebase indexed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/davila7/claude-code-templates/graph-query
About the project

Claude Code Templates is a command-line tool and catalogue for configuring Anthropic’s Claude Code with agents, commands, settings, hooks, integrations, skills, and project templates. Developers use it to browse and install reusable components for their coding workflows. The catalogue includes many of these Claude Code components.

davila7/claude-code-templates · 32,738 stars · on GitHub · aitmpl.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add davila7/claude-code-templates --skill graph-query
Clone the repo
git clone --depth 1 https://github.com/davila7/claude-code-templates

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for graph-query

README.md
[![agentmods](https://agentmods.dev/badge/skills/davila7/claude-code-templates/graph-query/github.svg)](https://agentmods.dev/skills/davila7/claude-code-templates/graph-query)
Your own site
<a href="https://agentmods.dev/skills/davila7/claude-code-templates/graph-query"><img src="https://agentmods.dev/badge/skills/davila7/claude-code-templates/graph-query/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for graph-query

Your own site · 80×15
<a href="https://agentmods.dev/skills/davila7/claude-code-templates/graph-query"><img src="https://agentmods.dev/badge/skills/davila7/claude-code-templates/graph-query.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 645 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 72
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00062 $0.00645
Opus 5.5 $0.00025 $0.00258
Sonnet 5.5 $0.00012 $0.00129
Haiku 4.5 $0.00006 $0.00064

Measured 1mo ago against content hash 6af133cff971, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

graph-query scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

cli-tool/components/skills/ai-maestro/graph-query/SKILL.md · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AI Maestro Code Graph Query

Query your codebase's dependency graph to understand component relationships, call chains, and the impact of changes before making modifications. Part of the AI Maestro suite.

Prerequisites

Requires AI Maestro running locally with codebase indexed.

# Install graph tools
git clone https://github.com/23blocks-OS/ai-maestro-plugins.git
cd ai-maestro-plugins && ./install-graph-tools.sh

Core Behavior

After reading any code file, query the graph to understand dependencies:

Read file -> Query graph -> Then proceed

Commands

Query

Command Description
graph-describe.sh <name> Describe a component or function
graph-find-callers.sh <fn> Find all callers of a function
graph-find-callees.sh <fn> Find all functions called by this function
graph-find-related.sh <component> Find related components
graph-find-by-type.sh <type> Find all components of a type
graph-find-serializers.sh <model> Find serializers for a model
graph-find-associations.sh <model> Find model associations
graph-find-path.sh <from> <to> Find call path between functions

Index

Command Description
graph-index-delta.sh [path] Index or update the code graph

Component Types

Use with graph-find-by-type.sh: model, serializer, controller, service, job, concern, component, hook

Usage Examples

# After reading a model file
graph-describe.sh User
graph-find-serializers.sh User
graph-find-associations.sh User

# Before modifying a function
graph-find-callers.sh process_payment
graph-find-callees.sh process_payment

# Find call chain between components
graph-find-path.sh handleRequest sendResponse

# Index your codebase
graph-index-delta.sh /path/to/project

Why Query Before Modifying

Without checking the graph, you risk:

  • Breaking callers when changing a function signature
  • Missing serializers that need updating with a model change
  • Overlooking child classes that inherit your modifications

Read the full file on GitHub · 80 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 80 lines · 62 tokens per session scan A 6af133cff971

Subscribe to this mod's changes

graph-query is a skill published in the GitHub repository davila7/claude-code-templates (32,738 stars, last pushed yesterday), licensed MIT. It adds 62 tokens to every session and 645 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

five-whys

Finds the root cause of a bug, failure or recurring problem by asking "why" until the answer is a cause you can fix. Use when the user asks why something keeps happening, or wants the root cause rather than a quick fix.

wesammustafa/Claude-Code-Everything-You-Need-to-Know · 53 tokens

fix

Cross-cutting: when something breaks. Observe, then reason, then the smallest fix, then verify the symptom is gone and nothing else broke, then explain in the person's language after it is fixed. Never show a raw error to a beginner; never blame them.

ilang-ai/autocode · 0 tokens

delphi-uses-graph

Analyzes a Delphi / Object Pascal codebase to extract unit-level uses dependencies. Use when the user uploads a zip / archive of a Delphi project (or a folder of .pas / .dpr / .dpk files) and asks for a dependency graph, architecture map, cycle detection, fan-in / fan-out coupling analysis, or wants to know how units…

MaxiDonkey/DelphiAnthropic · 124 tokens

ccc-systematic-debugging

Root-cause debugging under one law: no fix without a confirmed root cause. Reproduce, compare, hypothesize, then fix once with a failing test first. Use when investigating a bug, a failing or flaky test, or an error of unknown cause.

KevinZai/commander · 58 tokens

ast-grep

Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for…

Kayunangka/claude-skill · 80 tokens

debug-helper

Diagnose and fix bugs systematically — error analysis, stack trace interpretation, root cause identification, and fix suggestions.

inbharatai/claude-skills · 25 tokens