skills/deep-research/SKILL.md
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 in-depth analysis, investigation, research summaries, or topic exploration.
npx skillsauth add alexdcd/mafia-claude-skills deep-researchInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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)tools
Auditoría defensiva para repositorios AI-native. Usar SIEMPRE que el usuario quiera revisar un repo antes de lanzar, mergear, actualizar dependencias, migrar package manager, configurar un agente IA, MCP, Claude/Cursor/Codex/OpenClaw, o cuando mencione supply chain, prompt injection, secretos, GitHub Actions, npm/pnpm, paquetes maliciosos, scripts peligrosos, o riesgos de seguridad en repos con IA. Activar también si el usuario dice "revisa el repo", "está seguro esto", "antes de producción", "audita el PR" o cualquier variación.
development
Use when given a detailed implementation plan from a frontier AI to execute inside OpenCode with non-frontier coding models. Validates the plan against the real repository, breaks it into safe steps, verifies each step, inspects diffs, and prevents destructive changes. Triggers on: receiving a multi-step plan from Claude Opus/GPT-5/etc., executing a pre-written spec, implementing a detailed PR description, or being told to "execute this plan step by step."
development
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
tools
Generates optimized prompts for any AI tool. Use when writing, fixing, improving, or adapting a prompt for LLM, Cursor, Midjourney, image AI, video AI, coding agents, or any other AI tool.