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

knowledge-graph知识图谱

Agent Skill

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

总安装

8,158

周安装

330

GitHub Stars

229

下载量

2,561
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill knowledge-graph

简介

用于查找、检索和筛选相关信息。

  • 适合在关键词或任务场景下快速定位候选结果。
  • 可结合来源仓库和原始 README 核验具体用法。
  • 安装命令:npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill knowledge-graph。
  • 建议确认权限范围和维护状态后再使用。

SKILL.md

Knowledge Graph Skill

Overview

The Knowledge Graph (KG) is a persistent JSON file that stores discoveries from codebase analysis, eliminating redundant exploration and enabling task validation.

Location: docs/specs/[ID-feature]/knowledge-graph.json

Key Benefits:

  • ✅ Avoid re-exploring already-analyzed codebases
  • ✅ Validate task dependencies against actual codebase state
  • ✅ Share discoveries across team members
  • ✅ Accelerate task generation with cached context

When to Use

Use this skill when:

  1. spec-to-tasks needs to cache/reuse codebase analysis - Store agent discoveries for future reuse
  2. task-implementation needs to validate task dependencies and contracts - Check if required components exist before implementing
  3. Any command needs to query existing patterns/components/APIs - Retrieve cached codebase context
  4. Reducing redundant codebase exploration - Avoid re-analyzing already-explored code

Trigger phrases:

  • "Load knowledge graph"
  • "Query knowledge graph"
  • "Update knowledge graph"
  • "Validate against knowledge graph"
  • "Check if component exists"
  • "Find existing patterns"

Instructions

Available Operations

1. read-knowledge-graph - Load and parse KG for a specification

  • Input: Path to spec folder (e.g., docs/specs/001-feature/)
  • Output: KG object with metadata, patterns, components, APIs

2. query-knowledge-graph - Query specific sections (components, patterns, APIs)

  • Input: Spec folder, query type, optional filters
  • Output: Filtered results matching criteria

3. update-knowledge-graph - Update KG with new discoveries

  • Input: Spec folder, updates (partial KG), source description
  • Output: Merged KG with new findings

4. validate-against-knowledge-graph - Validate task dependencies against KG

  • Input: Spec folder, requirements (components, APIs, patterns)
  • Output: Validation report with errors/warnings

5. validate-contract - Validate provides/expects between tasks

  • Input: Spec folder, expects (files + symbols), completed dependencies
  • Output: Satisfied/unsatisfied expectations report

6. extract-provides - Extract symbols from implemented files

  • Input: Array of file paths
  • Output: Array of provides with file, symbols, type

7. aggregate-knowledge-graphs - Merge patterns from all specs

  • Input: Project root path
  • Output: Global KG with deduplicated patterns

See references/query-examples.md for detailed usage examples.

Examples

Input/Output Examples

Read Knowledge Graph:

Input: /knowledge-graph read docs/specs/001-hotel-search/
Output: {
  metadata: { spec_id: "001-hotel-search", version: "1.0" },
  patterns: { architectural: [...], conventions: [...] },
  components: { controllers: [...], services: [...]}
}

Query Components:

Input: /knowledge-graph query docs/specs/001-hotel-search/ components {"category": "services"}
Output: [{ id: "comp-svc-001", name: "HotelSearchService", type: "service"}]

Update Knowledge Graph:

Input: /knowledge-graph update docs/specs/001-hotel-search/ {
  patterns: { architectural: [{ name: "Repository Pattern"}] }
}
Output: "Added 1 pattern to knowledge graph"

Validate Dependencies:

Input: /knowledge-graph validate docs/specs/001-hotel-search/ {
  components: ["comp-repo-001"]
}
Output: { valid: true, errors: [], warnings: [] }

See references/examples.md for comprehensive workflow examples.

KG Schema Reference

See references/schema.md for complete JSON schema with examples.

Integration Patterns

See references/integration-patterns.md for detailed integration with Developer Kit commands.

Error Handling

See references/error-handling.md for comprehensive error handling strategies and recovery procedures.

Performance Considerations

See references/performance.md for optimization strategies and performance characteristics.

Security

See references/security.md for security considerations, threat mitigation, and best practices.

Best Practices

When to Query KG: Before codebase analysis, task generation, dependency validation

When to Update KG: After agent discoveries, component implementation, pattern discovery

KG Freshness:

  • < 7 days: Fresh
  • 7-30 days: Stale, warn user
  • 30 days: Very stale, offer regeneration

See references/performance.md and references/security.md for detailed best practices.

Constraints and Warnings

Critical Constraints

  • Source-Code Safe Operations: Does NOT modify source code files. Only creates/updates knowledge-graph.json files.
  • Path Validation: Only reads/writes KG files from docs/specs/[ID]/ paths.
  • No Automatic Code Generation: Caches analysis results, does NOT generate implementation code.

Limitations

  • Validation Scope: Checks components exist in KG, but cannot verify if they exist in actual codebase if KG is outdated
  • Freshness Dependency: KG accuracy depends on how recently it was updated
  • Single-Spec First: Each KG is primarily specific to a single specification
  • File Size: KG files can grow large (>1MB) for complex specifications

See references/error-handling.md and references/security.md for complete constraints and warnings.

Reference Files

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

33.78%
按下载量换算865

Claude

30.77%
按下载量换算788

Cursor

18.88%
按下载量换算484

Gemini CLI

9.12%
按下载量换算234

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills