跳到正文
Skillpedia
通用编程33k · #9140

explore-codebase

它能做什么

这个技能指导智能体使用 code-review-graph 工具浏览代码库。适合刚加入项目,或需要了解各部分如何连接的开发者。

适用场景

  • ✓当你刚加入一个项目,需要了解其主要模块的概况时。
  • ✓当你想按名称或关键词查找某个函数或类时。
  • ✓当你需要查看哪些代码调用了某个函数,或者它依赖什么时。

技能链接

https://github.com/tirth8205/code-review-graph/blob/staging/skills/explore-codebase/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/tirth8205/code-review-graph/blob/staging/skills/explore-codebase/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“能概括一下这个项目是如何组织的,以及登录逻辑在哪里吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体请求图谱提供架构概览,搜索指定的代码,并沿着文件和函数之间的关系进行追踪。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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.
常见问题

它能展示什么?

它能展示架构社区、函数、调用者、被调用者、导入关系和执行流程。

能找到过大的函数吗?

能。技能包含一个查找过大函数的工具。

需要先构建图谱吗?

需要。图谱必须先构建,导航工具才能返回有用的结果。

详情

作者的原始描述

Navigate and understand codebase structure using the knowledge graph

repo: tirth8205/code-review-graph

热度

GitHub 星标
33k
排名
#9140
许可证
MIT
更新时间
2026/10/29

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能