This skill should be used when conducting comprehensive research on any topic using the OpenAI Deep Research API. It automates prompt enhancement through interactive clarifying questions, saves research parameters, and executes deep research with web search capabilities. Use when the user asks for i
npx playbooks add skill glebis/claude-skills --skill deep-research
This skill enables comprehensive, internet-enabled research on any topic using the OpenAI Responses API with web search (default model gpt-5.6-sol, override with --model or DEEP_RESEARCH_MODEL). o3-deep-research and o4-mini-deep-research were scheduled for shutdown on 2026-07-23 and are no longer the default. It intelligently enhances user research prompts through interactive clarifying questions, ensures research parameters are saved for reproducibility, and executes deep research with full web search capabilities.
Trigger this skill when:
Example user requests:
User Input
↓
Assessment: Prompt too brief?
↓
YES → Ask Enhancement Questions → Collect Answers
↓ ↓
└───────→ Construct Enhanced Prompt ←──┘
↓
Save to Timestamped File
↓
Execute deep_research.py
↓
Output Report + Sources
↓
Present to User
Important for Token Efficiency:
Deep research takes 10-20 minutes or more. The runner uses background mode and polls quietly every 15 s; the command blocks until the run ends, so no status checks are needed from Claude. Claude should:
No need for periodic polling or status updates during execution.
Receive the user's research prompt. This can range from brief ("Latest AI trends") to highly detailed ("Impact of language models on developer productivity with focus on 2024-2025").
Run the skill's main orchestration script with the user's research prompt:
python3 scripts/run_deep_research.py "Your research prompt here"
The script is located at scripts/run_deep_research.py within the skill's installation.
The script automatically:
research_prompt_YYYYMMDD_HHMMSS.txt for reproducibilitydeep_research.py script with:gpt-5.6-sol with reasoning high (configurable via --model, --reasoning, or env DEEP_RESEARCH_MODEL)--timeout)The script automatically:
research_response_YYYYMMDD_HHMMSS.json holds the exact API response bytes (citation spans, web-search step log). It is written as soon as the run is created, and again at every poll, so nothing paid for is lost.research_request_…json (model, tools, prompt; never the key)research_report_YYYYMMDD_HHMMSS.md, with footer lines for model, response ID, and raw-response file## Sources consulted (web search) lists every URL the web-search steps searched or opened. These are consulted, not cited; citations are the inline links.Token Efficiency Note: The script blocks while it polls in the background, so Claude waits on one command.
Interrupted runs: the response ID is printed and saved before waiting. Collect a run that is still going, or one whose wait timed out, with python3 assets/deep_research.py --resume <response_id> --output-dir <dir>. This sends no new (paid) request.
Importing into a vault: import the raw JSON, not the Markdown, with the research-runs skill: python3 ~/.claude/skills/research-runs/scripts/research_run.py import research_response_….json --vault <vault> --adapter openai-json --provider openai --surface api --prompt research_prompt_….txt. The JSON keeps citation spans and consulted-but-uncited pages.
scripts/run_deep_research.py (Main Entry Point)The orchestration script that handles:
Key Features:
Available options:
python3 run_deep_research.py <prompt> [OPTIONS]
--no-enhance Skip enhancement questions
--model <model> Model to use (default: runner default, gpt-5.6-sol)
--timeout <seconds> Maximum wait in seconds (default: 3600)
--output-dir <path> Where to save the prompt, request, raw response, and report
assets/deep_research.pyCore script that interfaces with OpenAI's Deep Research API. Handles:
New command-line options:
--output-file <path> Custom output file path
--no-save Disable automatic markdown saving
references/workflow.mdDetailed workflow documentation covering:
The skill intelligently determines whether enhancement is needed:
--no-enhance flagEnhanced prompts include:
These parameters help the deep research model deliver more targeted, relevant results.
Every research execution:
User: "Research the most effective opensource RAG solutions"
Script behavior:
User: "Analyze the impact of large language models on software developer productivity in 2024-2025, focusing on code generation tools, pair programming, and productivity metrics."
Script behavior:
~/.claude/skills/secrets.enc.yaml) first, then OPENAI_API_KEY or a .env file--timeout; use --resume beyond that)Deep research queries typically take 10-20 minutes to complete. This skill is optimized to minimize token usage during long waits:
How it works:
Token savings:
The skill automatically generates and saves files:
Generated files:
research_prompt_YYYYMMDD_HHMMSS.txt - Enhanced research prompt with parametersresearch_request_YYYYMMDD_HHMMSS.json - What was sent: model, tools, reasoning, prompt (no key)research_response_YYYYMMDD_HHMMSS.json - Exact raw API response: report text, url_citation annotations with character spans, web_search_call steps with consulted sources. Canonical record; import this one.research_report_YYYYMMDD_HHMMSS.md - Readable report with:## Sources consulted (web search): every URL searched or opened, cited or notCustomization options:
# Custom output location
python3 deep_research.py --prompt-file prompt.txt --output-file my_research.md
# Disable automatic saving (terminal output only)
python3 deep_research.py --prompt-file prompt.txt --no-save
Error: "Missing OPENAI_API_KEY"
Solution:
export OPENAI_API_KEY="your-key".env file in working directory with OPENAI_API_KEY=your-keyError: "Could not find deep_research.py"
Solution:
Error: "Still in_progress after …s. Resume later with: --resume <id>"
Solution:
--resume <id> (no new charge), or increase --timeout 5400 (90 minutes)Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.