SuperAPI AI 工具集

explore-codebase

编程与开发

查看项目

更新于 10-16 03:17

技能介绍

用途:explore-codebase 用于快速、只读地探索代码库,帮助识别项目结构、文件模式与代码组织方式。适合初次接触代码库时的发现与梳理、按模式查找文件、理解项目架构、在不修改文件的前提下做代码搜索,以及回答“某内容位于何处”之类的问题。

主要能力:Explore 智能体为只读,不能修改文件,适合安全探索;针对快速搜索与文件发现做了优化;擅长 glob 搜索与关键词查找等模式匹配;能高效梳理代码库结构。

使用方式:在 Opencode 内可直接调用 @explore 子智能体,例如:@explore Find all API endpoints in this codebase;@explore Map out the database models and their relationships;@explore What authentication patterns are used here? 也可在终端使用 --agent explore 标志,例如:opencode run --agent explore "Map out the project structure";opencode run --agent explore "Find all test files";opencode run --agent explore "What are the main components in src/?"。

常见模式:梳理整体架构(@explore Give me an overview of this project's architecture)、查找特定文件(@explore Find all files related to authentication)、理解模式(@explore What testing framework is used and where are tests located?)、快速搜索(@explore Search for where 'User' type is defined)。

最佳实践:先宽后窄,先询问整体结构;使用具体术语,明确文件名、函数或模式;链式探索,用结果追问;与其他智能体结合,探索后切换到 Build 智能体进行修改。

限制:资料未提供收费、价格、平台支持范围等具体信息;该技能为只读探索,不能用于修改文件。