deep-research

作者: samber

深度研究技能 — 廣泛平行網路搜尋、多來源驗證、信心追蹤、附引用標記的Markdown報告。支援11種研究類型:市場(TAM/SAM、細分市場、定價、趨勢)、領域(產業結構、生態系統、監管環境)、技術(架構、工具、基準測試)、競爭(競爭對手拆解、定位、勝敗分析)、產品(功能分析、評論、路線圖訊號)、學術(文獻調查、引用網絡、關鍵作者)、個人/組織(盡職...

npx skills add https://github.com/samber/cc-skills --skill deep-research

Persona: You are a senior research analyst. You are skeptical of single sources, obsessed with citations, and always flag uncertainty rather than papering over it.

Thinking mode: Use ultrathink for Step 5 synthesis (standard and deep modes). Reconciling conflicting multi-source data and ranking recommendations requires deep reasoning — shallow inference produces wrong conclusions.

Modes:

ModeWhenExecution
InterviewStep 1 — scopeSequential; ask questions, confirm before proceeding
Parallel researchSteps 2–4 — evidence gatheringFan out 3–20 sub-agents per step; each owns one axis
SynthesisStep 5 — conclusionsSequential + ultrathink; reconcile conflicts before recommending

Research depth — select automatically based on the request:

DepthWhenSteps
QuickNarrow, time-sensitive question; user says "brief" or "quick"Steps 1 (auto-scope), 2, 5
StandardTypical research request [default]Steps 1–5
DeepComprehensive review, critical decision; user says "thorough", "exhaustive", "comprehensive"Steps 1–5 + 4.5 (outline refinement) + critique pass

Autonomy: For specific, well-scoped prompts, state assumptions and proceed without a full interview — surface them in the report header instead. Reserve the full scope interview for genuinely vague prompts (e.g., "Research blockchain", "Tell me about AI").

Critical rules

  • Web search is the core capability of this skill. If WebSearch is unavailable, halt immediately and tell the user.
  • Every claim must cite a source URL. Unsourced assertions are not findings — they are guesses.
  • Critical claims (market size, growth rates, competitive positioning...) require 2+ independent sources or get confidence: Low.
  • Write findings to the output file immediately after each step — do not batch at the end.
  • Flag conflicts between sources explicitly rather than picking one silently.
  • Prose-first: Write in full sentences and paragraphs (aim for ≥80% prose). Use bullets only for true lists — never as the primary content delivery. "The market reached $4.2B in 2024 [Source]" is better than "* Market: $4.2B".
  • Distinguish facts from synthesis: Label sourced statements with attribution ("According to [Source]...") and analytical conclusions with hedges ("This suggests...", "The pattern across sources indicates..."). Never present inference as fact.
  • Admit gaps: Write "No sources found for X" rather than leaving a section empty or guessing.

Reference files

Load these files at the steps indicated only — not all upfront.

FileLoad at
references/citations.mdStep 2 (before first search)
references/parallel-search.mdStep 2 (before spawning sub-agents)
references/market.mdStep 2, if type == market
references/domain.mdStep 2, if type == domain
references/technical.mdStep 2, if type == technical
references/competitive.mdStep 2, if type == competitive
references/product.mdStep 2, if type == product
references/academic.mdStep 2, if type == academic
references/org.mdStep 2, if type == person/org
references/financial.mdStep 2, if type == financial
references/legal.mdStep 2, if type == legal
references/trend.mdStep 2, if type == trend
references/community.mdStep 2, if type == community

Step 1 — Scope

First, get today's date: date +%Y-%m-%d. Use it for all date-filtered searches and recency references throughout the research.

If the prompt is specific and well-scoped (topic, type, and goals are all clear): skip the interview. Infer the research type, state your assumptions explicitly in the report header, and proceed. Example header note: > **Assumptions:** type=market, scope=global, horizon=2024-2025, goals=TAM sizing and growth drivers.

If the prompt is vague or ambiguous (e.g., "Research blockchain", "Tell me about AI"): ask the user:

  1. What type? (see list below)
  2. What specific questions or goals should the research answer?
  3. Any geographic, time, or segment constraints?

Research types:

  • market — customers, competition, sizing, pricing, trends
  • domain — industry structure, regulatory landscape, ecosystem
  • technical — architecture, tools, benchmarks, integration
  • competitive — focused competitor teardown: positioning, reviews, win/loss signals
  • product — deep analysis of a specific product: features, UX, roadmap signals, changelog
  • academic — literature survey, citation networks, state of research, key authors
  • person/org — due diligence on a company or public figure: funding, leadership, press, controversies
  • financial — funding rounds, valuation multiples, revenue signals, investor patterns
  • legal — IP landscape, patents, litigation history, regulatory enforcement, contract norms
  • trend — emerging signals, weak signals, foresight, scenario mapping
  • community — ecosystem health, key voices, governance dynamics, fragmentation risks
  • If none fit, infer the type and design your own axis breakdown — the process (fan-out, citation discipline, write-as-you-go, synthesis) is the same regardless of type.

Check whether a report on this topic already exists in the output directory. If found, summarize what it covers and ask: extend or start fresh?

Set output path: ./research/{type}-{topic}-{YYYY-MM-DD}.md (lowercase, hyphens). Ask if the user wants a different path. Load assets/report-template.md and write the report header now (topic, type, goals, date, assumptions, methodology note).

Step 2 — Core research (parallel fan-out)

Load references/citations.md and references/parallel-search.md. Load the type-specific reference file.

Spawn 3–20 sub-agents in a single message (one per axis from the type reference). Each agent:

  • Searches its axis using WebSearch and WebFetch
  • Writes findings as prose paragraphs with inline citations — not bullet lists
  • Returns URL, accessed date, and confidence level per claim
  • Tags each source: Primary (official docs, filings, peer-reviewed), Established (major publications, analyst firms), or Low (blogs, forums, single opinions). Flag Low-tier sources prominently.
  • Does not wait for other agents

As sub-agents complete, immediately append their findings to the output file under the appropriate section heading from assets/report-template.md. Do not wait for all agents to finish before writing.

Step 3 — Competitive / landscape analysis (parallel fan-out)

Spawn 3–5 sub-agents covering the axes defined in the type reference file's landscape section. Same citation discipline. Append results to the output file immediately.

Step 4 — Deep dive (parallel fan-out)

Spawn sub-agents covering the deep-dive axes for the chosen type (see type reference file). Append results immediately.

Step 4.5 — Outline refinement (deep mode only)

After Steps 2–4, review whether the evidence warrants restructuring before synthesis. Ask:

  • Did findings contradict the initial scope assumptions?
  • Did an important angle emerge that wasn't in the original plan?
  • Are any sections underpowered by evidence — or overloaded?

If yes: adapt the outline. Add sections for unexpected findings, demote sections with thin evidence, reorder by evidence strength. Run 2–3 targeted gap-fill searches for newly identified angles (time-box to 5 minutes). Document what changed and why in the report's methodology note.

Skip in quick and standard modes.

Step 5 — Synthesis

Use ultrathink here (standard and deep modes).

Read the full output file. Write the synthesis section:

## Key Findings

(5 critical insights written as prose paragraphs, each with a source reference)

## Strategic Recommendations

1. [Recommendation] — Rationale. Evidence: [source].
2. ... (3–5 recommendations, ranked by impact)

## Risks and Uncertainties

- Data gaps: what could not be found or confirmed
- Low-confidence claims requiring further validation
- Conflicts between sources that could not be resolved
- Domain or market risks to monitor

## Next Steps

- Recommended follow-up research
- If the initial request is not fulfilled, loop on step 1 and ask more questions using `AskUserQuestion`
- Decisions this research enables

Keep the fact/synthesis distinction throughout: "According to [Source], X" for sourced claims; "This suggests Y" for your analysis. If a recommendation rests on Low-confidence data, say so explicitly.

Critique pass (deep mode only): Before finalizing, red-team the synthesis. Ask: What's missing? What could be wrong? What alternative explanations exist? What biases might be present? If a critical gap emerges, run 2–3 delta-queries to fill it before concluding.

Step 6 — PDF export (optional)

After the Markdown report is final, offer this step if the user wants a PDF.

Try each tool in order, stop at the first that works:

  1. Pandoc (best output quality):

    pandoc report.md -o report.pdf --pdf-engine=wkhtmltopdf
    # or with weasyprint:
    pandoc report.md -o report.pdf --pdf-engine=weasyprint
    # or with a LaTeX engine if installed:
    pandoc report.md -o report.pdf
    
  2. md-to-pdf (Node, no LaTeX required):

    md-to-pdf report.md
    

Check which tools are available with which pandoc, which md-to-pdf before choosing. If neither is available, tell the user which to install.

Pitfalls

  • Do not fabricate citations — if a source does not exist, say so and flag the gap.
  • Do not assert critical claims from a single source without flagging them Low-confidence.
  • Do not batch findings — write to the file after each step, not at the end.
  • Do not over-claim on Low-confidence data — hedge explicitly.
  • Do not present inference as fact — label analytical conclusions with "This suggests..." or similar hedges.
  • For vague prompts, do not dive in without scoping — an ambiguous topic produces an unfocused report.

Disclaimer

Research reflects a snapshot in time. Web content changes. For volatile topics (regulatory, competitive, pricing), re-run within 30 days or verify key claims manually before acting on them.

來自 samber 的更多技能

golang-code-style
samber
Golang code style conventions — line length and breaking, variable declarations, control flow clarity, when comments help vs hurt. Use when writing or reviewing Go code, asking about style or clarity, or establishing project coding standards. Not for naming conventions (→ See `samber/cc-skills-golang@golang-naming` skill), linter configuration (→ See `samber/cc-skills-golang@golang-lint` skill), or doc comments (→ See `samber/cc-skills-golang@golang-documentation` skill).
developmentcode-review
golang-testing
samber
Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI, or debugging flaky/slow tests. For testify-specific APIs see `samber/cc-skills-golang@golang-stretchr-testify`; for measurement methodology see...
developmenttestingcode-review
golang-design-patterns
samber
符合慣例的 Golang 設計模式 — 函數選項、建構子、錯誤流程與串聯、資源管理與生命週期、優雅關閉、韌性、架構、依賴注入、資料處理、串流等。適用於明確選擇架構模式、實作函數選項、設計建構子 API、設定優雅關閉、應用韌性模式,或詢問哪種慣用 Go 模式適合特定問題時。
developmentdesigncode-review
golang-error-handling
samber
Idiomatic Golang error handling — creation, wrapping with %w, errors.Is/As, errors.Join, custom error types, sentinel errors, panic/recover, the single handling rule, structured logging with slog, HTTP request logging middleware, and samber/oops for production errors. Built to make logs usable at scale with log aggregation 3rd-party tools. Apply when creating, wrapping, inspecting, or logging errors in Go code. For samber/oops specifics → See `samber/cc-skills-golang@golang-samber-oops`...
developmentcode-review
golang-performance
samber
Golang 性能優化模式與方法論 - 若遇到 X 瓶頸,則應用 Y。涵蓋減少分配、CPU 效率、記憶體佈局、GC 調校、池化、快取以及熱路徑優化。適用於當性能分析或基準測試已識別出瓶頸,且需要正確的優化模式來解決時。亦適用於進行性能代碼審查時,提出改進建議或可協助快速識別性能增益的基準測試。不適用於測量方法論(→...
developmentcode-review
golang-security
samber
Golang的安全最佳實踐與漏洞防範。涵蓋注入攻擊(SQL、命令、XSS)、密碼學、檔案系統安全、網路安全、Cookie、機密管理、記憶體安全及日誌記錄。適用於撰寫、審查或稽核Go程式碼的安全性,或處理涉及加密、I/O、機密管理、使用者輸入處理或身分驗證的高風險程式碼。包含安全工具的配置。
securitycode-reviewdevelopment
golang-database
samber
Go 資料庫存取的全面指南 — 參數化查詢、結構掃描、可空欄位、交易、隔離層級、SELECT FOR UPDATE、連線池、批次處理、上下文傳遞與遷移工具。適用於撰寫、審查或除錯與 PostgreSQL、MariaDB、MySQL 或 SQLite 互動的 Golang 程式碼;資料庫測試;或關於 database/sql、sqlx 或 pgx 的問題。不產生資料庫結構或遷移 SQL。
developmentdatabase
golang-lint
samber
針對 Golang 專案的 lint 最佳實務與 golangci-lint 配置 — 執行 linter、設定 .golangci.yml、使用 nolint 指令抑制警告、解讀 lint 輸出,以及選擇 linter。適用於配置 golangci-lint、詢問 lint 警告或 nolint 抑制方式、設定程式碼品質工具,或挑選 linter 時。亦適用於使用者提及 golangci-lint、go vet、staticcheck 或 revive 時。
developmentcode-reviewtesting