Deep Research
This skill provides a systematic approach to researching and analyzing the codebase and external dependencies. It is designed to be used before starting complex implementation tasks.
Local Code Discovery
- REQUIRED SUB-SKILL: Use
codebase_search for local code discovery.
- MANDATORY: Use codebase_search for local code discovery.
Sourcebot (External Search)
- Reference:
.claude/commands/sourcebot.md
- MANDATORY: Use Sourcebot (5-7 times) for EXTERNAL libraries/frameworks only.
- NEVER use it for local code.
- Workflow:
list_repos -> Identify ID -> search_code with filterByRepoIds.
Pal MCP Toolkit (Architecture Analysis)
- Reference:
.claude/commands/pal.md (unified Pal skill)
- MANDATORY: Use
pal skill and appropriate Pal MCP tools before complex tasks.
- Available Tools:
mcp__zen__analyze, mcp__zen__debug, mcp__zen__planner, mcp__zen__refactor, mcp__zen__codereview, mcp__zen__tracer
- Scope: Architecture, Quality, Performance, Security, Tech Debt.
- CRITICAL ENFORCEMENT:
- YOU MUST ALWAYS complete ALL THE STEPS when using any Pal MCP tool.
- NEVER stop in the middle of the steps.
- If you don't complete the steps until
next_step_required: false, YOUR TASK WILL BE INVALIDATED.
- NO EXCEPTIONS.
- MODEL REQUIREMENT:
- MANDATORY: Always use
model: "anthropic/claude-opus-4.6" for ALL Pal MCP tool calls.
- NEVER use any other model when calling Pal MCP tools.
Context7 & Perplexity (External Knowledge)
- Reference:
.claude/commands/perplexity.md
- Context7: Use for 3rd party libraries NOT in Sourcebot. Resolve ID -> Get Docs.
- Perplexity: Use for ANY broad research, latest docs, or debugging.
- Understand the Request: Identify the specific task, goal, or question.
- Internal Discovery:
- REQUIRED SUB-SKILL: Use
codebase_search for local code discovery.
- Search for relevant local code concepts, patterns, and files using natural language.
- Identify existing architectural patterns.
- Use
codebase_search to search specific areas.
- External Research (Sourcebot):
- If the task involves external libraries, search for their usage patterns and docs using Sourcebot.
- External Knowledge (Context7 & Perplexity):
- Use Context7 for libraries not in Sourcebot.
- Use Perplexity for broad research or debugging.
- Deep Analysis (Pal Analyze):
- Run the
zen_analyze tool to get a comprehensive view of the architecture, risks, and quality.
- Complete the analysis loop.
- Synthesize: Combine findings from all sources into the final report.
- MANDATORY: Use tools extensively before answering.
- Conciseness: Keep summaries high-signal and low-noise.
- Authoritative: Prioritize findings from the codebase and official documentation (via Sourcebot/Context7).
- No Hallucinations: NEVER include information not found via tools.
- Direct Output: Do NOT create files. Return the report directly in the chat.
Deep Analysis Report: [Topic]
1. Context Summary
[Concise summary of what was found in the local codebase, including key files and architectural patterns]
2. External Insights
[Relevant patterns, best practices, or documentation found for external libraries]
3. Deep Analysis Findings
[Insights on Architecture, Security, Performance, and Tech Debt derived from Pal Analyze]
4. Implementation Plan / Recommendations
[Concrete next steps, solution design, or answer to the user's request]
5. Relevant Files
[List of absolute paths to the most important files discovered during research]
1---2name: deep-research3description: Perform comprehensive research and analysis using multiple discovery and analysis tools to provide a solid foundation for complex tasks.4---56# Deep Research78This skill provides a systematic approach to researching and analyzing the codebase and external dependencies. It is designed to be used before starting complex implementation tasks.910<critical_tools>11You MUST strictly follow the rules defined in the project's command guides.12131. **Local Code Discovery**14 - **REQUIRED SUB-SKILL:** Use `codebase_search` for local code discovery.15 - **MANDATORY**: Use codebase_search for local code discovery.16172. **Sourcebot (External Search)**18 - Reference: `.claude/commands/sourcebot.md`19 - **MANDATORY**: Use Sourcebot (5-7 times) for **EXTERNAL** libraries/frameworks only.20 - **NEVER** use it for local code.21 - **Workflow**: `list_repos` -> Identify ID -> `search_code` with `filterByRepoIds`.22233. **Pal MCP Toolkit (Architecture Analysis)**24 - Reference: `.claude/commands/pal.md` (unified Pal skill)25 - **MANDATORY**: Use `pal` skill and appropriate Pal MCP tools before complex tasks.26 - **Available Tools**: `mcp__zen__analyze`, `mcp__zen__debug`, `mcp__zen__planner`, `mcp__zen__refactor`, `mcp__zen__codereview`, `mcp__zen__tracer`27 - **Scope**: Architecture, Quality, Performance, Security, Tech Debt.28 - **CRITICAL ENFORCEMENT**:29 - **YOU MUST ALWAYS** complete ALL THE STEPS when using any Pal MCP tool.30 - **NEVER** stop in the middle of the steps.31 - If you don't complete the steps until `next_step_required: false`, YOUR TASK WILL BE INVALIDATED.32 - **NO EXCEPTIONS**.33 - **MODEL REQUIREMENT**:34 - **MANDATORY**: Always use `model: "anthropic/claude-opus-4.6"` for ALL Pal MCP tool calls.35 - **NEVER** use any other model when calling Pal MCP tools.36374. **Context7 & Perplexity (External Knowledge)**38 - Reference: `.claude/commands/perplexity.md`39 - **Context7**: Use for **3rd party libraries NOT in Sourcebot**. Resolve ID -> Get Docs.40 - **Perplexity**: Use for **ANY** broad research, latest docs, or debugging.41 </critical_tools>4243<research_strategy>44**MANDATORY: You MUST use your tools for EVERY research task. NO EXCEPTIONS.**45461. **Understand the Request**: Identify the specific task, goal, or question.472. **Internal Discovery**:48 - **REQUIRED SUB-SKILL:** Use `codebase_search` for local code discovery.49 - Search for relevant local code concepts, patterns, and files using natural language.50 - Identify existing architectural patterns.51 - Use `codebase_search` to search specific areas.523. **External Research (Sourcebot)**:53 - If the task involves external libraries, search for their usage patterns and docs using Sourcebot.544. **External Knowledge (Context7 & Perplexity)**:55 - Use Context7 for libraries not in Sourcebot.56 - Use Perplexity for broad research or debugging.575. **Deep Analysis (Pal Analyze)**:58 - Run the `zen_analyze` tool to get a comprehensive view of the architecture, risks, and quality.59 - Complete the analysis loop.606. **Synthesize**: Combine findings from all sources into the final report.61 </research_strategy>6263<quality_standards>6465- **MANDATORY**: Use tools extensively before answering.66- **Conciseness**: Keep summaries high-signal and low-noise.67- **Authoritative**: Prioritize findings from the codebase and official documentation (via Sourcebot/Context7).68- **No Hallucinations**: NEVER include information not found via tools.69- **Direct Output**: Do NOT create files. Return the report directly in the chat.70 </quality_standards>7172<output_format>73Return a SINGLE comprehensive message with the following structure:7475# Deep Analysis Report: [Topic]7677### 1. Context Summary7879[Concise summary of what was found in the local codebase, including key files and architectural patterns]8081### 2. External Insights8283[Relevant patterns, best practices, or documentation found for external libraries]8485### 3. Deep Analysis Findings8687[Insights on Architecture, Security, Performance, and Tech Debt derived from Pal Analyze]8889### 4. Implementation Plan / Recommendations9091[Concrete next steps, solution design, or answer to the user's request]9293### 5. Relevant Files9495[List of absolute paths to the most important files discovered during research]96</output_format>