skills/deep-research/SKILL.md
深度调研的多实例(多 Agent)编排工作流:把一个调研目标拆成可并行子目标,用 Codex CLI(`codex exec`)在默认 `workspace-write` 沙箱内运行子进程;联网与采集优先使用已安装的 skills,其次使用 MCP 工具;用脚本聚合子结果并分章精修,最终交付“成品报告文件路径 + 关键结论/建议摘要”。用于:系统性网页/资料调研、竞品/行业分析、批量链接/数据集分片检索、长文写作与证据整合,或用户提及“深度调研/Deep Research/Wide Research/多 Agent 并行调研/多进程调研”等场景。
npx skillsauth add feiskyer/codex-settings deep-researchInstall 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.
把“深度调研”当作一个可复用、可并行的生产流程来执行:主控负责澄清目标、拆解子目标、调度子进程、聚合与精修;子进程负责采集/抽取/局部分析并输出结构化 Markdown 素材;最终交付物必须是独立成品文件而不是聊天贴文。
关键约束(必须遵守)
--model 或用额外 -c 覆写默认模型/推理设置;只有在用户明确授权时才调整相关配置。--sandbox workspace-write 下运行;仅在必要时启用网络等权限。若子任务必须执行“需要 shell 联网”的命令(例如 curl/wget),在 codex exec 中添加 -c sandbox_workspace_write.network_access=true。firecrawl,其次 tavily;确实无法满足时再考虑 curl/wget。codex exec 子进程,并为其分配合适权限(默认 sandbox;必要时启网)。.research/<name>/aggregated_raw.md),在成品中仅吸收关键洞察/证据。预执行规划与摸底(必做;主控亲自完成)
firecrawl,其次 tavily;若都不可用,记录原因并选择替代方案(必要时再降级到最小化直接联网抓取)。初始化与总体规划
name(建议:<YYYYMMDD>-<短题>-<随机后缀>,全小写、短横线分隔、无空格)。.research/<name>/,并把所有产物都保存到该目录下(子目录如 prompts/、logs/、child_outputs/、raw/、cache/、tmp/)。子目标识别
生成调度脚本
.research/<name>/run_children.sh),要求:
codex exec 调用,推荐要点:
codex exec --full-auto --sandbox workspace-write ...(以 codex exec --help 为准)。firecrawl,其次 tavily;确实没办法才用 curl/wget;不使用 plan 工具与“人工交互等待”。--model,也不要用额外 -c 覆写默认模型/推理设置;仅在用户明确授权且结果质量确实不足时才考虑调整。.research/<name>/child_outputs/<id>.md)。--prompt-file、--mcp、--name),并提醒先运行 codex exec --help 获取最新说明。可引用如下调用模板(仅演示参数,不涉及并行):
timeout 600 codex exec --full-auto --sandbox workspace-write \
--output-last-message "$output_file" \
- <"$prompt_file"
curl/wget),在 codex exec 调用中追加:-c sandbox_workspace_write.network_access=true。timeout 300),较大任务可放宽到最多 15 分钟(timeout 900),通过外部 timeout 命令兜底。首次命中 5 分钟超时时,结合任务实际判断是否拆分/改参数再重试;15 分钟仍未完成则视为 prompt 或流程需要排查。xargs/GNU Parallel,但必须先用小规模验证参数展开。默认并行 8 个,可按硬件或配额调整。stdbuf -oL -eL codex exec … | tee .research/<name>/logs/<id>.log 等方式保证实时刷新,便于 tail -f 观察进度。codex exec 不提供 --output、--log-level 等参数;需要通过管道写文件,并在多段管道后用正确的 PIPESTATUS 索引确认退出码。运行前可用 codex exec --help 复核可用参数。设计子进程 Prompt
firecrawl → tavily)→ 最小化直接抓取。printf/逐行写入注入变量,避免 Bash 3.2 在多字节字符场景下 cat <<EOF 截断变量的已知问题。.research/<name>/child_prompt_template.md)以便审计与复用。cat .research/<name>/prompts/<id>.md),确认变量替换正确、指令完整后再派发任务。并行执行与监控
tail -f .research/<name>/logs/<id>.log 追踪实时输出。程序化聚合(生成基础稿)
.research/<name>/aggregate.py)读取 .research/<name>/child_outputs/ 下所有 Markdown,按预设顺序聚合为初版主文档(例如 .research/<name>/final_report.md)。解读聚合结果并设计结构
.research/<name>/final_report.md 与关键子输出。.research/<name>/polish_outline.md),明确目标受众、章节顺序与每章核心论点。分章精修与出稿
.research/<name>/polished_report.md),按大纲逐章撰写;每写完一章立刻自查事实、引用与语言要求,必要时回溯子稿核实。落地交付
.research/<name>/);通过提供文件路径与必要摘要向用户回报,禁止在聊天中贴出完整成稿。.research/<name>/,避免覆盖旧文件。--dangerously-bypass-approvals-and-sandbox。.research/<name>/raw/ 等缓存目录,后续处理优先读取本地缓存以减少重复请求。.research/<name>/tmp/、.research/<name>/raw/、.research/<name>/cache/ 等子目录,必要时在流程结束后按需清理。codex mcp list),并优先选择 firecrawl,其次 tavily;缺少 MCP 时再退回最小化直接抓取能力。realpath/test -d 等确认关键路径(如 venv、资源目录)存在;必要时用 dirname "$0" 推导仓库根路径并通过参数传入,避免硬编码。.research/<name>/dispatcher.log;子任务单独写 .research/<name>/logs/<id>.log,失败时直接 tail 对应日志定位 MCP/调用细节。failed_ids 列表并在收尾阶段统一提示后续建议。.research/<name>/child_outputs/<id>.md 是否已合法存在;存在则跳过,减少配额消耗与重复访问。[来源](https://example.com)),避免把链接集中到段尾,便于即时查证。先思考再动手:追求有深度、有独立思考、超出预期的洞见(但不要在回答里提到“惊喜”);揣摩用户为什么会问这个问题、背后的假设是什么、有没有更本质的问法;同时明确你的答案应满足的成功标准,再围绕标准组织内容。
保持协作:你的目标不是机械执行指令、也不是在信息不足时强行给出确定答案;而是与用户共同推进,逐步逼近更好的问题与更可靠的结论。
写作风格要求:
执行本技能时,在每一步输出清晰的决策与进度日志。
content-media
Extract subtitles/transcripts from a YouTube video URL and save as a local file. Use when you need to extract subtitles from a YouTube video.
tools
GitHub Spec-Kit integration for constitution-based spec-driven development. 7-phase workflow (constitution, specify, clarify, plan, tasks, analyze, implement). Use when working with spec-kit CLI, .specify/ directories, or creating specifications with constitution-driven development. Triggered by "spec-kit", "speckit", "constitution", "specify", references to .specify/ directory, or spec-kit commands.
tools
Generate, remix, or edit images with Nanobanana / Nano Banana 2 through the bundled Gemini CLI wrapper. Use this whenever the user wants AI image generation or editing, especially for reference-image composition, character consistency, grounded visuals that may need live web search, style transfer, marketing graphics, product mockups, social assets, or when they explicitly mention Nanobanana, Gemini image models, Google image generation, AI drawing, 图片生成, AI绘图, 图片编辑, or 生成图片.
development
Interactive feature development workflow from idea to implementation. Creates requirements (EARS format), design documents, and implementation task lists. Use when creating feature specs, requirements documents, design documents, or implementation plans. Triggered by "kiro" or references to .kiro/specs/ directory.