Community编程与开发github.com

综合研究代理技能

确保在研究任务中通过多次工具调用实现全面的验证、错误恢复和透明推理。

综合研究代理技能 是什么?

该技能旨在解决多步骤研究任务中的常见失败模式,例如未处理的工具错误、缺失验证、不透明的推理以及过早下结论。它提供了一套结构化的协议,包括源验证、错误恢复和思考过程透明化,从而显著提升研究质量和可靠性。该技能适用于需要多次调用工具(如搜索、读取URL、获取内容)的复杂研究或信息收集工作流。通过强制实施验证检查点、错误确认机制和源跟踪,它帮助AI代理避免“静默失败”、“模糊完成声明”和“未检索引用”等反模式。最终输出将包含明确的覆盖范围总结、交叉验证的声明以及记录在案的信息缺口,支持Claude Code、Cursor和Codex等平台上的代理系统。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering/tree/main/examples/interleaved-thinking/generated_skills/comprehensive-research-agent

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

综合研究代理最佳实践

本技能解决了多步骤研究任务中的常见失败:未处理的工具错误、缺失验证、不透明的推理以及过早下结论。它提供了结构化的协议,用于源验证、错误恢复和思考过程透明化,从而显著提升研究质量和可靠性。

何时激活

  • 任务涉及使用 search、read_url 或 fetch 操作的网络研究
  • 任务需要从多个来源收集信息
  • 任务对完整性或验证有明确要求
  • 任务包含需要验证的文件操作(save、write、read)
  • 任何涉及3次以上工具交互的研究或信息收集工作流

核心概念

  • 验证检查点:在阶段转换时设置显式的验证步骤,以确认工具输出、源相关性和信息完整性,然后再继续。
  • 错误恢复协议:强制承认并处理工具失败,并带有备用策略,而非静默继续。
  • 源可追溯性:清晰跟踪哪些源是实际检索的,哪些是依据先前知识引用的,以防止幻觉。
  • 实质性思考块:详细的推理痕迹,记录每一步的见解、联系、缺口和决策依据。
  • 跨源验证:对照多个来源验证关键声明,并明确标注共识、矛盾和信息缺口。

要避免的模式

  • 静默工具失败:工具调用返回错误(404、超时、无效URL),但代理在未承认的情况下继续,可能遗漏关键信息。始终记录失败并尝试恢复或记录缺口。
  • 模糊完成声明:代理声明“我有足够的信息”或“研究已全面”,但未说明学到了什么、哪些来源支持声明、或仍有哪些缺口。应替换为具体的覆盖范围总结。
  • 未经验证的源选择:代理读取搜索结果中的URL,而未经事先评估相关性、可信度或时效性。这会浪费工具调用在低质量源上。始终在深入阅读前对源进行排序和优先处理。
  • 通用思考块:思考仅包含下一步动作的描述(“现在我将搜索X”),而没有分析学到了什么、如何与目标关联、或仍有哪些问题。思考应具有实质性和反思性。
  • 验证方法错误:使用 list_directory 验证文件创建可能因缓存导致假阴性。请始终使用 read_file 进行实际内容验证。
  • 未检索引用:在最终报告中引用从未成功获取或读取的源(URL、论文标题)。明确跟踪源,禁止引用未检索的内容。
  • 冗余工具调用:进行重叠搜索或读取来源而不跟踪已获取的内容。维护一个“已发现资源”跟踪器以避免重复。

推荐实践

  • 实施阅读前源评估:在读取URL之前,按相关性、可信度、时效性和权威性对搜索结果排序。在思考块中记录选择理由。
  • 使用结构化思考块:每个思考块必须包括:(a) 从源/操作中学到了什么,(b) 它与研究目标如何关联,(c) 识别出的任何矛盾/缺口,(d) 做出的战略决策。避免通用的下一步动作陈述。
  • 添加强制错误确认:当任何工具失败时,下一个思考块必须显式处理它:记录失败类型,提出恢复策略(重试、替代来源或记录的缺口),并解释所选方法。
  • 创建完成前验证清单:在宣布研究完成前,验证:所有必需部分都有具体证据,所有来源都成功检索,关键声明已交叉验证,缺口已记录。
  • 实施跨源验证:从多个来源收集信息后,显式比较发现。标注来源一致之处、矛盾之处以及未经验证的内容。利用这一点评估整体置信度。
  • 维护源跟踪表:在思考中创建一个简单的表格,显示哪些URL已获取、哪些失败、以及哪些用于特定声明。绝不要引用未检索的来源。
  • 使用 Read_File 进行验证:在确认文件写入时,请使用 read_file 验证实际内容,而非 list_directory,后者可能因缓存问题导致假阴性。
  • 添加显式验证阶段:在读取来源后,编写一个简要的合成,确认有用性、指出与研究目标的相关性,并在进入下一阶段前识别仍存在的缺口。

指导原则

  1. 每次工具调用后,显式检查响应中的错误,并在下一个思考块中承认失败并附带恢复策略
  2. 在读取URL之前,按相关性/可信度对来源排序并记录选择理由——绝不要未经评估就读取结果
  3. 思考块必须至少包含3-5句以上,并包括:学到了什么、与目标的关联、缺口/矛盾以及后续步骤
  4. 创建完成前检查清单,验证:所有要求已覆盖、来源已检索、声明已验证、缺口已记录
  5. 维护源跟踪——只引用成功获取的URL;禁止引用未检索的来源
  6. 在编写最终报告时,包含“局限与缺口”部分,记录尝试但失败的内容或仍未验证的内容
  7. 在保存操作后,使用 read_file(而非 list_directory)验证文件内容
  8. 尽可能将关键声明与至少2个来源进行交叉验证;显式标注共识或矛盾
  9. 跟踪已收集信息以避免冗余搜索——为多阶段研究实施“已发现资源”跟踪器
  10. 用具体的总结替换模糊的“全面”陈述:“覆盖了Y主题的X个来源;缺少Z方面”

示例

  • *之前(反模式):我搜索了上下文工程,找到了几个结果。现在我将读取一些URL然后写报告。我有足够的信息继续。

之后(模式):搜索返回了15个关于上下文工程的结果。评估相关性:Liu等人(2024)在“中间迷失”现象方面似乎最权威;Anthropic文档可能包含当前上下文窗口规格;Patel(2023)涵盖了RAG最佳实践。将这些排为前3优先级。首先读取排名第一的结果。如果主要来源失败(URL错误),将尝试备用搜索以找到正确的文档URL,并在最终报告中记录该缺口。

  • *之前(反模式):工具为Anthropic上下文窗口URL返回404错误。代理继续而未承认。后来引用“Claude有200K上下文窗口”而未显示来源。最终报告引用了从未获取的Google Research论文。

之后(模式):工具为Anthropic URL返回404。思考:主要来源失败。备用方案:搜索替代的Anthropic文档URL或找存档版本。如果不可用,仅使用次要来源的上下文窗口数据,并添加关于验证状态的免责声明。然后:交叉验证了Claude上下文窗口:Anthropic博客(成功读取)和两个开发者文档来源一致认为200K。对此声明有信心。源跟踪表显示:Anthropic URL(失败,使用了备用),博客(成功),开发者文档(成功)。


分数期望

涉及多个工具(6次以上)和多步骤推理链的复杂研究任务通常能达到 65-75分 的范围。这不是提示的限制,而是反映了:

  • 工具输出的固有变异性影响推理路径
  • 多种有效方法导致不同的中间分数
  • 长周期代理执行的随机性

关注相对改进和模式消除,而非绝对分数。对于复杂任务,5-10%的优化提升是显著的。


技能元数据

生成日期:2026-01-11 来源:推理轨迹优化器 优化迭代次数:10 最佳得分:72/100(第4次迭代) 最终得分:70.0/100 分数提升:67.6 → 70.0 (+3.6%)

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

advanced-evaluation

This skill should be used for advanced LLM evaluation: LLM-as-judge systems, direct scoring, pairwise comparison, rubric calibration, evaluator bias mitigation, confidence scoring, and automated quality assessment.

bdi-mental-states

This skill should be used when modeling agent mental states with BDI concepts: beliefs, desires, intentions, RDF-to-belief transformations, rational agency traces, cognitive agents, BDI ontologies, and neuro-symbolic AI integration.

book-sft-pipeline

This skill should be used for book-to-SFT pipelines: ePub extraction, literary segmentation, author-voice dataset construction, style-transfer training, LoRA workflows, and model evaluation for voice replication.

compaction-control-profiling

This skill should be used when deciding, for a specific model and workload, whether the harness or the model should control compaction, and when qualifying or calibrating that choice with measurements: context-budget sweeps that compare harness-driven and model-driven compaction on one harness, the context-pressure regime where delegation pays, a per-model compaction behavior profile (interface uptake, compression factor per call, reopen rate of archived content, context fill at first compaction, response to pressure warnings), context anxiety and timing-instruction calibration, reversible collapse-and-archive interfaces, and re-qualification after a model or prompt change. Route the editable-file protocol, harness invariants, and edit-position cache cost of self-editing agents to self-managed-context, summary content to context-compression, harness thresholds and cache layout to context-optimization, and general evaluation design to evaluation.

context-compression

This skill should be used when long-running agent sessions need context compression, structured summarization, compaction, token-per-task optimization, or durable handoff summaries that preserve decisions, files, risks, and next actions.

context-degradation

This skill should be used for diagnosing and mitigating context degradation: lost-in-middle failures, context poisoning, context clash, context confusion, attention-pattern issues, and agent performance degradation caused by accumulated or conflicting context.

context-fundamentals

This skill should be used to explain or reason about the foundational concepts of context engineering: what context is, the anatomy of a context window, how attention mechanics work, the U-shaped attention curve, why context quality matters more than quantity, and the mental models needed to interpret every other context-engineering decision. Use this for conceptual explanation, onboarding, and background reading. Route operational work to the specialized skills: debugging attention failures goes to context-degradation, token-efficiency work goes to context-optimization, conversation summarization goes to context-compression, and project-shape decisions go to project-development.

context-optimization

This skill should be used for improving context efficiency: context budgeting, observation masking, prefix or KV-cache strategy, partitioning, token-cost reduction, retrieval scoping, and extending effective context capacity without lowering answer quality.

evaluation

This skill should be used when building agent evaluation systems: deterministic checks, regression suites, multi-dimensional rubrics, quality gates, production monitoring, baseline comparison, and outcome measurement for agent pipelines.

filesystem-context

This skill should be used when agent work needs file-backed context: durable scratchpads, tool-output offloading, just-in-time discovery, cross-agent handoff files, filesystem memory, or cleanup policies for context stored outside the prompt.

harness-engineering

This skill should be used when designing autonomous agent harnesses: research loops, evaluation scaffolds, locked and editable surfaces, durable logs, novelty gates, pruning, rollback, PR preparation, and human approval boundaries.

hosted-agents

This skill should be used when designing hosted or background agent infrastructure: sandboxed execution, remote coding environments, warm pools, session persistence, multiplayer collaboration, self-spawning agents, or Modal-style sandboxes.

instruction-surface-security

Hardens agent runtimes against persistent prompt injection or unauthorized changes to instructions and permissions. Use to audit what agents auto-load, design reviewed activation for project rules, skills, memory, or tool configuration, and test whether trust boundaries hold after reload, restart, or delegation.

latent-briefing

This skill should be used when the user asks to "share memory between agents", "KV cache compaction for multi-agent", "orchestrator worker context", "latent briefing", "reduce worker tokens", "cross-agent memory without summarization", or discusses Attention Matching compaction, recursive language models with workers, or token explosion in hierarchical agents.

long-horizon-prompting

This skill should be used when writing, enhancing, or evaluating the launch prompt for a long-running autonomous agent or a parallel multi-agent orchestration attacking a hard problem: pseudo-formal task briefs that define terms and an exact success predicate linguistically, enumerate non-counting outcomes, set persistence rules with explicit stop and return conditions and effort floors, manage a diverse portfolio of parallel approaches with an approach registry and blocked-route bookkeeping, and gate the return on adversarial audit. Route agent topology and coordination protocols to multi-agent-patterns, runtime control surfaces and loop governance to harness-engineering, evaluator and quality-gate construction to evaluation, judge design to advanced-evaluation, and compaction or memory mechanics to context-compression and memory-systems.

memory-systems

This skill should be used for persistent semantic memory in agent systems: cross-session knowledge retention, entity tracking, temporal validity, graph or vector retrieval, memory consolidation, and memory benchmark selection. Route file-backed scratchpads to filesystem-context, handoff summaries to context-compression, and token-efficiency tactics to context-optimization.

multi-agent-patterns

This skill should be used when designing multi-agent systems that need context isolation, supervisor or swarm coordination, explicit handoffs, parallel execution, or a decision on whether multiple agents are justified.

project-development

This skill should be used for project-level decisions about LLM-powered systems: whether an LLM is the right primitive for the task at hand, the shape of a multi-stage batch or agent pipeline, token and cost estimation, choosing between single-agent and multi-agent at the project level, structured output design for downstream parsing, and structuring agent-assisted iteration. Use this when the unit of work is a whole project or a multi-stage pipeline. Route individual tool design to tool-design and individual skill-loading or context-budget tactics to context-optimization.

self-improvement-loops

This skill should be used when the harness, scaffold, workflow, or optimizer itself is the optimization target: recursive self-improvement (RSI) loops, meta-harnesses, self-improving harnesses that mine their own failures and propose bounded edits, evolutionary or population-based search over agent scaffolds, acceptance gates for self-modifying systems, and agentic context evolution where the mechanism that produces context is versioned and evolved. Route governance of a single autonomous loop (locked surfaces, durable logs, rollback, novelty gates, approval boundaries) to harness-engineering, measurement and quality-gate design to evaluation, judge design to advanced-evaluation, and remote sandbox infrastructure to hosted-agents.

self-managed-context

This skill should be used when a model gets read-write control over its own live context window instead of a harness-scheduled compaction policy: the context exposed as an editable file the model rewrites with code tools, model-driven eviction and in-place updates, the harness invariants that keep self-editing safe (pinned prefix, edit gate, edit receipts, budget readouts, rollback on overflow), the prefix-cache cost of mid-context edits, and steering or training the model's own context-editing strategy. Route note content and fixed-threshold summarization to context-compression, cache-stable layout under harness control to context-optimization, file offloading to filesystem-context, and loop governance to self-improvement-loops.

相关技能