live_database_ingest

live_database_ingest is a skill for Claude Code, Codex from Kaelio/ktx. It costs 18 tokens per session (777 once invoked), scanned A, original, Apache-2.0.

A workflow for importing table definitions and their documented relationships from a live database into a shared semantic layer, which gives data a consistent business meaning.

In plain words
What is it for?
Use it to read database snapshot files, preserve table and column comments, add verified foreign-key joins, update related wiki pages, and validate each imported table.
Why use it?
It prevents database structure and comments from being copied inaccurately or disconnected from existing documentation. It also checks that the imported table is valid before the work is finished.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

About the project

Kaelio/ktx is a context layer that helps AI agents query analytical databases using company knowledge, approved metrics, table metadata, and relationships between columns. Data teams use it to make warehouse queries more accurate and consistent with their organization's definitions. Its catalogue add-ons teach agents how to use ktx and its data-querying interfaces.

Kaelio/ktx · 1,573 stars · on GitHub · docs.kaelio.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/kaelio/ktx/live_database_ingest
Any agent
npx skills add Kaelio/ktx --skill live_database_ingest
Clone the repo
git clone --depth 1 https://github.com/Kaelio/ktx

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for live_database_ingest

README.md
[![agentmods](https://agentmods.dev/badge/skills/kaelio/ktx/live_database_ingest.svg)](https://agentmods.dev/skills/kaelio/ktx/live_database_ingest)
Your own site
<a href="https://agentmods.dev/skills/kaelio/ktx/live_database_ingest"><img src="https://agentmods.dev/badge/skills/kaelio/ktx/live_database_ingest.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 777 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00018 $0.00777
Opus 5 $0.00009 $0.00388
Sonnet 5 $0.00004 $0.00155
Haiku 4.5 $0.00002 $0.00078

Measured 6d ago against content hash a6c2fa0daf7d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

live_database_ingest scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/cli/src/skills/live_database_ingest/SKILL.md · 90 lines

How it starts

The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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. Write wiki pages only for durable business meaning that is present in table or column comments.
  9. Run sl_validate for the table source before the work unit completes.

Sample values come from the scan record; do not invent values not present in relationship-profile.json.

Identifier Verification Protocol

Before writing a wiki page or SL source on any topic:

  1. discover_data({query: "<topic>"}) - see what wikis, SL sources, and raw tables already exist. Prefer updating existing pages over creating new ones.

Before emitting any schema.table or schema.table.column into a wiki body, SL source, tables: frontmatter, sl_refs, or emit_unmapped_fallback:

  1. entity_details({connectionId, targets: [{display: "<identifier>"}]}) - confirm the identifier resolves; inspect native types, FK/PK, and sampleValues.
  2. For literal values from the source, such as status codes or plan tiers, check whether they appear in entity_details sampleValues for the relevant column. If sampleValues is short or the sample may have missed real values, run a sql_execution probe with the same warehouse connection id: sql_execution({connectionId, sql: "SELECT DISTINCT <col> FROM <ref> LIMIT 50"}).
  3. If the candidate identifier still does not resolve, do one of:
    • Use sql_execution({connectionId, sql: "SELECT 1 FROM <ref> LIMIT 0"}). If it errors, the identifier is fictional.
    • Wrap the identifier in [unverified - from <rawPath>] in the wiki body, citing the exact raw path that mentioned it.
    • When recording emit_unmapped_fallback with no_physical_table, include the failing probe error in clarification.
  4. Never copy <schema>.<table> placeholder strings from these instructions into output.

Read the full file on GitHub · 90 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 90 lines · 18 tokens per session scan A a6c2fa0daf7d

Subscribe to this mod's changes

live_database_ingest is a skill published in the GitHub repository Kaelio/ktx (1,573 stars, last pushed 2d ago), licensed Apache-2.0. It adds 18 tokens to every session and 777 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

analyzing-data

Queries the data warehouse with SQL and answers business questions about data. Use when answering anything that needs warehouse data - counts, metrics, trends, aggregations, joins across tables, data lookups, or ad-hoc SQL analysis (for example "who uses X", "how many Y", "show me Z", "find customers", "what is the…

astronomer/agents · 78 tokens

tracing-downstream-lineage

Trace downstream data lineage and impact analysis. Use when the user asks what depends on this data, what breaks if something changes, downstream dependencies, or needs to assess change risk before modifying a table or DAG.

astronomer/agents · 48 tokens

tracing-upstream-lineage

Trace upstream data lineage. Use when the user asks where data comes from, what feeds a table, upstream dependencies, data sources, or needs to understand data origins.

astronomer/agents · 40 tokens

profiling-tables

Deep-dive data profiling for a specific table. Use when the user asks to profile a table, wants statistics about a dataset, asks about data quality, or needs to understand a table's structure and content. Requires a table name.

astronomer/agents · 52 tokens

grain-confidence-reviewer

Surface grain-uniqueness CONFIDENCE as evidence and DIFF two source-map.yaml versions for a Mapping Ready reviewer in the Seshat BI repo. Use when someone asks "is the grain confident?", "what changed in this map?", or is about to review/approve a table's mapping. It READS the already-measured PK-uniqueness signal…

Kemetra/Seshat-BI · 175 tokens

source-mapping

Drive a raw retail source table through the source-mapping gate before any silver SQL exists. Use when someone asks to map, model, profile, or onboard a new bronze table toward Power BI in the Seshat BI repo -- profile the source, decide grain/PK, fill the five mapping artifacts into mappings/ /, and stop at the gate.…

Kemetra/Seshat-BI · 122 tokens