Chuyển đến nội dung
Skillpedia
Lập trình chung33k · #8522

graph-query

Skill này làm gì

Skill này tra cứu cách các phần của codebase phụ thuộc vào nhau, như hàm nào gọi một hàm nhất định. Skill dành cho lập trình viên cần biết một thay đổi có thể ảnh hưởng gì trước khi thực hiện.

Khi nào nên dùng

  • ✓Khi lập trình viên muốn biết ai gọi một hàm trước khi thay đổi nó.
  • ✓Khi một thay đổi có thể ảnh hưởng đến các thành phần khác và phụ thuộc của chúng cần được kiểm tra.
  • ✓Khi ai đó muốn tìm đường gọi giữa hai hàm.

Liên kết skill

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/ai-maestro/graph-query/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/ai-maestro/graph-query/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tìm mọi hàm gọi hàm saveOrder trước khi tôi thay đổi nó.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill chạy các truy vấn đồ thị để tìm nơi gọi, nơi được gọi, thành phần liên quan hoặc đường gọi. Cần AI Maestro chạy cục bộ và codebase đã được lập chỉ mục.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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

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.

Câu hỏi thường gặp

Nó có thể tìm được gì?

Nó có thể tìm nơi gọi, nơi được gọi, thành phần liên quan, bộ tuần tự hóa (serializer), liên kết mô hình và đường gọi.

Có cần lập chỉ mục trước không?

Có. Codebase phải được lập chỉ mục trước khi có thể truy vấn đồ thị.

Nó có thay đổi code không?

Không. Nó chỉ tra cứu quan hệ để giúp bạn quyết định nên thay đổi gì.

Chi tiết

Mô tả gốc của tác giả

Query the code graph database to understand component relationships, dependencies, and change impact. Use when the user asks to "find callers", "check dependencies", "what uses this", "show relationships", "find serializers", or when reading code and needing to understand what depends on a component before modifications.

repo: davila7/claude-code-templates

Độ phổ biến

Sao GitHub
33k
Vị trí xếp hạng
#8522
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự