This orchestrates OpenAI's o4-mini-deep-research model to handle comprehensive research tasks with web search. It's clever about prompt enhancement: if you throw it something brief like "latest AI trends," it asks 2-3 clarifying questions about scope and depth before running the actual research. Saves everything to timestamped files for reproducibility. The workflow is token-efficient because deep research takes 10-20 minutes, so it just blocks and waits rather than polling for status updates. Best for when you need actual investigation with sources, not just a quick answer. The technical versus general research detection is a nice touch for tailoring follow-up questions.
npx -y skills add glebis/claude-skills --skill deep-research --agent claude-codeInstalls into .claude/skills of the current project.
This skill enables comprehensive, internet-enabled research on any topic using OpenAI's Deep Research API (o4-mini-deep-research model). 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 to complete. The skill is designed to run synchronously (blocking) without intermediate status checks. This approach minimizes token usage during the wait. 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:
Assesses prompt completeness: Checks if prompt is too brief or generic (< 15 words or starts with "what is", "how to", etc.)
Asks clarifying questions (if needed):
Enhances the prompt: Combines original prompt with user's answers into structured research parameters
Saves prompt file: Writes enhanced prompt to research_prompt_YYYYMMDD_HHMMSS.txt for reproducibility
Executes deep research: Runs the core deep_research.py script with:
--model)--timeout)The script automatically:
research_report_YYYYMMDD_HHMMSS.mdToken Efficiency Note: Deep research takes 10-20 minutes. The script runs synchronously (blocking) without intermediate polling, minimizing token usage during the wait.
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: o4-mini-deep-research)
--timeout <seconds> Timeout in seconds (default: 1800)
--output-dir <path> Where to save prompt file
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:
OPENAI_API_KEY environment variable or .env file)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_report_YYYYMMDD_HHMMSS.md - Complete markdown report with:
Customization 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: Request times out after 30 minutes
Solution:
--timeout 5400 (90 minutes)sickn33/antigravity-awesome-skills