# Historic SQL Table Digest

Convert one changed historic-SQL table usage bucket into typed table usage evidence for...

- Repository: https://github.com/Kaelio/ktx (1627 stars)
- Category: Data and ML
- License: Apache-2.0
- Last updated: 2026-10-22
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Kaelio/ktx --skill historic_sql_table_digest -g -a claude-code -y`
Codex: `npx skills add Kaelio/ktx --skill historic_sql_table_digest -g -a codex -y`
Cursor: `npx skills add Kaelio/ktx --skill historic_sql_table_digest -g -a cursor -y`
Gemini CLI: `npx skills add Kaelio/ktx --skill historic_sql_table_digest -g -a gemini-cli -y`

## Description

Convert one changed historic-SQL table usage bucket into typed table usage evidence for deterministic _schema projection.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Historic SQL Table Digest

Use this skill when the WorkUnit raw file is one `tables/<schema>.<name>.json` file from the `historic-sql` adapter.

## Required Workflow

1. Read the WorkUnit notes first.
2. Call `read_raw_file` for the single `tables/<schema>.<name>.json` raw file.
3. Read `manifest.json` only if the table JSON omits the dialect or the WorkUnit notes are unclear.
4. Produce one concise usage narrative for this table from the staged table JSON.
5. Call `emit_historic_sql_evidence` exactly once with `kind: "table_usage"`.
6. Stop after the evidence tool succeeds.

## 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`:

The rest: https://github.com/Kaelio/ktx/blob/HEAD/packages/cli/src/skills/historic_sql_table_digest/SKILL.md
