research-methodology

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Research Methodology for Documentation

技术文档研究方法论

This skill provides systematic approach to researching technical documentation using WebSearch and WebFetch tools.
本Skill提供了一套使用WebSearch和WebFetch工具研究技术文档的系统化方法。

Core Principles

核心原则

  1. Initialize first - Ensure project knowledge base skill exists
  2. Validate before research - Ensure request is specific enough
  3. Check local first - Look in
    .claude/skills/project-knowledge-base/references/
    before searching
  4. Official sources priority - Start with official docs
  5. Filter aggressively - Extract only what's relevant to context
  6. Save for reuse - Document findings in standard format
  1. 优先初始化 - 确保项目知识库Skill已存在
  2. 研究前验证 - 确保请求足够具体
  3. 优先检查本地 - 搜索前先查看
    .claude/skills/project-knowledge-base/references/
    目录
  4. 优先官方来源 - 从官方文档开始
  5. 严格过滤 - 仅提取与上下文相关的内容
  6. 保存以便复用 - 以标准格式记录研究结果

Request Validation

请求验证

A valid research request must contain three elements:
ElementExampleInvalid
Technology"React", "Effect", "Prisma""JavaScript library"
Topic"useEffect cleanup", "pipe operator""how it works"
Context"fixing memory leak in subscription""learning"
If any element is missing, return validation error and request clarification.
有效的研究请求必须包含三个要素:
要素示例无效示例
技术"React", "Effect", "Prisma""JavaScript库"
主题"useEffect cleanup", "pipe operator""它如何工作"
上下文"修复订阅中的内存泄漏""学习"
如果缺少任何要素,返回验证错误并请求澄清。

Search Strategy

搜索策略

Query Formulation

查询构建

Build queries progressively:
Level 1 (Official): {technology} official documentation {topic}
Level 2 (Tutorial): {technology} {topic} tutorial example
Level 3 (Problem): {technology} {topic} {error-message} solution
逐步构建查询:
Level 1 (Official): {technology} official documentation {topic}
Level 2 (Tutorial): {technology} {topic} tutorial example
Level 3 (Problem): {technology} {topic} {error-message} solution

Source Hierarchy

来源优先级

Prioritize sources in this order:
  1. Official documentation (always check first)
    • react.dev, docs.python.org, effect.website
    • GitHub official repos and examples
  2. Trusted secondary sources
    • MDN Web Docs (web technologies)
    • DigitalOcean Community tutorials
    • Dev.to (high-quality articles only)
    • Stack Overflow (accepted answers)
  3. Avoid
    • SEO-optimized content farms
    • Outdated tutorials (check dates)
    • AI-generated summaries
    • Forums without accepted solutions
按以下优先级选择来源:
  1. 官方文档(始终优先检查)
    • react.dev, docs.python.org, effect.website
    • GitHub官方仓库及示例
  2. 可信的二级来源
    • MDN Web Docs(Web技术)
    • DigitalOcean社区教程
    • Dev.to(仅高质量文章)
    • Stack Overflow(已采纳的答案)
  3. 需避免的来源
    • 经过SEO优化的内容农场
    • 过时的教程(注意检查日期)
    • AI生成的摘要
    • 无已采纳解决方案的论坛

WebSearch Patterns

WebSearch查询模式

Reference
references/query-patterns.md
for specific query templates per technology domain.
参考
references/query-patterns.md
获取各技术领域的特定查询模板。

Filtering Results

结果过滤

Relevance Criteria

相关性标准

Include information that:
  • Directly addresses the stated context
  • Provides actionable code examples
  • Explains common pitfalls for the use case
  • Is current (matches stated version or latest)
Exclude information that:
  • Is tangentially related
  • Covers advanced edge cases not needed
  • Is deprecated or version-mismatched
  • Duplicates what's already found
纳入符合以下条件的信息:
  • 直接针对所述上下文
  • 提供可执行的代码示例
  • 解释该使用场景下的常见陷阱
  • 内容最新(匹配指定版本或最新版本)
排除符合以下条件的信息:
  • 仅间接相关
  • 包含不需要的高级边缘场景
  • 已废弃或版本不匹配
  • 重复已找到的内容

Extraction Process

提取流程

  1. Scan search results for relevance
  2. Open 2-3 most promising sources
  3. Extract specific sections, not entire pages
  4. Verify code examples are complete
  5. Note version compatibility
  1. 扫描搜索结果以判断相关性
  2. 打开2-3个最有价值的来源
  3. 提取特定章节,而非整页内容
  4. 验证代码示例是否完整
  5. 记录版本兼容性

Document Format

文档格式

Save all knowledge files to
.claude/skills/project-knowledge-base/references/
using the template in
references/document-template.md
.
使用
references/document-template.md
中的模板,将所有知识文件保存至
.claude/skills/project-knowledge-base/references/
目录。

File Naming

文件命名

Format:
{technology}-{topic}.md
Examples:
  • react-useeffect-cleanup.md
  • effect-pipe-operator.md
  • prisma-relations.md
  • nextauth-jwt-session.md
Rules:
  • All lowercase
  • Hyphens between words
  • Technology first, then topic
  • No version numbers in filename
格式:
{technology}-{topic}.md
示例:
  • react-useeffect-cleanup.md
  • effect-pipe-operator.md
  • prisma-relations.md
  • nextauth-jwt-session.md
规则:
  • 全小写
  • 单词间用连字符连接
  • 先写技术名称,再写主题
  • 文件名中不包含版本号

Frontmatter Structure

前置元数据结构

Required fields in YAML frontmatter:
  • topic
    : Descriptive title
  • technology
    : Library/framework name
  • version
    : Version researched (or "latest")
  • sources
    : List of URLs used
  • created
    : Date in YYYY-MM-DD format
  • context
    : Original problem that triggered research
YAML前置元数据中的必填字段:
  • topic
    : 描述性标题
  • technology
    : 库/框架名称
  • version
    : 研究的版本(或"latest")
  • sources
    : 使用的URL列表
  • created
    : 创建日期,格式为YYYY-MM-DD
  • context
    : 触发研究的原始问题

Progressive Disclosure

渐进式披露

Threshold: 500 lines
When a reference file exceeds 500 lines, split into a tree structure:
references/tanstack-router.md  (>500 lines)
↓ split to
references/tanstack-router/
├── _index.md        # Overview + TOC linking to sub-files
├── route-guards.md
├── data-loading.md
└── navigation.md
阈值:500行
当参考文件超过500行时,拆分为树形结构:
references/tanstack-router.md  (>500 lines)
↓ split to
references/tanstack-router/
├── _index.md        # Overview + TOC linking to sub-files
├── route-guards.md
├── data-loading.md
└── navigation.md

When to Split

拆分时机

  • Single reference file exceeds 500 lines
  • Topic has clearly distinct sub-topics
  • Different aspects serve different use cases
  • 单个参考文件超过500行
  • 主题包含明确区分的子主题
  • 不同方面服务于不同的使用场景

Split Structure

拆分结构

  1. _index.md: Overview, quick reference, TOC with links
  2. Sub-files: One file per major sub-topic
  3. Cross-references: Link between related sub-files
  1. _index.md:概述、快速参考、带链接的目录
  2. 子文件:每个主要子主题对应一个文件
  3. 交叉引用:在相关子文件之间建立链接

SKILL.md Update

SKILL.md更新

After splitting, update SKILL.md index to reference
_index.md
:
markdown
- [tanstack-router](references/tanstack-router/_index.md) - TanStack Router comprehensive guide
拆分完成后,更新SKILL.md索引以引用
_index.md
markdown
- [tanstack-router](references/tanstack-router/_index.md) - TanStack Router comprehensive guide

Quality Checklist

质量检查清单

Before saving knowledge document, verify:
  • Project knowledge base skill initialized
  • Request was properly validated
  • Existing knowledge was checked first
  • Official sources were consulted
  • Content is specific to stated context
  • Code examples are complete and tested
  • Sources are cited
  • File follows naming convention
  • Frontmatter is complete
  • SKILL.md index updated
  • Progressive disclosure applied if >500 lines
在保存知识文档前,验证以下内容:
  • 项目知识库Skill已初始化
  • 请求已正确验证
  • 已优先检查现有知识
  • 已查阅官方来源
  • 内容与所述上下文相关
  • 代码示例完整且经过测试
  • 已引用来源
  • 文件符合命名规范
  • 前置元数据完整
  • 已更新SKILL.md索引
  • 若超过500行已应用渐进式披露

Additional Resources

额外资源

Reference Files

参考文件

  • references/query-patterns.md
    - Technology-specific search query templates
  • references/document-template.md
    - Complete knowledge document template
  • references/query-patterns.md
    - 各技术领域的特定查询模板
  • references/document-template.md
    - 完整的知识文档模板

Implementation Notes

实现说明

This methodology is designed for Haiku model execution. Instructions are explicit and procedural to ensure consistent results across model capabilities.
本方法论专为Haiku模型执行设计。指令明确且遵循流程,以确保在不同模型能力下都能得到一致的结果。