Логотип Sl

Sl

ОрганізаціяПопулярне
Kaelio
sl

Семантичний шар ktx — структурований каталог джерел (таблиць/представлень), показників, об’єднань і сегментів у форматі YAML. Описує схему та способи запитів до неї через `sl_query`. Використовуйте, коли потрібно отримати попередньо визначені метрики (ARR, churn, retention, LTV, MAU) або прочитати YAML джерела SL, щоб зрозуміти каталог. Збір даних виконує навичка `sl_capture` (лише memory-agent).

Add to TypingMind

Огляд

ВидавецьKaelio
Репозиторійktx
Назва навичкиsl
Зірки
1.6K
Форки
104
Файли в пакеті
Лише інструкції
ЛіцензіяApache-2.0
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Усе необхідне — в інструкціях

    Усе потрібне моделі міститься в інструкціях — жодних додаткових файлів для синхронізації.

  • Відкритий вихідний код

    Видавець на GitHub: Kaelio. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Sl у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/Kaelio/ktx/tree/main/packages/cli/src/skills/sl
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Kaelio/ktx.git /tmp/ktx
mkdir -p .claude/skills
cp -r /tmp/ktx/packages/cli/src/skills/sl .claude/skills/sl
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Sl в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Sl, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Sl не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

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

An SL source is a YAML file under semantic-layer/<connectionId>/. The file's name: field is the source's identity — it mirrors the warehouse identifier verbatim (e.g. Snowflake's uppercase SIGNED_UP); the filename is only a derived label. Always address sources by name through the sl_* tools, never by file path. There are three flavors:

Overlay sources

Enrich a manifest-backed table with measures, computed columns, joins, and segments. No table or sql field. The base table's columns and grain are inherited from the manifest.

yaml
name: fct_orders           # must match an existing manifest table
descriptions:
  user: "Overlay adding business measures to the orders fact table."
measures:
  - name: total_revenue
    expr: sum(amount)
    description: Total order revenue - filter by status or region at query time
columns:                    # computed dimensions only
  - name: is_large_order
    type: boolean
    expr: "amount > 1000"
column_overrides:           # metadata patches for inherited columns
  - name: status
    descriptions:
      user: "Order lifecycle status."
segments:
  - name: paid_non_refunded
    expr: "is_paid = true AND is_refunded = false"
joins:
  - to: customers
    on: "customer_id = customers.id"
    relationship: many_to_one

Rules:

  • Do not repeat base-table columns, grain, table, or source_type in an overlay - those are inherited.
  • Overlay columns MUST be computed (expr + type).
  • Use column_overrides to add descriptions or metadata to inherited manifest columns. Do not put type or expr in column_overrides.
  • exclude_columns hides specific manifest columns; disable_joins suppresses specific auto-detected joins.

Standalone table sources

Self-contained; own their schema. Has source_type: table and table:.

yaml
name: account_health_scores
source_type: table
table: "analytics.account_health_scores"
grain: [account_id, snapshot_date]
columns:
  - name: account_id
    type: string
  - name: snapshot_date
    type: time
    role: time
  - name: health_score
    type: number
measures:
  - name: avg_health_score
    expr: avg(health_score)

Standalone SQL sources

Self-contained; schema derived from a SQL query. Has source_type: sql and sql:.

yaml
name: monthly_cancellations
source_type: sql
sql: |
  SELECT
    date_trunc('month', cancelled_at) AS month,
    customer_id,
    plan_name,
    mrr_amount
  FROM subscriptions
  WHERE status = 'cancelled'
grain: [customer_id, month]
columns:
  - name: month
    type: time
    role: time
  - name: customer_id
    type: string
  - name: plan_name
    type: string
  - name: mrr_amount
    type: number
measures:
  - name: cancellation_count
    expr: count(*)

An SQL source is a one-shot answer: the aggregation is frozen, callers cannot re-group or re-filter by columns the SQL has collapsed, and the source is disconnected from the join graph. Prefer overlays + measures over SQL sources when possible - the sl_capture skill covers when SQL is justified.

Columns

Every standalone column requires name and type. Overlays have computed columns in columns: and manifest column metadata patches in column_overrides:.

  • type: one of string, number, boolean, time. Map LookML date/datetime/timestamp → time. Map LookML yesno → boolean.
  • role (optional): time enables time-granularity queries (month, week, day). default is the implicit fallback.
  • visibility (optional): public, internal, or hidden.
  • expr (optional for standalone, required for overlay columns): SQL expression that computes the value. Expanded by sqlglot before generating SQL, so you can reference other columns on the same source.

Grain

grain: [col_a, col_b] - the set of columns that uniquely identify one row. The query engine uses grain to prevent fanout in joins. Overlays inherit grain from the manifest unless they override.

Joins

yaml
joins:
  - to: customers                                    # target source name
    on: "customer_id = customers.id"                 # local_col = TARGET.target_col
    relationship: many_to_one                        # or one_to_many, one_to_one
    alias: primary_customer                          # optional - lets you join the same target twice
  • on format: local_col = TARGET.target_col. Always qualify the right side with the target source name.
  • relationship is the cardinality from this source to the target. Most joins are many_to_one (FK → PK on the parent).

Measures

yaml
measures:
  - name: total_arr
    expr: sum(arr_amount)
    description: Sum of ARR - filter by plan_name at query time
    filter: "is_active = true"
    segments: [paid_non_refunded]
  • name (required, snake_case).
  • expr (required): any valid SQL aggregate - sum(x), count(*), count(distinct user_id), avg(score).
  • description (required on capture): what the measure computes and how to use it.
  • filter (optional): SQL predicate applied as a WHERE clause specific to this measure.
  • segments (optional): names of segments defined on the same source. The engine AND-composes each segment's expr into this measure's effective filter.

Use safe_divide(num, den) for ratio measures to avoid division by zero.

Segments

yaml
segments:
  - name: paid_non_refunded
    expr: "is_paid = true AND is_refunded = false"
    description: Orders that were paid and not refunded

Named, reusable boolean predicates scoped to one source. Reference by bare name in a measure's segments: [], or by dotted form source.segment_name in an sl_query. Segments are predicates only - they are NOT selectable as dimensions. If you need to group by the predicate, add a columns[] entry instead.

Cross-references with the wiki

The reverse edge (wiki pages that cite this source) is derived automatically from each wiki's sl_refs: - you don't emit anything on the SL side. Author the edge once on the wiki via sl_refs:; the post-write reconciler populates the knowledge↔SL index.


Part 2 - Querying via sl_query

The sl_query tool generates correct SQL from a structured query. It handles joins, fanout prevention, aggregation correctness, and filter classification automatically. Prefer it over writing raw SQL whenever the SL has the relevant sources.

When to prefer sl_query over raw SQL

  • A pre-defined measure already exists (source.measure_name appears in the catalog).
  • The question combines fields from multiple sources - the engine resolves the join path automatically.
  • The question asks for a standard metric (revenue, ARR, churn, retention, LTV, conversion, MAU, etc.) - even if no pre-defined measure exists, a runtime aggregation over a catalog column is usually correct.

Use raw SQL (sql_execution) only when:

  • The computation requires multi-step CTEs whose intermediate grain is not a column in any source.
  • The question explicitly asks for a one-off exploration that will never be asked again.

Input shape

json
{
  "connectionId": "uuid-of-the-connection",
  "measures": ["orders.total_revenue", "sum(orders.amount)"],
  "dimensions": ["customers.segment", { "field": "orders.created_at", "granularity": "month" }],
  "filters": ["orders.status != 'cancelled'", "orders.total_revenue > 10000"],
  "segments": ["orders.paid_non_refunded"],
  "order_by": [{ "field": "orders.created_at", "direction": "desc" }],
  "limit": 1000
}
  • measures: mix pre-defined refs (source.measure) and runtime aggregations (sum(source.column)).
  • dimensions: column refs or { field, granularity } objects for time grains (day, week, month, quarter, year).
  • filters: free-form SQL predicates. The engine auto-classifies each as WHERE or HAVING based on whether it references an aggregated measure.
  • segments: dotted source.segment_name. Each segment is AND-ed into the effective filter of every measure whose base source matches. Segments never become a global WHERE - use filters for cross-source predicates.
  • order_by: string or { field, direction }. Direction defaults to asc.
  • limit: integer row cap.

Join resolution

You don't specify a base table. The engine infers the set of sources needed from the fields you reference and resolves the shortest join path through the catalog's declared joins. If no path exists between two sources, the query fails with a path-not-found error - check discover_data or sl_discover to see which sources are connected.

Worked examples

Cross-source query - engine resolves account_health_scores → accounts ← opportunities automatically:

json
{
  "measures": ["account_health_scores.avg_health_score"],
  "dimensions": ["opportunities.stage"],
  "filters": ["opportunities.stage != 'Closed Won'"]
}

Monthly ARR trend with a segment:

json
{
  "measures": ["subscriptions.arr"],
  "dimensions": [{ "field": "subscriptions.month", "granularity": "month" }],
  "segments": ["subscriptions.paid_non_refunded"],
  "order_by": [{ "field": "subscriptions.month", "direction": "asc" }]
}

Multi-source with runtime aggregation:

json
{
  "measures": ["sum(orders.amount)", "count(support_tickets.ticket_id)"],
  "dimensions": ["customers.segment"]
}

Поширені запитання

Що робить навичка ШІ Sl?

Семантичний шар ktx — структурований каталог джерел (таблиць/представлень), показників, об’єднань і сегментів у форматі YAML. Описує схему та способи запитів до неї через `sl_query`. Використовуйте, коли потрібно отримати попередньо визначені метрики (ARR, churn, retention, LTV, MAU) або прочитати YAML джерела SL, щоб зрозуміти каталог. Збір даних виконує навичка `sl_capture` (лише memory-agent).

Навіщо використовувати Sl у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Sl — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Sl у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/Kaelio/ktx/tree/main/packages/cli/src/skills/sl. TypingMind прочитає файл SKILL.md і встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Sl?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Sl?

Зі скількома забажаєте. У TypingMind ви можете використовувати Sl із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Sl?

Так. На GitHub цю навичку публікує Kaelio за ліцензією Apache-2.0. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі
Логотип garrytan

Landing Report

garrytan
СпільнотаПопулярне

Панель черги лише для читання для розгортання з урахуванням робочого простору. (gstack)

19.9K
133.5K
Файлів: 1
Відкрити
Логотип garrytan

Gstack Openclaw Ceo Review

garrytan
СпільнотаПопулярне

Використовуйте, коли вас просять перевірити план, поставити під сумнів пропозицію, провести рев’ю з позиції CEO, знайти слабкі місця в підході, ширше поглянути на обсяг робіт або вирішити, чи варто розширити або скоротити план.

19.9K
133.5K
Інструкції
Відкрити
Логотип JuliusBrussee

Caveman Stats

JuliusBrussee
СпільнотаПопулярне

Показує записане використання токенів у виводі та зчитування з кешу, а також атрибуцію режиму для поточного сеансу Claude Code або знаходить вбудований звіт про використання на хості. Виклик: /caveman-stats.

6.2K
106.3K
Інструкції
Відкрити
Логотип pytorch

Ci Metrics

pytorch
ОрганізаціяПопулярне

Отримуйте дані про CI PyTorch, GitHub Actions, HUD, Grafana та інфраструктурні метрики. Використовуйте цю навичку, коли користувачі запитують про тривалість CI, збої завдань, час очікування в черзі, тенденції робочих процесів, стан раннерів, дані…

31K
103.6K
Файлів: 1
Відкрити

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇