If you're working with pre-defined business metrics like ARR, churn, or retention in ktx's data warehouse, this is your entry point. The semantic layer is a YAML catalog that wraps tables and views with reusable measures, computed columns, joins, and named segments. You read the schema to understand what's available, then use `sl_query` to generate correct SQL without worrying about join paths or fanout. It handles three flavors: overlays that enrich manifest tables, standalone table sources, and SQL sources. The skill is read-only for research agents. If you need to capture new patterns into the catalog, that's a separate `sl_capture` skill.

GitHub stars
1.1K
last updated
Jun 11, 2026

Install

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

Installs into .claude/skills of the current project.

Files

Semantic Layer

ktx's semantic layer (SL) is a structured catalog. Each source represents a table, a SQL view, or an overlay that enriches a manifest-backed table with measures, computed columns, joins, and named segments. The catalog is the single source of truth for reusable business metrics.

This skill covers two parts:

  • Part 1 - Schema reference (what an SL source looks like).
  • Part 2 - Querying via sl_query.

Capture (when and how to add new patterns to the SL) is a separate concern handled by the memory-agent - see the sl_capture skill if you are running in capture mode. The research agent reads and queries the SL via the tools described here; it does not write to it.

For capture-time identifier verification, load sl_capture. Synthesis writer skills must verify warehouse identifiers with discover_data, entity_details, and sql_execution before emitting table or column names.


Part 1 - Schema reference

Sponsors

Details

Repository
github.com/kaelio/ktx
Category
AI & Agent Building
License
Apache-2.0
First seen
Jun 11, 2026

More from kaelio/ktx

All 15
1kaelio avatarsl_capturekaelio/ktxHow to capture new reusable patterns into ktx's semantic layer - when a measure, segment, or join belongs in the catalog and how to write it generically so it s0skills.sh installs
2kaelio avatarwiki_capturekaelio/ktxktx's knowledge base - wiki pages for durable, reusable business knowledge. Covers capture workflow for user preferences, metric definitions, organizational con0skills.sh installs
3kostard avatarforgecad-model-graderkostard/forgecad-public-kitAnalyze, verify, and grade ForgeCAD or CAD-as-code models against a user requirement, design brief, prompt, reference, or acceptance criteria. Use when asked to0skills.sh installs
4malob avatarAI SDK Documentationmalob/nix-configIf you're working with Vercel's AI SDK, this gives Claude direct access to the current documentation at ai-sdk.dev instead of relying on...0skills.sh installs
5malob avatarmalo-find-skillsmalob/nix-configHelps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express int0skills.sh installs
6masharratt avatarcfn-error-managementmasharratt/claude-flow-noviceUnified error handling, batching, and logging for CFN Loop. Use when you need to capture agent errors, batch multiple errors for processing, log structured erro0skills.sh installs