sqlmesh

Query and manage SQLMesh models in GitLab through read lookups and Draft merge requests.

Updated Jul 24, 2026
One-click install
npx skills add https://github.com/eklyukin/my-ai-config --skill sqlmesh-eklyukin
Or copy as Structured Prompt for Agentβ–Ό
Please help me install this Agent Skill.
Skill: sqlmesh
Source: https://github.com/eklyukin/my-ai-config/tree/main/skills/sqlmesh
Command: npx skills add https://github.com/eklyukin/my-ai-config --skill sqlmesh-eklyukin

SYSTEM DOCUMENTATION & REQUIREMENTS

πŸ’‘ This Skill includes scripts (resource) components.

What problem does it solve? Analysts need to answer questions about SQLMesh models (data marts) and make changes to them in the data-platform/sqlmesh GitLab repo without manually navigating the GitLab API, learning repo conventions, or risking unreviewed production changes. ## Core Features & Use Cases - Read mode: Answer lookup questions directly from the repo β€” who owns a model, list models by owner, count active (non-disabled) models, and find downstream dependencies of a model. - Write mode: Turn a change request into a CONTRIBUTING.md-conformant Draft MR targeting staging β€” edit cron/owner/grain/kind, add audits, or create new models β€” with CI validating via sqlmesh plan. - Safety guardrails: Analyst edits restricted to analytics and transfer layers, Draft-only MRs (never merge, never apply), mandatory Jira codes, and user-credential GitLab calls. - Use Case: A user asks "Schedule revenue_main_revenue every Monday 08:00 UTC (DWH-1234)" β€” the skill locates the model file, updates the cron, and opens a Draft MR titled Draft: refactor[DWH-1234]: reschedule revenue_main_revenue against staging. ## Quick Start Ask the assistant to set the table from your Jira ticket to auto-update, or ask who owns a specific data mart in the sqlmesh repo.

Frequently Asked Questions about sqlmesh

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I schedule a SQLMesh model to auto-update?β–Ό

Ask to set the table to auto-update with a Jira code, and the skill edits the model's cron property (always in UTC) and opens a Draft MR against the staging branch. CI validates the change with sqlmesh plan before review.

How do I find who owns a SQLMesh model or data mart?β–Ό

The skill searches the data-platform/sqlmesh repo via the GitLab blob search API for the model name, reads the file, and extracts the owner value from the MODEL block. It replies with the owner string and the full model name.

Can I edit raw or stage layer models with this skill?β–Ό

No. Analyst edits are restricted to the analytics and transfer layers only. The raw and stage layers are DBA-owned, and the skill refuses those edits and surfaces that restriction as the reason.

Does the skill merge or apply SQLMesh plans directly?β–Ό

No. It only creates Draft merge requests prefixed with "Draft:" targeting the staging branch. It never merges MRs, never applies plans, and never runs models against the warehouse; CI runs sqlmesh plan for validation.

Why is a Jira code required for SQLMesh model changes?β–Ό

A Jira code is mandatory for all analyst changes because branch names, commits, and MR titles follow the {type}/{JIRA} convention. The skill asks for the code if missing and never invents one or uses the codeless auto type.

How do I find which models depend on my SQLMesh model?β–Ό

The skill searches the repo for your model's qualified schema.model name, filters results to .sql files under models/, and confirms genuine FROM or JOIN references. It returns the downstream dependencies as a schema.model list.