kb-linker
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "kb-linker" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-6f097abd13093e6f27f41489edd015bddad0c5a51e62ca23e47a6b09ed0f4a6c. Verify the upstream source and version against https://skillhub.cn/skills/user_99b045d5/s-k-009 before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
kb-linker: An automatic knowledge-card linking engine. Triggered by user commands such as 'establish card links / auto-link cards / connect knowledge cards / update card links / add related materials to a card.' Uses keyword co-occurrence matching to generate a 'related materials' section for each card and build a knowledge network. Intended for creating connections after digesting new cards or refreshing links after keyword-system updates; not intended for manual card content editing, creating new cards, or linking materials across knowledge bases.
Introduction source: third_party · user_99b045d5 · 1.0.4 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Inputs and outputs
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: kb-linker
description: 知识卡片自动关联引擎。当用户说"建立卡片关联"、"自动关联卡片"、"连接知识卡片"、"更新卡片关联"、"给卡片加关联资料"时触发。基于关键词共现匹配,自动为每张知识卡片生成「关联资料」小节,构建知识网络。适用于消化新卡片后建立连接、关键词体系更新后刷新关联。不适用于手动编辑卡片内容、创建新卡片、跨知识库资料关联。知识卡片自动关联引擎
概述
基于关键词共现匹配,自动发现知识卡片之间的隐含关联,为每张卡片写入「关联资料」小节。核心价值:把孤立的知识点编织成可导航的知识网络。
输入:knowledge_cards/ 目录下所有 km_*.md 卡片
输出:每张卡片的「关联资料」小节(自动写入或预览)
工作流程
扫描卡片 → 提取关键词 → 构建倒排索引 → 匹配关联 → 写入卡片
执行方式
# 预览模式(查看关联结果,不修改文件)
python3 scripts/link_cards.py \
--cards-dir knowledge_cards/
# 写入模式(实际更新卡片文件)
python3 scripts/link_cards.py \
--cards-dir knowledge_cards/ \
--update
# 仅更新指定卡片
python3 scripts/link_cards.py \
--cards-dir knowledge_cards/ \
--card km_016_xxx \
--update
关联算法
- 关键词提取:从每张卡片的「## 关键词」小节提取
`关键词`列表 - 倒排索引:构建 关键词 → 卡片ID列表 的映射
- 共现匹配:对每张卡片,计算与其他卡片共享关键词数量
- Top-N 选取:取共享关键词最多的前 5 张卡片作为关联推荐
- 写入文件:在卡片中生成/更新「## 关联资料」小节
关联资料格式
## 关联资料
- **目标卡片标题** `共享关键词1` `共享关键词2` (N个共享关键词)
使用时机
| 场景 | 说明 |
|---|---|
| 消化新卡片后 | 每次通过 kb-auto-digester 生成 ≥ 2 张新卡片后运行 |
| 关键词体系更新 | 批量修改卡片关键词后刷新关联 |
| 定期维护 | 每周运行一次,保持知识网络最新 |
与 kb-reviewer 配合
kb-linker 建立关联后,立即运行 kb-reviewer 可以:
- 看到新卡片是否融入知识网络(Q1 被引排名)
- 发现关联建立后仍有孤岛的卡片(Q3 孤岛检测)
- 确认关键词体系是否需要调整(Q2 趋势分析)
推荐执行顺序:
消化卡片 → 建立关联(kb-linker) → 复盘检查(kb-reviewer)
输出摘要
完成后报告:
- 扫描卡片总数 + 唯一关键词数
- 有至少一个关联的卡片数 / 总数
- 最高频共享关键词 Top 5
- 更新了文件的卡片数
异常处理
| 异常 | 处理 |
|---|---|
| 卡片目录为空 | 提示先执行 kb-auto-digester |
| 某卡片无关键词 | 跳过,在输出中标注"缺少关键词",建议手动补充 |
| 某卡片无任何关联 | 正常——可能是领域独特或关键词过少,在输出中标注 |
| 关键词全为中文/英文一种语言 | 正常——索引不分语言,统一用小写匹配 |
Current listing version
1.0.4
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决知识管理中的网络构建痛点,实用性强
- 使用场景明确,与 kb-reviewer 形成工作流闭环
- 有具体执行流程和配套工具脚本
Highlights
- 触发词覆盖多种表达变体,边界清晰
- 适用场景和不适用场景都有明确定义
Highlights
- Phase/步骤清晰,有端到端示例
- frontmatter 完整,有使用时机和异常处理表格
Highlights
- 工具来源明确,参数正确
- 有预览模式,覆盖主要异常场景
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.