Skip to content
Development
Skill

/exploration

Code exploration strategies for understanding unfamiliar codebases. Use when exploring unknown code, debugging, or analyzing architecture.

From plugin
cc-best
5019 skills8 agents44 commands20 hooks

Claude Code

$ npx -y skills add xiaobei930/cc-best --skill exploration --agent claude-code

SKILL.md

exploration.SKILL.md
name: exploration
description: "Code exploration strategies for understanding unfamiliar codebases. Use when exploring unknown code, debugging, or analyzing architecture."
allowed-tools: Read, Grep, Glob, Task

代码库探索

本技能提供代码库探索的通用方法论,包含两种策略模式。

子文件

  • [isolated-research.md](isolated-research.md) - 隔离研究(快速一次性探索)
  • [iterative-retrieval.md](iterative-retrieval.md) - 渐进式检索(多轮迭代探索)

策略选择

| 场景 | 推荐策略 | 原因 | | -------------------- | ------------------- | ------------------------ | | 快速了解某个模块 | isolated-research | 一次性探索,不污染上下文 | | 理解复杂的跨模块流程 | iterative-retrieval | 需要多轮精炼 | | 简单的文件/函数定位 | 直接 Grep/Glob | 无需完整探索流程 | | 新项目初始理解 | iterative-retrieval | 需要建立全局认知 | | 调试特定 Bug | isolated-research | 聚焦单一问题 | | 架构分析和文档化 | iterative-retrieval | 需要完整依赖图 |

---

通用探索方法

搜索工具选择

| 目标 | 工具 | 示例 | | ------------------ | ---- | ------------------------- | | 按文件名/路径查找 | Glob | `**/auth/**/*.ts` | | 按代码内容查找 | Grep | `"function authenticate"` | | 读取完整文件 | Read | 直接读取已知路径文件 | | 深度子任务(隔离) | Task | 派发子代理执行 |

搜索策略模式

## 入口点搜索

- 路由/API 端点
- 中间件
- main/index 文件
- 配置文件

## 定义搜索

- class/function 定义
- type/interface 定义
- 常量/枚举定义

## 使用搜索

- import/require 语句
- 函数调用点
- 类实例化

## 依赖搜索

- package.json
- import 图谱
- 模块边界

---

输出格式(通用)

所有探索结果应遵循统一格式:

## 探索报告

### 问题/目标

[描述探索的目标]

### 关键发现

| 文件                | 行号 | 功能说明       |
| ------------------- | ---- | -------------- |
| `src/auth/login.ts` | 42   | 登录验证入口   |
| `src/lib/jwt.ts`    | 15   | Token 生成逻辑 |

### 依赖关系

[可选:模块依赖图、调用链]

### 结论

[对问题的回答]

### 后续建议

[可选:建议的下一步动作]

---

子策略

1. isolated-research(隔离研究)

**特点**:

  • 在子代理中执行,不污染主上下文
  • 一次性任务,快速返回
  • 适合聚焦的单一问题

详细指南参阅 `isolated-research.md`

2. iterative-retrieval(迭代检索)

**特点**:

  • 多轮迭代,逐步精炼
  • 置信度评估驱动
  • 适合复杂跨模块问题

详细指南参阅 `iterative-retrieval.md`

---

与角色系统配合

| 角色 | 探索场景 | 推荐策略 | | --------------- | ------------------ | ------------------- | | `/cc-best:pm` | 理解现有功能 | isolated-research | | `/cc-best:lead` | 架构分析、技术设计 | iterative-retrieval | | `/cc-best:dev` | 实现前了解相关代码 | isolated-research | | `/cc-best:qa` | 理解测试范围 | isolated-research | | `/cc-best:fix` | 追踪 Bug 根因 | iterative-retrieval |

---

最佳实践

1. **先评估再选择** - 根据问题复杂度选择策略 2. **记录路径** - 始终包含文件路径和行号 3. **限制范围** - 明确探索边界,避免发散 4. **输出结构化** - 使用统一格式便于后续使用 5. **复用结果** - 探索结果可保存到 memory-bank

---

**核心理念**:探索是理解的基础,好的探索策略能显著提升开发效率。

> **记住**: 系统化的代码探索比随机阅读效率高十倍,好的探索策略是高效开发的基础。

Read more
@xiaobei930
Ships withcc-best

Role-Driven Development Workflow for Claude Code Transform Claude into a complete development team. From product requirements to code review — one plugin, full workflow. Quick Start • Features • Workflow • Commands • FAQ

5019 skills8 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
50
Star history of xiaobei930/cc-best on GitHub, a chart by star-history.com

Other skills on cc-best.

api

api

RESTful API design patterns and best practices. Use when creating endpoints, designing APIs, or implementing routes.

@xiaobei930@xiaobei930Install Skill
architecture

architecture

Architecture design skill: ADR records, system design checklists, scalability assessment, architecture patterns. Use for complex…

@xiaobei930@xiaobei930Install Skill
backend

backend

Backend development patterns for services, error handling, logging, caching. Use when building backend services, APIs, or…

@xiaobei930@xiaobei930Install Skill
compact

compact

Strategic compaction skill: suggests context compression at logical breakpoints. Use to suggest compaction at logical intervals…

@xiaobei930@xiaobei930Install Skill
database

database

Database design, query optimization, migrations, and indexing. Use when designing schemas, writing queries, or managing…

@xiaobei930@xiaobei930Install Skill
debug

debug

Systematic debugging methods, log analysis, and performance diagnostics. Use when debugging issues, analyzing errors, or…

@xiaobei930@xiaobei930Install Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about exploration.

Which coding agents can use exploration?
exploration installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.