kaelio avatar

Historic Sql Patterns

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.

GitHub stars
1.1K
last updated
Jun 11, 2026

Install

$ npx -y skills add kaelio/ktx --skill historic_sql_patterns --agent claude-code

Installs into .claude/skills of the current project.

Files

Historic SQL Patterns

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.

Required Workflow

  1. Read the WorkUnit notes first.
  2. Find the single pattern input file listed under the WorkUnit rawFiles section.
  3. Call read_raw_file for that exact raw file path.
  4. Identify recurring analytical intents that span at least two tables and have repeated usage signal.
  5. Emit one pattern evidence object per durable cross-table intent by calling emit_historic_sql_evidence.
  6. Stop after all pattern evidence has been emitted.

Every join column mentioned in pattern descriptions must be verified via entity_details for both sides of the join.

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.

Sponsors

Details

Repository
github.com/kaelio/ktx
Categories
Documentation, Databases
License
Apache-2.0
First seen
Jun 11, 2026

More from kaelio/ktx

All 15
1kaelio avatarnotion_synthesizekaelio/ktxSynthesize durable ktx wiki pages and semantic-layer sources from staged Notion pages, databases, data-source rows, and clustered Notion evidence. Load when a W0skills.sh installs
2linzzzzzz avatarvideo-clip-extractorlinzzzzzz/openclipProcesses videos to identify engaging moments, generate transcripts, and create highlight clips with artistic titles and custom cover images. Use when user need0skills.sh installs
3lukerenton avatarcore-brainstormlukerenton/explore-claude-codeCollaborative brainstorming mode for thinking through problems, ideas, and features before planning. Use when the user wants to discuss, explore ideas, or think0skills.sh installs
4malob avatarmcp-buildermalob/nix-configGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when b0skills.sh installs
5mc-zuri avatarcreate-analyzermc-zuri/mineflayer-bedrockCreate a new packet analyzer for Minecraft Bedrock logs. Generates template code, provides documentation links, and guides testing workflow.0skills.sh installs
6mertbuilds avatarimplementmertbuilds/skillsBuild a feature in an isolated worktrunk worktree, commit, and open a draft PR. Use whenever the user asks to implement, build, add, or fix something that touch0skills.sh installs