with one click
proactive-explorer
// 落实 CLAUDE.md / AGENTS.md 中的“主动探索”原则,在向用户提问前自动使用 Grep、Read、Bash、WebSearch 等工具获取信息
// 落实 CLAUDE.md / AGENTS.md 中的“主动探索”原则,在向用户提问前自动使用 Grep、Read、Bash、WebSearch 等工具获取信息
| name | proactive-explorer |
| description | 落实 CLAUDE.md / AGENTS.md 中的“主动探索”原则,在向用户提问前自动使用 Grep、Read、Bash、WebSearch 等工具获取信息 |
此 Skill 落实 CLAUDE.md / AGENTS.md 中“主动探索”原则的核心理念:
宁可多做 10 步探索,不让用户回答 1 个本可自己找到答案的问题。
收到任何任务请求时
# 搜索函数定义
# pattern: "function getCwd"
# output_mode: "files_with_matches"
# 搜索配置项
# pattern: "TELEGRAM_BOT_TOKEN"
# glob: "**/*.js"
使用场景:
# 查找所有 JavaScript 文件
# pattern: "**/*.js"
# 查找配置文件
# pattern: "**/config*.{js,json}"
# 查找测试文件
# pattern: "**/*.test.js"
使用场景:
# 读取完整文件
# file_path: "/path/to/file.js"
# 读取部分文件
# file_path: "/path/to/file.js"
# offset: 100
# limit: 50
使用场景:
# 检查 Git 状态
git status
# 列出目录内容
ls -la /path/to/dir
# 检查进程
ps aux | grep node
# 检查端口占用
lsof -i :3000
# 查看环境变量
echo $TELEGRAM_BOT_TOKEN
使用场景:
CLAUDE.md 文件本身就是 Memory,包含项目规范和历史决策。直接读取:
# 查看全局 CLAUDE.md
Read file_path="~/.claude/CLAUDE.md"
# 查看项目 CLAUDE.md
Read file_path="<project>/CLAUDE.md"
使用场景:
// 多步骤分析
// 复杂问题分解
// 探索多种可能性
使用场景:
// 搜索技术文档
// 搜索最佳实践
// 搜索错误解决方案
使用场景:
// 启动专业 agent
// 委派独立任务
// 并行执行
使用场景:
探索步骤:
# 1. 先查 CLAUDE.md(项目知识)
Read file_path="CLAUDE.md"
# 2. 搜索配置文件
Glob pattern="**/config*.{js,json}"
Grep pattern="database|mongodb|postgres|mysql"
# 3. 搜索依赖
Read file_path="package.json"
# 查看 dependencies
# 4. 搜索连接代码
Grep pattern="connect.*database|createConnection"
结果:在探索过程中找到答案,无需询问用户
探索步骤:
# 1. 查询 CLAUDE.md 中的历史决策
Read file_path="CLAUDE.md"
Grep pattern="auth|login|jwt"
# 2. 检查现有代码
Glob pattern="**/auth*.js"
Read file_path="src/auth/..."
# 3. 查询依赖
Read file_path="package.json"
# 检查是否已有 passport, jwt 等
# 4. 搜索最佳实践
WebSearch query="Node.js JWT authentication 2025"
# 5. 分析架构
Read file_path="src/index.js"
# 了解项目结构
# 6. 询问用户(只在必要时)
# - 使用哪种认证方式?(JWT / OAuth / Session)
# - 是否需要第三方登录?
结果:通过探索获得大部分信息,只询问关键决策
探索步骤:
# 1. 检查日志
Bash command="tail -100 logs/error.log"
# 2. 检查进程
Bash command="ps aux | grep node"
# 3. 检查最近的代码变更
Bash command="git log --oneline -10"
Bash command="git diff HEAD~1"
# 4. 搜索错误信息
Grep pattern="Error|Exception|crash"
# 5. 查询 CLAUDE.md 中的历史问题
Read file_path="CLAUDE.md"
# 6. 网络搜索(如果是新错误)
WebSearch query="[具体错误信息]"
结果:定位问题根源,提供解决方案,无需用户提供额外信息
收到用户请求
↓
问题是否明确?
├─ 是 → 继续
└─ 否 → 主动探索澄清
↓
所需信息是否在项目中?
├─ 是 → 使用 Grep/Glob/Read
└─ 否 → 使用 WebSearch
↓
是否需要历史上下文?
├─ 是 → 查看 CLAUDE.md
└─ 否 → 继续
↓
是否需要环境状态?
├─ 是 → 使用 Bash
└─ 否 → 继续
↓
是否需要复杂推理?
├─ 是 → 使用 Sequential-Thinking
└─ 否 → 继续
↓
信息是否充分?
├─ 是 → 开始执行
└─ 否 → 提问用户(最后手段)
# 1. 查找相似实现
Grep pattern="类似功能的关键词"
# 2. 检查项目结构
Glob pattern="src/**/*.js"
Read file_path="src/index.js"
# 3. 查看依赖
Read file_path="package.json"
# 4. 查询最佳实践
WebSearch query="技术栈 + 功能 + best practices 2025"
# 5. 查询 CLAUDE.md 中的技术选型
Read file_path="CLAUDE.md"
# 1. 重现问题
Bash command="运行复现命令"
# 2. 查看日志
Bash command="tail -n 100 logs/*.log"
# 3. 搜索相关代码
Grep pattern="报错的函数或模块"
# 4. 查看最近变更
Bash command="git log --oneline -20"
Bash command="git diff HEAD~5"
# 5. 搜索类似问题
WebSearch query="具体错误信息"
Read file_path="CLAUDE.md"
# 1. 理解现有实现
Read file_path="目标文件"
# 2. 查找所有调用
Grep pattern="函数名"
# 3. 检查测试覆盖
Glob pattern="**/*.test.js"
Grep pattern="目标函数" glob="**/*.test.js"
# 4. 查询重构模式
WebSearch query="重构模式 + 具体场景"
# 5. 评估影响范围
Grep pattern="import.*目标模块"
用户:实现用户登录功能
Claude:您想使用哪种认证方式?JWT 还是 Session?
用户:实现用户登录功能
Claude:
1. [Grep] 搜索现有认证代码...
2. [Read] 查看 package.json,发现已安装 jsonwebtoken
3. [Grep] 搜索 JWT 使用示例...
4. [Read] 查看 CLAUDE.md 中的历史认证决策...
5. 发现项目已经使用 JWT 模式
6. 开始实现登录功能(复用现有 JWT 机制)
在完成探索后,问自己:
只有当所有答案都是"是"时,才可以向用户提问!
当多个探索互不依赖时,并行执行:
// 同时执行多个搜索
[
Grep pattern="auth",
Glob pattern="**/config*.js",
Read file_path="package.json"
]
从快速工具开始,逐步深入:
Use when the user wants multi-agent division of labor for research-led work and the lead should stay on the critical path while 1-2 bounded sidecars handle low-coupling tasks. Do not use this for tiny tasks, fully sequential debugging, or overlapping refactors.
Use when the user asks to review a skill, analyze skill quality, update a skill version, or run a repeatable keep/disable/archive decision loop from real failures instead of abstract best practices.
Use when the user explicitly wants to upload a final or near-final PDF to paperreview.ai for an external second opinion. Skip this for local paper critique, which should go through `paper-review-pipeline` first.
学术论文写作助手,专门用于 LaTeX 论文编写、BibTeX 管理、格式化、学术写作规范检查。适用于 AI/ML 研究论文、会议投稿(NeurIPS、ICML、ICLR 等)
Use when a task is ambiguous and needs deep multi-role planning with designer, inspiration, and reviewer perspectives before execution. Skip this for ordinary task plans.
Use when you want Claude Code CLI as a second opinion for coding tasks such as design tradeoffs, debugging, or diff review, while keeping Codex as the primary implementer.