Explore Codebase

tirth8205/code-review-graph/skills/explore-codebase

作者 tirth82056b12d11625cbec3b6773e076cb3d136464fa90e5無授權條款收錄於 2026年10月9日更新於 2026年10月9日

Navigate and understand codebase structure using the knowledge graph

AI 產生的概覽

指導代理使用 code-review-graph MCP 工具瀏覽程式碼庫結構與相依關係。

功能
此技能提供一套逐步流程,用於透過知識圖譜 MCP 工具集探索不熟悉的程式碼庫。它引導代理取得架構概觀、依名稱或關鍵字搜尋函式與類別、追蹤呼叫端、被呼叫端與匯入關係、追蹤執行流程,以及找出過大的函式。它也訂出權杖效率規則,例如先呼叫最小脈絡工具,並優先採用定向查詢而非廣泛列表。
適用情境
當代理在修改程式碼或回答程式碼庫相關問題之前需要理解其結構時使用。適合接手不熟悉的程式碼儲存庫,或定位相關模組、函式與執行路徑。
執行需求
需要存取文件中列出的 code-review-graph MCP 工具(例如 get_architecture_overview_tool、semantic_search_nodes_tool、query_graph_tool、list_flows_tool)。不隨附指令碼,僅為說明性指示。

Explore Codebase

Use the code-review-graph MCP tools to find your way around the codebase.

Steps

  1. Call get_architecture_overview_tool for the community structure. Call list_communities_tool, then get_community_tool, only for the modules you need.
  2. Call semantic_search_nodes_tool to find a function or class by name or keyword.
  3. Call query_graph_tool with callers_of, callees_of or imports_of to trace relationships. children_of on a file lists its functions and classes.
  4. Call list_flows_tool, then get_flow_tool for one flow, to follow an execution path.
  5. Call find_large_functions_tool to find oversized functions.
  6. Call list_graph_stats_tool only when you need node, edge and language counts.

Token Efficiency Rules

  • Call get_minimal_context_tool(task="<your task>") before any other graph tool.
  • Pass detail_level="minimal" wherever a tool accepts it. Use "standard" only when minimal is not enough.
  • Prefer a targeted query_graph_tool call over a broad listing call.
  • Budget: about five tool calls and 800 tokens of graph output per task.
  • Read the implementation and its tests before changing code. The graph narrows scope; it does not replace the source.

來源與署名

來源:tirth8205/code-review-graph位於skills/explore-codebase提交6b12d11

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架