skills/full/proactive-explorer/SKILL.md
落实 CLAUDE.md / AGENTS.md 中的“主动探索”原则,在向用户提问前自动使用 Grep、Read、Bash、WebSearch 等工具获取信息
npx skillsauth add cnfjlhj/ai-collab-playbook proactive-explorerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
此 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"
]
从快速工具开始,逐步深入:
tools
小红书笔记素材创作技能。当用户需要创建小红书笔记素材时使用这个技能。技能包含:根据用户的需求和提供的资料,撰写小红书笔记内容(标题+正文),生成图片卡片(封面+正文卡片),以及发布小红书笔记。
tools
This skill should be used when the user wants to publish an existing Markdown article to Xiaohongshu as a private longform post, keep the original wording and structure, insert inline images in order, use one-click layout, and verify the result in note manager.
testing
This skill should be used when the user asks to "remove AI writing patterns", "humanize this text", "make this sound more natural", "remove AI-generated traces", "fix robotic writing", or needs to eliminate AI writing patterns from prose. Supports both English and Chinese text. Based on Wikipedia's "Signs of AI writing" guide, detects and fixes inflated symbolism, promotional language, superficial -ing analyses, vague attributions, AI vocabulary, negative parallelisms, and excessive conjunctive phrases.
development
Generate a detailed, professional video content summary from timestamped subtitles/transcripts (e.g., lines starting with 00:00 / 1:23:45). Enforce strict per-segment structure (timestamp range + bold segment title + 2-paragraph body: first-person creator summary + expert 【导师评注】 critique with uncertainty handling). Use when the user provides time-coded subtitles and asks for a规范化纪要/内容纪要/逐段总结, and optionally wants a clean PDF export (do NOT include the full raw transcript in the PDF unless explicitly requested).