探索代码库
- 作者仓库星标 17,985
- 作者仓库 code-review-graph
- 领域
- 通用
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @tirth8205 · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 命令执行
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
## Explore Codebase
Use the code-review-graph MCP tools to explore and understand the codebase.
### Steps
1. Run `list_graph_stats` to see overall codebase metrics.
2. Run `get_architecture_overview` for high-level community structure.
3. Use `list_communities` to find major modules, then `get_community` for details.
4. Use `semantic_search_nodes` to find specific functions or classes.
5. Use `query_graph` with patterns like `callers_of`, `callees_of`, `imports_of` to trace relationships.
6. Use `list_flows` and `get_flow` to understand execution paths.
### Tips
- Start broad (stats, architecture) then narrow down to specific areas.
- Use `children_of` on a file to see all its functions and classes.
- Use `find_large_functions` to identify complex code.
## Token Efficiency Rules
- ALWAYS start with `get_minimal_context(task="<your task>")` before any other graph tool.
- Use `detail_level="minimal"` on all calls. Only escalate to "standard" when minimal is insufficient.
- Target: complete any review/debug/refactor task in ≤5 tool calls and ≤800 total output tokens.
章节与文件索引
按说明文件中的顺序排列。
步骤
温馨提示
代币效率规则
文件/命令 -> list_graph_stats · get_architecture_overview · list_communities · get_community · semantic_search_nodes · query_graph · callers_of · callees_of
内容校验值 -> 64420a56b8c9
当前原文的自动摘译,尚未人工审校。
步骤
运行
list_graph_stats查看总体代码库指标。运行get_architecture_overview以获得高级社区结构。使用list_communities查找主要模块,然后使用get_community查看详细信息。使用semantic_search_nodes查找特定的函数或类。将query_graph与callers_of、callees_of、imports_of等模式一起使用来追踪关系。温馨提示
从广泛的(统计、架构)开始,然后缩小到特定领域。在文件上使用
children_of可以查看其所有函数和类。使用find_large_functions识别复杂的代码。代币效率规则
始终在任何其他图形工具之前从
get_minimal_context(task="<your task>")开始。所有通话均使用detail_level="minimal"。仅当最小值不够时才升级到“标准”。目标:在≤5次工具调用和≤800个总输出令牌中完成任何审查/调试/重构任务。