graph-query Skill
查询代码图谱数据库,了解组件关系、依赖和变更影响。当用户要求“查找调用者”、“检查依赖”、“谁在用这个”、“显示关系”、“查找序列化器”,或在阅读代码、修改前需要了解组件的依赖情况时使用。
安装方式:把技能目录放入 ~/.claude/skills/(Claude Code)或在 claude.ai 设置中启用;也可复制右侧安装命令一键添加。
技能指令原文(SKILL.md)
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 | Describe a component or function |
| graph-find-callers.sh | Find all callers of a function |
| graph-find-callees.sh | Find all functions called by this function |
| graph-find-related.sh | Find related components |
| graph-find-by-type.sh | Find all components of a type |
| graph-find-serializers.sh | Find serializers for a model |
| graph-find-associations.sh | Find model associations |
| graph-find-path.sh | 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
Full AI Maestro Experience
This skill is part of the AI Maestro platform, which provides 6 skills for AI agent orchestration: messaging, memory, docs, graph, planning, and agent management.