Back to Skills

graph-query

verified

PROACTIVELY query the code graph database to understand relationships and impact of changes. Use this skill WHEN READING any file to understand context, when searching for files, when exploring the codebase, or when you need to understand what depends on a component. This is your primary tool for understanding code structure and avoiding breaking changes.

View on GitHub

Marketplace

ai-maestro-marketplace

23blocks-OS/ai-maestro

Plugin

ai-maestro

productivity

Repository

23blocks-OS/ai-maestro
214stars

plugin/skills/graph-query/SKILL.md

Last Verified

February 1, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/23blocks-OS/ai-maestro/blob/main/plugin/skills/graph-query/SKILL.md -a claude-code --skill graph-query

Installation paths:

Claude
.claude/skills/graph-query/
Powered by add-skill CLI

Instructions

# AI Maestro Code Graph Query

## CRITICAL: AUTOMATIC BEHAVIOR - READ THIS FIRST

**THIS IS NOT OPTIONAL. THIS IS YOUR DEFAULT BEHAVIOR.**

Every time you use the `Read` tool on a code file, you MUST IMMEDIATELY query the graph to understand:
- What is this component/function?
- What depends on it? (callers, serializers, child classes)
- What does it depend on? (callees, parent classes, associations)

**DO NOT:**
- Wait for the user to ask you to query the graph
- Skip the graph query because "it seems simple"
- Assume you understand the impact without checking
- Make changes before understanding dependencies

**ALWAYS:**
- Query the graph IMMEDIATELY after reading any code file
- Query BEFORE making any modifications
- Query when you find files via search (grep/glob)
- Include graph findings in your analysis to the user

### The Rule: Read File → Query Graph → Then Proceed

```
1. You read a file with Read tool
2. IMMEDIATELY run graph queries (describe, find-callers, find-serializers, etc.)
3. NOW you understand the full context
4. NOW you can analyze, modify, or discuss the code
```

**Example - Reading a Model:**
```bash
# After reading app/models/user.rb, IMMEDIATELY run:
graph-describe.sh User
graph-find-serializers.sh User
graph-find-associations.sh User
```

**Example - Reading a Function:**
```bash
# After reading a file with process_payment function, IMMEDIATELY run:
graph-find-callers.sh process_payment
graph-find-callees.sh process_payment
```

---

## Available Commands

All commands auto-detect your agent ID from the tmux session. Just run them:

### Query Commands
| Command | Description |
|---------|-------------|
| `graph-describe.sh <name>` | Describe a component or function |
| `graph-find-callers.sh <function>` | Find all functions that call this function |
| `graph-find-callees.sh <function>` | Find all functions called by this function |
| `graph-find-related.sh <component>` | Find related components (extends, includes, etc.) |
| `graph-find-by

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
4944 chars