AgentSkillsCN

deep-research

运用多种搜索策略,对代码库中的某一主题展开深入研究。当您需要探究某项功能的实现原理、查找某一模式的所有使用场景,或深入了解系统的整体架构时,可使用此技能。

SKILL.md
--- frontmatter
name: deep-research
description: Conducts thorough research on a codebase topic using multiple search strategies. Use when investigating how something works, finding all usages of a pattern, or understanding system architecture.
context: fork
agent: Explore

Research topic

$ARGUMENTS

Research methodology

Phase 1: Discovery

  • Search for exact matches using Grep (function names, class names, constants)
  • Search for related patterns using Glob (file naming conventions, directory structures)
  • Identify entry points and core implementations

Phase 2: Exploration

  • Read identified files thoroughly
  • Trace dependencies and imports
  • Follow the call chain (callers and callees)
  • Check for tests that reveal intended behavior
  • Look for configuration files and environment variables

Phase 3: Cross-reference

  • Find all usages across the codebase
  • Identify patterns and variations
  • Note any inconsistencies or technical debt
  • Check documentation (README, comments, docs folder)

Phase 4: Synthesis

  • Connect the pieces into a coherent understanding
  • Identify the boundaries of the system/feature

Output format

Structure your findings as:

  1. Executive summary: 2-3 sentences answering the research question

  2. Key files: List the most important files with their roles

    • path/to/file.ts:42 - Brief description of relevance
  3. How it works: Explain the mechanism or architecture discovered

  4. Relationships: How does this connect to other parts of the codebase?

  5. Open questions: What remains unclear or needs further investigation?

Be specific with file paths and line numbers. Distinguish between facts found in code and inferences made.