بنقرة واحدة
diagram-indexer
流程图精确索引工具:增量解析 Mermaid 和 Canvas 文件,避免全量读取。触发词:/diagram-index、流程图索引、图表索引
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
流程图精确索引工具:增量解析 Mermaid 和 Canvas 文件,避免全量读取。触发词:/diagram-index、流程图索引、图表索引
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Technology scouting and evaluation for tools, frameworks, libraries, and technical approaches. Use when users need to evaluate technology options, compare frameworks, assess technical feasibility, scout emerging technologies, or make build-vs-buy decisions. Produces structured comparison matrices with objective criteria scoring.
使用 Semantic Scholar API 检索和验证学术论文。支持并发多关键词搜索、批量 ID/DOI 查询、引用分析、批量补全摘要、统一 Markdown 导出。覆盖 2.14 亿+ 学术论文,无需 API Key 即可使用。触发词:论文检索、论文验证、Semantic Scholar、S2 搜索、查论文、补全摘要、导出MD
中文/英文写作风格迁移与错误记忆工作流。适用于论文、学位论文、报告等场景,提供 style profile、error log、长期记忆与多智能体写作闭环。
Use when user sends /skill复盘 or /迭代清单, or asks to review skill usage and iteration suggestions from the current conversation.
汇总所有 Claude Code Skills 的目录与使用指南,支持检查 GitHub 更新。触发词:/skills、技能目录、skill列表、有哪些技能、检查更新
[由 collaborating-hub 路由] Codex CLI 后端实现。直接使用请通过 /collab 或 /codex 触发 collaborating-hub。
| name | diagram-indexer |
| description | 流程图精确索引工具:增量解析 Mermaid 和 Canvas 文件,避免全量读取。触发词:/diagram-index、流程图索引、图表索引 |
对大型流程图文档进行精确索引,支持增量更新,避免全量读取。
/diagram-index| 格式 | 文件类型 | 解析方式 |
|---|---|---|
| Mermaid | .md 内嵌 | 正则提取 + mermaid.parse() |
| Obsidian Canvas | .canvas | 直接 JSON 解析 |
{
"version": "1.0",
"updated": "2026-01-20T17:00:00+08:00",
"files": {
"docs/CALL_FLOW/03-sequence.md": {
"mtime": 1705312345,
"type": "mermaid",
"diagrams": [
{
"type": "sequenceDiagram",
"line": 15,
"participants": ["User", "Frontend", "Contract"],
"messages": 12
}
]
},
"docs/CALL_FLOW/01-architecture.canvas": {
"mtime": 1705312400,
"type": "canvas",
"nodes": ["node-1", "node-2", "node-3"],
"edges": [{"from": "node-1", "to": "node-2"}]
}
}
}
1. 扫描目标目录
↓
2. 比对文件 mtime 与索引记录
↓
3. 仅解析变更文件
├─ .md → 提取 Mermaid 代码块 → 解析节点/边
└─ .canvas → JSON.parse → 提取 nodes/edges
↓
4. 更新索引文件
↓
5. 返回变更摘要
# 执行索引脚本
bun ~/.claude/skills/diagram-indexer/scripts/index.ts docs/CALL_FLOW
import { findNodeLocation } from './index';
// 查找节点 "User" 在哪些文件中出现
const locations = findNodeLocation(index, "User");
// 返回: [{ file: "docs/CALL_FLOW/03-sequence.md", line: 15 }]
# 仅更新变更文件
bun ~/.claude/skills/diagram-indexer/scripts/index.ts docs/CALL_FLOW --incremental
| 参数 | 说明 | 默认值 |
|---|---|---|
<dir> | 目标目录 | 必填 |
--incremental | 增量模式 | false |
--output <file> | 索引输出路径 | ./diagram-index.json |
--verbose | 详细输出 | false |
在对话中直接使用:
用户: 帮我更新 docs/CALL_FLOW 的流程图索引
Claude: [执行 diagram-indexer skill]
已扫描 17 个文件,更新 3 个变更文件
- 03-sequence.md: 新增 2 个参与者
- 01-architecture.canvas: 移动 1 个节点
mermaid npm 包(如需验证语法).gitignore