live_database_ingest

仓库创建 2026年5月11日最近提交 7 天前SkillHot 收录 20 天前
▸ 精选理由

适合需要把数据库架构变更及时反映到语义层的团队。

▸ 风险提示

需要数据库访问权限并可能读取敏感 schema 信息。

这个 Skill 做什么

从实时数据库快照捕获表与语义层的更新并写入 ktx。

从实时数据库的快照里捕获表结构和语义层的更新,把这些信息转成 ktx 供知识层使用。当 ingest 单元里有 raw-sources/<connectionId>/live-database/<syncId>/ 这类原始文件时启用,会读取 table JSON、connection.json 以及 foreign-keys.json 来还原表和关联关系。特别之处是能自动把 schema 快照和外键/join 信息梳理成语义层输入,减少手动对接工作。

▸ 展开 SKILL.md 英文原文

Capture semantic-layer and knowledge updates from a live database schema snapshot.

数据与抓取实时摄取数据库快照语义层通用
1.5k
Stars
96
Forks
17
仓库内 Skill
+49
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/Kaelio/ktx/main/packages/cli/src/skills/live_database_ingest/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/Kaelio/ktx/main/packages/cli/src/skills/live_database_ingest/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# Live Database Ingest

Use this skill when the ingest work unit contains raw files under
`raw-sources/<connectionId>/live-database/<syncId>/`.

## Workflow

1. Read the table JSON file listed in the work unit.
2. Read `connection.json` to understand the snapshot metadata.
3. Read `foreign-keys.json` when the table has a foreign key or when joins are
   needed for the semantic-layer source.
4. Create or update one semantic-layer source for the table with
   `sl_write_source`.
5. Use the physical table name from the raw JSON as the source `table` field.
6. Preserve database comments as `descriptions.db` on tables and columns.
7. Add joins only when the foreign key index names both sides.
8. W
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有