Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

bsl-query-expert

БесплатноБез исполняемых скриптовНе проверен

Query BSL semantic models with group_by, aggregate, filter, and visualizations. Use for data analysis from existing semantic tables.

boringdataот boringdata★ 495 звёзд на GitHub20 установок в других каталогах

Об этом скилле

BSL Query Expert

Query semantic models using BSL. Be concise.

Workflow

  1. list_models() → discover available models
  2. get_model(name) → get schema (REQUIRED before querying)
  3. get_documentation("query-methods") → call before first query to learn syntax
  4. query_model(query) → execute, auto-displays results
  5. Brief summary (1-2 sentences max)

Behavior

  • Execute queries immediately - don't show code to user
  • Never stop after listing models - proceed to query
  • Charts/tables auto-display - don't print data inline
  • Reuse context: Don't re-call tools if info already in context
  • IMPORTANT: If query fails → call get_documentation("query-methods") to learn correct syntax before retrying

CRITICAL: Field Names

  • Use EXACT names from get_model() output
  • Joined columns: t.customers.country (not t.customer_id.country())
  • Direct columns: t.region (not t.model.region)
  • NEVER invent methods on columns - they don't exist!

CRITICAL: Never Guess Filter Values

  • WRONG: .filter(lambda t: t.region.isin(["US", "EU"])) without checking actual values first
  • Data uses codes/IDs that differ from what you expect (e.g., "California" might be "CA" or "US-CA")
  • Always discover values first, then filter with real data

Multi-Hop Query Pattern

When filtering by names/locations/categories you haven't seen:

Step 1 (discover): query_model(query="model.group_by('region').aggregate('count')", records_limit=50, get_chart=false)
Step 2 (filter):   query_model(query="model.filter(lambda t: t.region.isin(['CA','NY'])).group_by('region').aggregate('count')", get_records=false)
  • Step 1: Get data to LLM (records_limit=50), hide chart (get_chart=false)
  • Step 2: Display to user (get_records=false), show chart (default)

query_model Parameters

  • get_records=true (default): Return data to LLM, table auto-displays
  • get_records=false: Display-only, no data returned to LLM
  • records_limit=N: Max records to LLM (increase for discovery queries)
  • get_chart=true (default): Show chart; false for table-only

CRITICAL: Exploration vs Final Query

  • Discovery/exploration queries: Use get_chart=false - no chart when exploring data values
  • Final answer query: Use get_chart=true (default) - show chart for user's answer
  • Example: Looking up airport codes? → get_chart=false. Final flight count? → chart enabled

Charts

  • Default: Omit chart_spec - auto-detect handles most cases
  • Override only if needed: chart_spec={"chart_type": "line"} or "bar"
  • CRITICAL: Charting only works on BSL SemanticQuery results (after group_by + aggregate)
  • If you use filter-only queries (returns Ibis Table), set get_chart=false - charts will fail on raw tables

Time Dimensions

  • Use .truncate() for time columns: with_dimensions(year=lambda t: t.date.truncate("Y"))
  • Units: "Y", "Q", "M", "W", "D", "h", "m", "s"

CRITICAL: Case Expressions

  • Use ibis.cases() (PLURAL) - NOT ibis.case()
  • Syntax: ibis.cases((condition1, value1), (condition2, value2), else_=default)
  • Example: ibis.cases((t.value > 100, "high"), (t.value > 50, "medium"), else_="low")

Help

get_documentation(topic) for:

  • Core: getting-started, semantic-table, yaml-config, profile, compose, query-methods
  • Advanced: windowing, bucketing, nested-subtotals, percentage-total, indexing, sessionized, comparison
  • Charts: charting, charting-altair, charting-plotly, charting-plotext

Additional Information

Available documentation:

Полный SKILL.md на GitHub

Установить bsl-query-expert в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл bsl-query-expert?

Query BSL semantic models with group_by, aggregate, filter, and visualizations. Use for data analysis from existing semantic tables.

Как установить скилл bsl-query-expert?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл bsl-query-expert запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить bsl-query-expert с