
Surfaces cross-table SQL patterns from historic query logs, specifically hunting for analytical intents that span at least two tables and show repeated usage. It reads sharded pattern input files, verifies every join column through entity_details, and emits typed evidence records with slugs, narratives, and constituent template IDs. The workflow is strict: read the shard, identify durable cross-table intents, emit one pattern per intent, then stop. It won't write wikis or semantic layer sources itself, just produces the pattern evidence for downstream projection. The identifier verification protocol is thorough, requiring entity_details checks and sometimes SQL probes to confirm literals exist before committing anything to output. Good for mining institutional analytical knowledge from logs without inventing tables that don't exist.
$ npx -y skills add kaelio/ktx --skill historic_sql_patterns --agent claude-codeInstalls into .claude/skills of the current project.
Use this skill when the WorkUnit raw file is a patterns-input/part-0001.json style shard from the historic-sql adapter. Older staged bundles may still provide root patterns-input.json; when that is the WorkUnit raw file, read it the same way.
rawFiles section.read_raw_file for that exact raw file path.pattern evidence object per durable cross-table intent by calling emit_historic_sql_evidence.Every join column mentioned in pattern descriptions must be verified via entity_details for both sides of the join.
Before writing a wiki page or SL source on any topic:
discover_data({query: "<topic>"}) - see what wikis, SL sources, and raw
tables already exist. Prefer updating existing pages over creating new ones.Sponsors