Token导航 LogoToken导航

Agent Skill · 研究检索

doc-analyzer(文档分析器)

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

doc-analyzer 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 54,843。

总安装 494周安装 20GitHub Stars 21下载 155核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:doc-analyzer(文档分析器)
来源仓库:https://github.com/matteocervelli/llms
仓库路径:skills/doc-analyzer
安装命令:
npx skills add https://github.com/matteocervelli/llms --skill doc-analyzer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/matteocervelli/llms --skill doc-analyzer

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

分析第三方库与框架文档,提取可操作的实现指导。适用于识别代码模式、最佳实践与集成策略。支持示例编译、陷阱标注与架构建议生成。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。需通过 GitHub 安装,适用于主流 AI 宿主平台调用。

doc-analyzer 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/doc-analyzer

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/matteocervelli/llms --skill doc-analyzer;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

doc-analyzer 怎么安装?

在终端执行 npx skills add https://github.com/matteocervelli/llms --skill doc-analyzer。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

doc-analyzer 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

doc-analyzer 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

doc-analyzer 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

doc-analyzer 用的人多吗?

公开数据是累计安装 494 次,近一周安装 20 次,下载 155 次,GitHub 21 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

doc-analyzer 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
doc-analyzer

文档分析器 · 本页

49421需要联网MIT有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Purpose

The doc-analyzer skill provides comprehensive capabilities for analyzing fetched library and framework documentation to extract actionable implementation guidance. This skill helps the Documentation Researcher agent identify relevant code patterns, best practices, common pitfalls, and integration strategies that enable high-quality feature implementations.

This skill emphasizes:

  • Pattern Recognition: Identify reusable code patterns and architectural approaches
  • Best Practice Extraction: Discover recommended practices from authoritative sources
  • Example Compilation: Collect and categorize working code examples
  • Pitfall Identification: Recognize common mistakes and antipatterns
  • Integration Guidance: Extract patterns for combining libraries and frameworks

The doc-analyzer skill ensures that documentation research provides practical, actionable guidance rather than raw documentation dumps.

When to Use

This skill auto-activates when the agent describes:

  • "Analyze documentation for..."
  • "Extract patterns from..."
  • "Identify best practices..."
  • "Find examples of..."
  • "Discover common pitfalls..."
  • "Extract API usage patterns..."
  • "Analyze integration approaches..."
  • "Identify security considerations..."

Provided Capabilities

1. Code Pattern Extraction

What it provides:

  • Initialization and setup patterns
  • Common usage patterns
  • Integration patterns between libraries
  • Configuration patterns
  • Testing patterns

Pattern Categories:

Initialization Patterns:

def extract_initialization_patterns(docs: dict) -> list:
    """
    Extract initialization and setup patterns from documentation.
    """
    keywords = [
        "setup", "initialize", "config", "configuration",
        "getting started", "first steps", "__init__", "setup.py"
    ]

    patterns = []
    for section in docs["sections"]:
        if contains_keywords(section, keywords):
            patterns.append({
                "type": "initialization",
                "title": section["title"],
                "code": extract_code_blocks(section),
                "description": section["description"],
                "prerequisites": extract_prerequisites(section)
            })

    return patterns

# Example extracted pattern
{
    "type": "initialization",
    "title": "FastAPI Application Setup",
    "code": """
from fastapi import FastAPI

app = FastAPI(
    title="My API",
    description="API description",
    version="1.0.0"
)
    """,
    "description": "Basic FastAPI application initialization with metadata",
    "prerequisites": ["fastapi installed", "Python 3.7+"]
}

Usage Patterns:

def extract_usage_patterns(docs: dict) -> list:
    """
    Extract common usage patterns from documentation.
    """
    keywords = [
        "example", "usage", "how to", "tutorial",
        "guide", "quickstart", "getting started"
    ]

    patterns = []
    for section in docs["sections"]:
        if contains_keywords(section, keywords):
            patterns.append({
                "type": "usage",
                "title": section["title"],
                "code": extract_code_blocks(section),
                "use_case": identify_use_case(section),
                "complexity": assess_complexity(section)
            })

    return patterns

Integration Patterns:

def extract_integration_patterns(docs: dict) -> list:
    """
    Extract patterns for integrating with other libraries.
    """
    keywords = [
        "integrate", "combination", "together", "with",
        "plugin", "middleware", "extension"
    ]

    patterns = []
    for section in docs["sections"]:
        if contains_keywords(section, keywords):
            patterns.append({
                "type": "integration",
                "libraries": identify_libraries(section),
                "pattern": section["title"],
                "code": extract_code_blocks(section),
                "compatibility": extract_compatibility(section)
            })

    return patterns

2. Best Practice Identification

What it provides:

  • Recommended practices from official documentation
  • Performance optimization techniques
  • Security best practices
  • Code organization recommendations
  • Testing strategies

Best Practice Categories:

Recommended Practices:

def extract_best_practices(docs: dict, category: str = "recommended") -> list:
    """
    Extract best practices from documentation.
    """
    # Keywords for different categories
    keywords = {
        "recommended": ["best practice", "recommended", "should", "prefer", "tip"],
        "avoid": ["avoid", "don't", "antipattern", "pitfall", "common mistake"],
        "performance": ["performance", "optimize", "efficient", "fast", "slow", "bottleneck"],
        "security": ["security", "secure", "vulnerability", "safety", "protect", "authentication"]
    }

    practices = []
    for section in docs["sections"]:
        if contains_keywords(section, keywords[category]):
            practices.append({
                "category": category,
                "practice": extract_practice_statement(section),
                "rationale": extract_rationale(section),
                "example": extract_code_example(section),
                "source": section["source_url"]
            })

    return practices

# Example extracted best practice
{
    "category": "recommended",
    "practice": "Use dependency injection for database connections",
    "rationale": "Enables testability and reduces coupling",
    "example": """
from fastapi import Depends

async def get_db():
    db = Database()
    try:
        yield db
    finally:
        await db.close()

@app.get("/items/")
async def read_items(db = Depends(get_db)):
    return db.query("SELECT * FROM items")
    """,
    "source": "https://fastapi.tiangolo.com/tutorial/dependencies/"
}

Performance Best Practices:

def extract_performance_practices(docs: dict) -> list:
    """
    Extract performance optimization practices.
    """
    keywords = ["performance", "optimize", "cache", "async", "efficient", "scalability"]

    practices = []
    for section in docs["sections"]:
        if contains_keywords(section, keywords):
            practices.append({
                "category": "performance",
                "optimization": section["title"],
                "technique": extract_technique(section),
                "impact": assess_performance_impact(section),
                "implementation": extract_code_blocks(section)
            })

    return practices

Security Best Practices:

def extract_security_practices(docs: dict) -> list:
    """
    Extract security best practices.
    """
    keywords = ["security", "secure", "authentication", "authorization", "vulnerability", "OWASP"]

    practices = []
    for section in docs["sections"]:
        if contains_keywords(section, keywords):
            practices.append({
                "category": "security",
                "security_concern": identify_concern(section),
                "mitigation": extract_mitigation(section),
                "implementation": extract_code_blocks(section),
                "owasp_category": map_to_owasp(section) if applicable else None
            })

    return practices

3. API Usage Example Compilation

What it provides:

  • Categorized code examples
  • Working, runnable code
  • Example annotations and explanations
  • Complexity ratings
  • Use case mapping

Example Extraction:

def extract_api_examples(docs: dict) -> list:
    """
    Extract and categorize API usage examples.
    """
    examples = []

    for section in docs["sections"]:
        code_blocks = extract_code_blocks(section)

        for code_block in code_blocks:
            examples.append({
                "api_element": identify_api_element(code_block),
                "use_case": infer_use_case(section["title"], code_block),
                "code": code_block["code"],
                "language": code_block["language"],
                "complexity": assess_complexity(code_block),
                "runnable": validate_runnability(code_block),
                "dependencies": extract_dependencies(code_block),
                "explanation": section["description"]
            })

    return examples

# Example output
{
    "api_element": "FastAPI.get decorator",
    "use_case": "Simple GET endpoint with path parameter",
    "code": """
@app.get("/items/{item_id}")
async def read_item(item_id: int, q: str = None):
    return {"item_id": item_id, "q": q}
    """,
    "language": "python",
    "complexity": "simple",
    "runnable": True,
    "dependencies": ["fastapi"],
    "explanation": "Defines a GET endpoint with a path parameter and optional query parameter"
}

Example Categorization:

def categorize_examples(examples: list) -> dict:
    """
    Categorize examples by complexity and use case.
    """
    categorized = {
        "basic": [],      # Simple, introductory examples
        "intermediate": [],  # Common patterns
        "advanced": [],   # Complex integrations
        "by_feature": {}  # Organized by feature
    }

    for example in examples:
        # By complexity
        categorized[example["complexity"]].append(example)

        # By feature
        feature = example["api_element"]
        if feature not in categorized["by_feature"]:
            categorized["by_feature"][feature] = []
        categorized["by_feature"][feature].append(example)

    return categorized

4. Common Pitfall Identification

What it provides:

  • Common mistakes and antipatterns
  • Error-prone patterns
  • Deprecated features
  • Version-specific gotchas
  • Migration pitfalls

Pitfall Detection:

def identify_pitfalls(docs: dict) -> list:
    """
    Identify common pitfalls from documentation.
    """
    keywords = [
        "avoid", "don't", "pitfall", "common mistake", "gotcha",
        "warning", "caution", "deprecated", "not recommended"
    ]

    pitfalls = []
    for section in docs["sections"]:
        if contains_keywords(section, keywords):
            pitfalls.append({
                "pitfall": extract_pitfall_description(section),
                "why_problematic": extract_reasoning(section),
                "incorrect_example": extract_incorrect_example(section),
                "correct_alternative": extract_correct_example(section),
                "severity": assess_severity(section)
            })

    return pitfalls

# Example identified pitfall
{
    "pitfall": "Blocking I/O in async functions",
    "why_problematic": "Blocks the event loop, preventing concurrent request handling",
    "incorrect_example": """
@app.get("/items/")
async def read_items():
    # ❌ Blocking database call in async function
    items = blocking_db_query("SELECT * FROM items")
    return items
    """,
    "correct_alternative": """
@app.get("/items/")
async def read_items():
    # ✅ Non-blocking async database call
    items = await async_db_query("SELECT * FROM items")
    return items
    """,
    "severity": "high"
}

5. Integration Strategy Extraction

What it provides:

  • Multi-library integration patterns
  • Middleware and plugin patterns
  • Configuration strategies
  • Dependency management

Integration Analysis:

def extract_integration_strategies(docs: dict, libraries: list) -> dict:
    """
    Extract strategies for integrating multiple libraries.
    """
    strategies = {}

    for lib in libraries:
        # Find integration mentions
        integration_sections = find_integration_sections(docs, lib)

        strategies[lib] = {
            "compatibility": extract_compatibility_info(integration_sections),
            "integration_pattern": extract_integration_pattern(integration_sections),
            "configuration": extract_configuration(integration_sections),
            "examples": extract_integration_examples(integration_sections),
            "known_issues": extract_known_issues(integration_sections)
        }

    return strategies

# Example integration strategy
{
    "library": "sqlalchemy",
    "compatibility": "Compatible with FastAPI via async support",
    "integration_pattern": "Dependency injection for database sessions",
    "configuration": {
        "database_url": "Configuration via environment variables",
        "engine_options": "async_engine with asyncpg driver"
    },
    "examples": [...],
    "known_issues": ["Connection pool management in async context"]
}

6. Version Compatibility Analysis

What it provides:

  • Breaking changes between versions
  • Deprecated features
  • Migration requirements
  • Version-specific considerations

Compatibility Detection:

def analyze_version_compatibility(docs: dict, current_version: str, target_version: str) -> dict:
    """
    Analyze compatibility between versions.
    """
    changelog = extract_changelog(docs)

    return {
        "current_version": current_version,
        "target_version": target_version,
        "breaking_changes": extract_breaking_changes(changelog, current_version, target_version),
        "deprecations": extract_deprecations(changelog, current_version, target_version),
        "new_features": extract_new_features(changelog, target_version),
        "migration_required": requires_migration(changelog, current_version, target_version),
        "migration_guide": extract_migration_guide(docs, current_version, target_version),
        "compatibility_notes": extract_compatibility_notes(docs)
    }

Usage Guide

Step 1: Receive Fetched Documentation

doc-fetcher completes → Fetched documentation → doc-analyzer input

Step 2: Extract Code Patterns

Documentation → Pattern recognition → Categorized patterns

Step 3: Identify Best Practices

Documentation → Best practice detection → Recommended/avoid lists

Step 4: Compile Examples

Code blocks → Extraction → Categorization → Example library

Step 5: Identify Pitfalls

Documentation → Pitfall detection → Antipattern catalog

Step 6: Analyze Integration

Multiple libraries → Integration patterns → Compatibility matrix

Step 7: Generate Analysis Summary

All analyses → Synthesis → Structured output

Best Practices

  1. Focus on Relevance

- Extract only patterns relevant to feature requirements - Prioritize commonly used patterns over edge cases - Filter examples by complexity appropriate to feature

  1. Validate Code Examples

- Verify examples are runnable - Check for required dependencies - Test examples if possible - Document prerequisites

  1. Prioritize Official Sources

- Official documentation takes precedence - Cross-reference multiple sources - Note source URL for all extracted content - Verify currency of information

  1. Categorize Systematically

- Use consistent categorization scheme - Tag with complexity level - Associate with use cases - Link related patterns

  1. Document Context

- Include version information - Note applicable scenarios - Document limitations - Provide rationale for recommendations

  1. Security-First Analysis

- Identify security considerations in all patterns - Extract security best practices explicitly - Flag potential vulnerabilities - Cross-reference with OWASP Top 10

Resources

pattern-extraction-guide.md

Comprehensive guide for pattern extraction:

  • Pattern recognition techniques
  • Code block parsing methods
  • Pattern categorization schemes
  • Example validation approaches
  • Integration pattern identification
  • Testing pattern extraction

best-practices-catalog.md

Catalog of best practices by framework:

  • Common best practices across frameworks
  • Framework-specific recommendations
  • Security patterns and practices
  • Performance optimization techniques
  • Testing best practices
  • Error handling patterns

Example Usage

Input (from Documentation Researcher agent):

"Analyze FastAPI documentation to extract API routing patterns, dependency injection examples, and Pydantic integration best practices."

Output (doc-analyzer skill provides):

# Comprehensive documentation analysis

analysis = {
    "library": "fastapi",
    "version": "0.100.0",

    "patterns": {
        "api_routing": [
            {
                "pattern": "Path parameter with type hint",
                "code": "@app.get('/items/{item_id}')\nasync def read_item(item_id: int): ...",
                "use_case": "REST API with typed path parameters",
                "complexity": "simple"
            },
            {
                "pattern": "Query parameters with defaults",
                "code": "@app.get('/items/')\nasync def read_items(skip: int = 0, limit: int = 10): ...",
                "use_case": "Pagination with query parameters",
                "complexity": "simple"
            }
        ],
        "dependency_injection": [
            {
                "pattern": "Database session dependency",
                "code": "def get_db():\n    db = Database()\n    try:\n        yield db\n    finally:\n        db.close()",
                "use_case": "Resource management with cleanup",
                "complexity": "intermediate"
            }
        ]
    },

    "best_practices": {
        "recommended": [
            {
                "practice": "Use async def for I/O-bound operations",
                "rationale": "Enables concurrent request handling",
                "example": "@app.get('/items/')\nasync def read_items(): ..."
            },
            {
                "practice": "Use Pydantic models for request/response validation",
                "rationale": "Automatic validation and documentation generation",
                "example": "class Item(BaseModel):\n    name: str\n    price: float"
            }
        ],
        "avoid": [
            {
                "antipattern": "Blocking I/O in async functions",
                "why_problematic": "Blocks event loop, kills performance",
                "alternative": "Use async database drivers and await calls"
            }
        ]
    },

    "examples": {
        "basic": [...],
        "intermediate": [...],
        "advanced": [...]
    },

    "integration": {
        "pydantic": {
            "compatibility": "Native integration, Pydantic v2 supported",
            "pattern": "Use BaseModel for all request/response schemas",
            "examples": [...]
        }
    },

    "version_notes": "FastAPI 0.100.0 requires Pydantic v2.x"
}

Integration

Used By:

  • @documentation-researcher (Primary) - Phase 2 sub-agent for documentation research

Integrates With:

  • doc-fetcher skill - Analyzes documentation fetched by doc-fetcher
  • prp-generator skill (Design Orchestrator) - Analysis feeds into PRP generation

Workflow Position:

  1. doc-fetcher skill fetches documentation (Step 3-4)
  2. doc-analyzer skill analyzes documentation (Step 5-6)
  3. Documentation summary compiled (Step 7)
  4. Design Orchestrator synthesizes into PRP

Version: 2.0.0 Auto-Activation: Yes Phase: 2 - Design & Planning Created: 2025-10-29

平台分布

Codex

30.76%
按下载量换算48

Gemini CLI

21.51%
按下载量换算33

OpenCode

20.69%
按下载量换算32

Antigravity

13.95%
按下载量换算22

Claude Code

7.73%
按下载量换算12

Cursor

3.69%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills