Community程式設計與開發github.com

全面研究代理

確保在涉及多工具調用的研究任務中進行徹底驗證、錯誤恢復和透明推理。

全面研究代理 是什麼?

這項技能旨在解決多步驟研究任務中常見的失敗模式:未處理的工具錯誤、缺乏驗證、推理不透明以及過早得出結論。它提供了結構化的協議,用於來源驗證、錯誤恢復和思維透明度,從而顯著提高研究品質和可靠性。該技能適用於涉及網絡搜索、從多個來源收集資訊、有完整性或驗證要求,以及包含需要驗證的文件操作的任務。核心概念包括:驗證檢查點、錯誤恢復協議、來源可追溯性、實質性思考區塊和跨來源驗證。它明確定義了應避免的模式,如靜默工具失敗、模糊完成聲明、未經驗證的來源選擇、通用思考區塊、驗證方法錯誤、引用未檢索的來源以及冗餘工具調用。遵循這些最佳實踐,開發人員和 AI 代理用戶可以構建更穩健、更可信的研究工作流程,最終在複雜任務中獲得更高的評估分數。

相容平台✓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.

相關技能