Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计通过

context-analyzer语境分析器

Agent Skill

context-analyzer 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,176

周安装

49

GitHub Stars

14

下载量

392
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/vladm3105/aidoc-flow-framework --skill context-analyzer

简介

扫描项目结构并建立智能文档创建的上下文模型。

  • 帮助 Agent 识别现有工件、追踪元数据和构建相关参考信息。
  • 适用于新项目文档启动或复杂系统维护场景。context-analyzer 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 分析过程可能读取多个目录和文件,请确认项目路径安全。
  • 输出结果依赖本地文件解析,不涉及网络请求但需文件访问权限。

SKILL.md

context-analyzer

Purpose

Scan project structure and build a context model for intelligent documentation creation.

Problem Solved: AI assistants lack awareness of project context, existing artifacts, and current workflow state when creating documentation, leading to missing references and duplicate content.

Solution: Analyze project directories, parse artifact metadata and traceability sections, and build a context model that surfaces relevant information for new document creation.

When to Use This Skill

Use context-analyzer when:

  • Starting documentation work in an existing project
  • Creating a new artifact that needs upstream references
  • Need to understand what documentation already exists
  • Want to identify gaps in documentation coverage
  • Preparing context for doc-* skill invocation

Do NOT use when:

  • Project has no existing documentation
  • Working on a single, isolated document
  • Full project audit needed (use trace-check instead)

Skill Inputs

InputTypeRequiredDescription
project_rootstringYesRoot path of the project to analyze
target_artifact_typestringNoArtifact type being created (e.g., "PRD", "SPEC")
depthstringNoAnalysis depth: "quick" (structure only), "standard" (default), "deep" (full content)

Skill Workflow

Step 1: Scan Project Structure

Enumerate all documentation artifacts by type and location:

Directory Patterns:

{project_root}/
├── docs/
│   ├── BRD/
│   ├── PRD/
│   ├── EARS/
│   ├── BDD/
│   ├── ADR/
│   ├── SYS/
│   ├── REQ/
│   ├── IMPL/
│   ├── CTR/
│   ├── SPEC/
│   └── TASKS/
└── ai_dev_flow/  (framework templates)

Artifact Discovery:

# Example discovery pattern
find {project_root}/docs -name "*.md" -o -name "*.yaml" -o -name "*.feature"

Output Structure:

artifact_inventory:
  BRD:
    count: 3
    files:
      - id: BRD-01
        path: docs/BRD/BRD-01_platform_foundation.md
        title: Platform Foundation
        status: Approved
      - id: BRD-02
        path: docs/BRD/BRD-02_partner_integration.md
        title: Partner Integration
        status: Draft
  PRD:
    count: 2
    files:
      - id: PRD-01
        path: docs/PRD/PRD-01_core_features.md
        title: Core Features
        status: In Review
  SPEC:
    count: 0
    files: []

Step 2: Parse Artifact Metadata

Extract metadata and key information from discovered artifacts:

YAML Frontmatter Extraction:

# From document header
---
title: "BRD-01: Platform Foundation"
tags:
  - platform-brd
  - shared-architecture
custom_fields:
  layer: 1
  artifact_type: BRD
  status: Approved
---

Document Control Extraction:

## Document Control

| Item | Details |
|------|---------|
| **Status** | Approved |
| **Version** | 2.1.0 |
| **Last Updated** | 2025-11-15 |

Parsed Metadata Model:

artifact_metadata:
  BRD-01:
    title: Platform Foundation
    layer: 1
    status: Approved
    version: 2.1.0
    last_updated: 2025-11-15
    tags: [platform-brd, shared-architecture]

Step 3: Extract Traceability Information

Parse Section 7 Traceability from each artifact:

Upstream Sources Extraction:

### Upstream Sources
| Source | Type | Reference |
|--------|------|-----------|
| [BRD-01](../BRD/BRD-01_platform.md#BRD-01) | Business Requirements | Platform foundation |

Downstream Artifacts Extraction:

### Downstream Artifacts
| Artifact | Type | Reference |
|----------|------|-----------|
| [SPEC-01](../SPEC/SPEC-01_api.yaml) | Technical Specification | API implementation |

Traceability Graph:

traceability_graph:
  BRD-01:
    upstream: []
    downstream: [PRD-01, PRD-00]
  PRD-01:
    upstream: [BRD-01]
    downstream: [EARS-01, SPEC-01]
  SPEC-01:
    upstream: [PRD-01, REQ-01]
    downstream: [TASKS-01]

Step 4: Determine Workflow Position

Calculate current position in SDD workflow:

Layer Mapping:

LayerArtifact TypeRequired Upstream
1BRDNone
2PRDBRD
3EARSPRD
4BDDEARS
5ADRBDD
6SYSADR
7REQSYS
8IMPLREQ (optional)
9CTRIMPL or REQ (optional)
10SPECREQ, optional IMPL/CTR
11TASKSSPEC

Position Analysis:

workflow_position:
  completed_layers: [1, 2, 3]
  current_layer: 4
  next_required: [BDD, ADR]
  gaps:
    - layer: 3
      type: EARS
      status: incomplete
      reason: "Only 2 of 5 PRD features have EARS coverage"

Step 5: Identify Upstream Candidates

For a target artifact type, identify relevant upstream documents:

Relevance Scoring:

FactorWeightDescription
Direct upstream50%Immediate predecessor in workflow
Topic match30%Key terms and domain alignment
Recency10%Recently updated documents
Status10%Approved documents preferred

Upstream Candidates Output:

upstream_candidates:
  target_type: SPEC
  candidates:
    - id: REQ-01
      relevance: 95%
      title: API Requirements
      reason: "Direct upstream, topic match: API, approved status"
    - id: REQ-02
      relevance: 80%
      title: Data Model Requirements
      reason: "Direct upstream, related topic: data"
    - id: ADR-005
      relevance: 70%
      title: API Architecture Decision
      reason: "Architecture context for API design"

Step 6: Extract Key Terms

Build project vocabulary from existing documentation:

Term Extraction Methods:

  • Document titles and headers
  • Glossary sections
  • Frequently used technical terms
  • Domain-specific vocabulary

Key Terms Output:

key_terms:
  domain_terms:
    - term: workflow
      frequency: 45
      documents: [BRD-01, PRD-01, REQ-01]
    - term: resource
      frequency: 32
      documents: [BRD-01, REQ-02, SPEC-01]
  technical_terms:
    - term: WebSocket
      frequency: 18
      documents: [ADR-003, SPEC-01]
    - term: PostgreSQL
      frequency: 12
      documents: [BRD-01, ADR-000]

Step 7: Build Context Model

Assemble complete context model for session use:

Complete Context Model:

context_model:
  project_root: /path/to/project
  scan_timestamp: 2025-11-29T14:30:00Z
  scan_depth: standard

  artifact_inventory:
    total_count: 25
    by_type:
      BRD: 3
      PRD: 5
      EARS: 4
      BDD: 6
      ADR: 3
      REQ: 4
      SPEC: 0
      TASKS: 0

  workflow_position:
    completed_layers: [1, 2, 3, 4, 5, 7]
    current_layer: 7
    ready_for: [SPEC, TASKS]
    gaps:
      - type: SYS
        status: missing
        impact: "SPEC creation may lack system context"

  upstream_candidates:
    target_type: SPEC
    primary:
      - id: REQ-01
        title: Core API Requirements
        relevance: 95%
    secondary:
      - id: ADR-003
        title: WebSocket Architecture
        relevance: 75%

  key_terms:
    domain: [workflow, resource, validation, processing]
    technical: [WebSocket, PostgreSQL, Redis, REST API]

  coverage_gaps:
    - area: Testing
      description: "BDD scenarios cover only 60% of EARS requirements"
    - area: Implementation
      description: "No SPEC or TASKS documents created yet"

Example Usage

Example 1: Pre-SPEC Context

User Request: "I'm about to create a SPEC document, what context do I have?"

Context Analysis:

context_summary:
  target: SPEC creation
  readiness: ready
  upstream_available:
    - REQ-01: Core API Requirements (Approved)
    - REQ-02: Data Model Requirements (Approved)
    - ADR-003: WebSocket Architecture (Approved)
  recommended_references:
    - "Reference REQ-01 for API endpoint specifications"
    - "Include ADR-003 for WebSocket implementation decisions"
  warnings:
    - "No CTR (contract) documents exist - consider if API contracts needed"

Example 2: Gap Analysis

User Request: "What documentation is missing in this project?"

Gap Analysis Output:

documentation_gaps:
  critical:
    - type: SYS
      reason: "No system requirements linking ADR to REQ"
      impact: "REQ documents may lack architectural context"
    - type: SPEC
      reason: "No technical specifications for implementation"
      impact: "Cannot proceed to code generation"
  moderate:
    - type: BDD
      coverage: 60%
      reason: "4 of 10 EARS requirements have BDD scenarios"
  low:
    - type: IMPL
      reason: "Implementation plan optional but recommended for complex projects"

Example 3: Quick Structure Check

User Request: "What docs exist in this project?"

Quick Scan Output (depth: quick):

project_structure:
  docs_directory: /project/docs
  artifact_counts:
    BRD: 3
    PRD: 5
    EARS: 4
    BDD: 6
    ADR: 3
    SYS: 0
    REQ: 4
    IMPL: 0
    CTR: 0
    SPEC: 0
    TASKS: 0
  total_artifacts: 25
  workflow_coverage: 50% (6 of 12 layers)

Integration with Other Skills

IntegrationDescription
skill-recommenderProvides project context for better recommendations
doc-* skillsSupplies upstream candidates and key terms
quality-advisorShares artifact inventory for validation
workflow-optimizerProvides workflow position data
trace-checkOverlaps with traceability extraction (uses trace-check for deep validation)

Quality Gates

Definition of Done

  • Project structure scanned successfully
  • All artifact types discovered
  • Metadata extracted from discovered artifacts
  • Traceability graph built
  • Workflow position calculated
  • Upstream candidates identified for target type
  • Context model assembled and returned

Performance Targets

MetricTarget
Quick scan latency<500ms
Standard scan latency<2s for 100 artifacts
Deep scan latency<5s for 100 artifacts
Memory usage<200MB for 100 artifacts

Traceability

Required Tags:

@prd: PRD.000.002
@adr: ADR-000

Upstream Sources

SourceTypeReference
PRD-00Product RequirementsPRD-00
ADR-000Architecture DecisionADR-000

Downstream Artifacts

ArtifactTypeReference
skill-recommenderSkill ConsumerUses context for better recommendations
doc-* skillsSkill ConsumerUses context for artifact creation

Version Information

Version: 1.0.0 Created: 2025-11-29 Status: Active Author: AI Dev Flow Framework Team

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.92%
按下载量换算113

Gemini CLI

22.57%
按下载量换算88

OpenCode

18.26%
按下载量换算72

Antigravity

13.93%
按下载量换算55

Codex

8.57%
按下载量换算34

windsurf

3.18%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills