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 从公开仓库中收录这些内容。

举报或申请下架