architecture-knowledge-graph
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "architecture-knowledge-graph":https://skillpi.com/zh/skills/deepskill-64fc0864e7180edf4bb4066ef019a4ec22a8825fb67c36038c8b4333eeeaa690。安装前核对上游来源和版本:https://github.com/BV-Venky/excalidraw-architect-mcp。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
使用 Excalidraw Architect MCP kg_* 工具阅读代码库并构建高质量、持久化的架构知识图谱的指南。适用于创建或更新 .claude/architecture.md、映射服务及其依赖关系,或分析一个或多个仓库以捕获服务间通信方式。
介绍来源: third_party · BV-Venky · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 限制与区别
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: architecture-knowledge-graph
description: Guide for reading a codebase and building a high-quality, persistent architecture knowledge graph via the Excalidraw Architect MCP kg_* tools. Use when creating or updating the knowledge graph (.claude/architecture.md), mapping services and their dependencies, or analyzing one or more repos to capture how services communicate.Architecture Knowledge Graph Guide
This skill teaches you how to turn a codebase into a clean, durable knowledge
graph using the kg_* MCP tools. The graph (default .claude/architecture.md)
is the single source of truth; diagrams are rendered views of it.
Graph quality depends almost entirely on how well you read the code. The MCP preserves, validates, and renders whatever you put in — it does not analyze the codebase. That analysis is your job.
Core Principle
Model services/components and how they communicate, not classes, functions,
or every import. A "service" is a deployable unit / bounded context — one
repo, one container, one logical responsibility.
Workflow (do the passes in order — don't interleave)
kg_initonce (orkg_importto bootstrap from an existing.excalidraw).- Discovery pass — identify every service first. Add each with
kg_add_service, settingcomponent_type,domain, andownerwhile the info is in front of you (Dockerfiles,CODEOWNERS, READMEs, manifests). - Linking pass — only after all services exist, add edges with
kg_link. Linking before a target exists fails; that's why discovery comes first. kg_lint— catch dangling references, cycles, and single points of failure. Fix them before rendering.kg_render(whole graph) orkg_render_view/kg_render_around/kg_render_domainfor focused diagrams.
How to find the edges (where services talk)
Look for these signals and translate each into a labelled kg_link:
| Signal in code | Link | Label / style |
|---|---|---|
| HTTP client, base URL, OpenAPI/Swagger spec | sync call | "REST /orders", style: solid |
| gRPC stub / proto service | sync call | "gRPC GetOrder", style: solid |
| Kafka/SQS/RabbitMQ producer | async event | "Kafka order.created", style: dashed |
| Kafka/SQS/RabbitMQ consumer | async event (incoming) | label with the same topic |
| DB connection string / ORM config | datastore | "reads/writes", style: solid |
Service-discovery / env var (PAYMENTS_URL) |
dependency | name the protocol |
Cross-repo detection (multiple repos)
To connect services across repos, match a producer in repo A to a consumer in repo B using the shared join key:
- Async: topic / queue name (A publishes
order.created, B subscribesorder.created→kg_link order-svc -> fulfilment-svc "Kafka order.created" style=dashed). - Sync: the called service's route/host (A calls
https://payments/charge→ link A → payments).
Do a producer/consumer inventory across all repos before linking, so you don't miss an edge whose two ends live in different codebases.
Conventions (keep the graph consistent across sessions)
- Stable kebab-case ids, reused everywhere:
order-service— neverOrderServiceone session andordersthe next. Id drift silently corrupts a cumulative graph. - Every edge is labelled with the mechanism. No bare arrows between services.
- Style encodes transport:
solid= sync (REST/gRPC/DB),dashed= async (events/queues). Consistency makes diagrams instantly readable. - Set
domainto group services (team / bounded context / tier) so you can render one domain at a time.
Granularity
The full graph may be large, but any single rendered view should stay readable
(~6–15 services). If a domain has 20 services, render it per sub-domain with
kg_render_domain / kg_render_view rather than one giant picture. Resist
decomposing a service into its internal classes — that's a different diagram.
Known limitation: parallel edges
A dependency is keyed on (from_id, to_id), so a second kg_link between the
same pair replaces the first. If A talks to B two ways (REST and Kafka),
combine them into one label — "REST /orders · Kafka order.created" — or link
the primary transport. Don't issue two kg_link calls expecting two arrows.
Verify
Unlike diagrams, the graph is deterministically checkable. After building, run
whats_connected_to <service> and kg_lint to sanity-check the topology
matches your understanding of the system before sharing rendered views.
版本历史
-
v2.0.0
GitHub ↗
原版更新说明
### Highlights - 25 diagram types (was 2): sequence, swimlane, ER, state machine, timeline, Gantt, quadrant, funnel, Venn, flywheel, and hand-drawn bar/line/scatter. - Exports now render through a Python port of roughjs, so SVG/PNG match the Excalidraw canvas instead of being clean-geometry approximations. - New tools: `list_diagram_types`, `get_diagram_schema`. ### Compatibility - `create_diagram` parameter order changed (`output_path` first). MCP clients call by keyword and are unaffected; positional Python callers need updating. - Export output changed — SVG snapshot tests will show diffs.
-
v1.0.3
GitHub ↗
原版更新说明
The big one: **your architecture is now a living knowledge graph**, not just a diagram. This release turns the project from a diagram generator into a persistent, queryable model of your system — diagrams become *views* of it. ### 🧠 Architecture Knowledge Graph Your services and dependencies now live in a single version-controlled markdown file (default `.claude/architecture.md`) that the AI builds once and reuses everywhere. It's human-readable, round-trips losslessly, and diffs cleanly in PRs. - **One source of truth, many views** — render the full system, a single domain, or everything within N hops of one service - **Queryable** — "what breaks if payments goes down?" returns the real upstream blast radius - **Self-checking** — lint for dependency cycles, single points of failure, orphans, and dangling references - **Bootstrap from what you have** — import existing `.excalidraw` diagrams into the graph - **Export anywhere** — Mermaid, Graphviz DOT, or JSON - **Git-aware** — diff how the architecture changed since any ref; generate onboarding docs; detect drift against actual Python imports ### 🔀 Parallel edges Two communication modes between the same services (e.g. a solid `REST /charge` call **and** a dashed `Kafka payment.requested` event) now render as two distinct, labelled arrows instead of collapsing into one. ### 🛠️ New MCP tools (`kg_*`) `kg_init` · `kg_add_service` · `kg_remove_service` · `kg_link` · `kg_unlink` · `kg_set_domain` · `kg_info` · `kg_render` · `kg_render_view` · `kg_render_around` · `kg_render_domain` · `kg_import` · `whats_connected_to` · `kg_path` · `kg_lint` · `kg_export` · `kg_diff` · `kg_onboarding_doc` · `kg_drift` ### 🐛 Fixes - **Edge labels no longer overlap arrows** in SVG/PNG export — the line is now masked behind bound labels, matching Excalidraw's native rendering (improves every exported diagram) - **Fixed an infinite loop** in edge routing when two arrows share an endpoint ### 📚 Docs - New README section for the knowledge graph, with a `kg_*` tool reference - New `architecture-knowledge-graph` skill that teaches the AI how to read a codebase and build a clean graph ### ✅ Compatibility Fully additive — the existing tools (`create_diagram`, `mermaid_to_excalidraw`, `modify_diagram`, `get_diagram_info`, `export_diagram`) are unchanged. No breaking changes. ### 📦 Install / upgrade ```bash pip install -U excalidraw-architect-mcp # or, no install: uvx excalidraw-architect-mcp Full changelog: https://github.com/BV-Venky/excalidraw-architect-mcp/compare/v0.3.0...v1.0.3
-
v0.3.0
GitHub ↗
原版更新说明
feat: add export_diagram tool for SVG and PNG export by @nandanadileep ## What's Changed * feat: add export_diagram tool for SVG and PNG export (#13) by @nandanadileep in https://github.com/BV-Venky/excalidraw-architect-mcp/pull/14 ## New Contributors * @nandanadileep made their first contribution in https://github.com/BV-Venky/excalidraw-architect-mcp/pull/14 **Full Changelog**: https://github.com/BV-Venky/excalidraw-architect-mcp/compare/v0.2.3...v0.3.0
-
v0.2.3
GitHub ↗
原版更新说明
Users on Python 3.10 were facing issues wrt Annotations as it is not Compatible. This version fixes the compatibility issues
-
v0.2.2
GitHub ↗
原版更新说明
MCP Registration
此处仅展示最近 5 个版本。 在原站查看完整版本历史 ↗
当前收录版本
0.0.1
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供架构知识图谱构建的完整方法论,解决开发者实际痛点
- 适用于多仓库服务依赖分析,具有广泛实用价值
亮点
- 触发场景描述清晰完整,覆盖知识图谱创建、更新、服务映射等多种使用场景
- 边界定义明确,不易与其他Skill混淆
亮点
- 文档结构层次清晰,包含核心原则、工作流程、规范约定等完整章节
- 提供详细表格说明代码信号与图谱元素的映射关系,便于执行
亮点
- 工具调用顺序明确,参数说明详细,降低执行错误风险
- 包含验证机制(kg_lint)和已知限制说明,提高执行成功率
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- payments
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。