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

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.

agentmods
npx agentmods add skills/davila7/claude-code-templates/graph-query
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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00062 $0.00645
Opus 5 $0.00031 $0.00322
Sonnet 5 $0.00012 $0.00129
Haiku 4.5 $0.00006 $0.00064

Measured 4d ago against content hash 6af133cff971, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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. 4d 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 (30,508 stars, last pushed today), licensed MIT. It adds 62 tokens to every session and 645 once invoked, about $0.0003 per session on Opus 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

authentication-patterns

Authentication patterns: session vs JWT vs OAuth comparison, provider selection (NextAuth, Clerk, Supabase Auth), security checklist, and common mistakes. Use when implementing auth, reviewing auth flows, or choosing auth providers.

zebbern/claude-code-guide · 47 tokens

code-vuln-audit

Scan code for security issues: dependency vulnerabilities (npm/pip audit), secret leaks (regex and entropy analysis), and OWASP anti-patterns like SQL injection, XSS, or command injection. Use when the user mentions security scans, vulnerability detection, secret leaks, API keys, OWASP, npm audit, pip-audit, hardcoded…

zebbern/claude-code-guide · 82 tokens

database-scout

Explore SQLite and PostgreSQL databases: list tables, inspect schemas (columns/types/constraints), preview data, generate Mermaid ER diagrams, and run safe read-only queries. Triggered by requests to explore a database, view table structures, describe tables, generate diagrams, or query data, and by keywords like…

zebbern/claude-code-guide · 76 tokens

database-optimizer

Use when investigating slow queries, analyzing execution plans, or optimizing database performance. Invoke for index design, query rewrites, configuration tuning, partitioning strategies, lock contention resolution.

zebbern/claude-code-guide · 39 tokens

diagnose

Диагностика ступени мастерства (Диагност R28, FORM.089 §6.1 v5.0) прямо в VS Code / claude.ai. До 6 вопросов, 3 мин. Сохраняет cp-профиль в канонический журнал learning.cpassessments — через MCP-инструмент (browser) или напрямую в Neon (VS Code). Запускай когда: пилот говорит «пройди диагностику», «какая моя ступень»…

TserenTserenov/FMT-exocortex-template · 130 tokens

lesson-close

Закрыть текущее занятие. Финализирует lesson/YYYY-MM-DD.md (frontmatter status, метаданные времени, длительность), делает commit + push в репо DS-personal-guide. Триггерит замкнутый контур доставки — после push → GitHub webhook → bot oauthserver.py:/webhook/github/workbook → synconeusertodt → ЦД обновляется в Neon.…

TserenTserenov/FMT-exocortex-template · 129 tokens