返回 Skill 列表
extension
分类: 数据与分析无需 API Key

Knowledge Graph

通过添加或替换原子事实(items.)、重新生成实体摘要(summary.md)并保持 ID 一致,维护 Clawdbot 在 life/areas/** 下的复合知识图谱。适用于需要对知识图谱进行确定性更新而非手动编辑 JSON 的场景。

person作者: safatinaztepehubclawhub

Knowledge Graph (file-based)

Use the bundled Python script to safely update life/areas/**.

Commands

Add a new fact:

python3 skills/knowledge-graph/scripts/kg.py add \
  --entity people/safa \
  --category status \
  --fact "Runs Clawdbot on a Raspberry Pi" \
  --source conversation

Supersede an old fact (mark old as superseded + create new fact):

python3 skills/knowledge-graph/scripts/kg.py supersede \
  --entity people/safa \
  --old safa-002 \
  --category status \
  --fact "Moved Clawdbot from Pi to a Mac mini"

Regenerate an entity summary from active facts:

python3 skills/knowledge-graph/scripts/kg.py summarize --entity people/safa

Notes

  • Entities live under: life/areas/<kind>/<slug>/
  • Facts live in items.json (array). Summaries live in summary.md.
  • IDs auto-increment per entity: <slug>-001, <slug>-002, ...
  • Never delete facts; supersede them.