Agent skill

SQLx Offline Cache Updater

by windmill-labs in windmill-labs/windmill

Safely regenerates Windmill's SQLx offline query cache after a SQL query changes in Rust, with a mandatory backup step and worktree-specific database checks.

Custom licenceAuto-check passedDatabases

Install SQLx Offline Cache Updater

skills CLI
$ npx skills add windmill-labs/windmill --skill update-sqlx -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install windmill-labs/windmill update-sqlx --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/windmill-labs/windmill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/update-sqlx .claude/skills/update-sqlx && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
update-sqlx
GitHub stars
18k
Token cost
~1.7k tokens
SKILL.md length
748 words
Files
2
Skills in repo
42
Repo updated
First seen
Licence
Custom licence

At a glance

Safely regenerates Windmill's SQLx offline query cache after a SQL query changes in Rust, with a mandatory backup step and worktree-specific database checks.

  • Works in 2 steps: Back the cache up. prepare deletes… → Point DATABASE_URL at THIS worktree's…
  • Regenerating the SQLx offline cache after adding a new SQL query in Rust
  • SKILL.md covers When to Run, Before You Run Anything, Queries Inside Tests Need… and The Problem, plus 4 more sections
  • Runs Shell scripts from its folder; calls cargo, git and bash

What it does

Windmill compiles with SQLX_OFFLINE=true in CI, so every sqlx::query! and sqlx::query_as! macro needs matching cached data in backend/.sqlx/. The skill is only for additions or edits to a query; removing a query leaves cosmetically orphaned cache entries that never break a build, and it warns against running prepare just to tidy those, since prepare deletes the whole cache before regenerating it and a compile failure can leave it gutted, observed going from 2350 entries down to 142.

Before running anything, the agent backs up the cache with the bundled sqlx-cache.sh script, which is worktree-scoped so a sibling worktree running prepare at the same time cannot overwrite it, and makes sure DATABASE_URL points at the current worktree's own database, since prepare compiles every query against a live database and another worktree's database will be missing recent migrations. It also flags that test-target queries need --all-targets to be cached, which in a Community Edition checkout can abort partway through because a test file imports an Enterprise-only module.

When your agent uses it

  • Regenerating the SQLx offline cache after adding a new SQL query in Rust
  • Fixing a CI failure that says there is no cached data for a query
  • Cleaning up orphaned SQLx cache entries left by a removed query

Example prompts

  • “I added a new sqlx::query! macro; update the offline cache for it.”
  • “CI says SQLX_OFFLINE=true but there is no cached data for this query; fix it.”
  • “Back up the SQLx cache before I run prepare on my worktree's database.”

Requirements

  • A local PostgreSQL database matching the current worktree's migrations
  • The Rust SQLx CLI

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Back the cache up. prepare deletes .sqlx/ before regenerating, so any compile
  2. Point DATABASE_URL at THIS worktree's database. prepare compiles every

What it can do on your machine

Read from SKILL.md and the folder at commit f40eea2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • cargo
    • git
    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

SQLx Offline Cache Updater loads about 1.7k tokens when it runs. Until then it costs about 23 tokens; SKILL.md has 748 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~23
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 748 words (~1,739 tokens).

“Windmill uses SQLX_OFFLINE=true in CI, which requires all sqlx::query! / sqlx::query_as! macros to have matching cached query data in backend/.sqlx/.”

— opening of SKILL.md by windmill-labs, Custom licence
name
update-sqlx

Read the full SKILL.md on GitHub

Files

SKILL.md and 1 other file in .agents/skills/update-sqlx of windmill-labs/windmill.

  • SKILL.md
  • sqlx-cache.sh

Open the folder on GitHubat commit f40eea2

Compare with similar skills

SQLx Offline Cache Updater next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

SQLx Offline Cache Updater compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
SQLx Offline Cache Updater this skillwindmill-labs/windmill18k—~1.7kAutomated safety check: PassCustom licence
Diesel Guardayarotsky/diesel-guard121—~3.1kAutomated safety check: PassMIT
Supabase Postgres Best Practicessupabase/agent-skills2.7k24 repos~808Automated safety check: PassMIT
Database Migrations SQL Migrationsrmyndharis/antigravity-skills1.7k3 repos~577Automated safety check: NotesMIT
DB ContextSilvioBaratto/optimizer176—~6.4kAutomated safety check: NotesCustom licence
Postgrestimescale/pg-aiguide1.9k—~941Automated safety check: PassApache-2.0

Similar skills

  • Diesel Guard

    ayarotsky/diesel-guard

    Lints Diesel and SQLx Postgres migrations for unsafe schema changes that lock tables or cause downtime, and authors custom Rhai checks.

    121 GitHub stars~3.1k tokensUpdated 9 days ago
    DatabasesAuto-check passed
  • Official

    Gives the agent Postgres rules to consult before writing or changing tables, queries, indexes, RLS policies or migrations, and when diagnosing slow queries.

    2.7k GitHub starsUsed in 24 repos~808 tokens
    DatabasesAuto-check passed
  • Database Migrations SQL Migrations

    rmyndharis/antigravity-skills

    SQL database migrations with zero-downtime strategies for PostgreSQL, MySQL, SQL Server

    1.7k GitHub starsUsed in 3 repos~577 tokens
    DatabasesAuto-check: notes
  • DB Context

    SilvioBaratto/optimizer

    Complete knowledge of the optimizer PostgreSQL database: 57 ingestion tables, schema, relationships, live row counts, query patterns, and conventions.

    176 GitHub stars~6.4k tokensUpdated today
    DatabasesAuto-check: notes
  • Postgres

    timescale/pg-aiguide

    A skill your agent uses for any PostgreSQL database work — table design, indexing, data types, constraints, extensions (pgvector, PostGIS, TimescaleDB), search, and migrations.

    1.9k GitHub stars~941 tokensUpdated today
    DatabasesAuto-check passed
  • Database Migration

    Rain-kl/OpenFlare

    Wavelet 项目专用:当新增或修改数据库表结构、索引、初始化数据、系统配置 seed、模板 seed、默认管理员、goose SQL 迁移、internal/infra/persistence/migrator、ClickHouse 分析库 DDL 或数据库升级流程时必须使用。本技能指导在 internal/infra/persistence/migrator/goose 下编写…

    288 GitHub stars~1.3k tokensUpdated today
    DatabasesAuto-check passed

More from windmill-labs/windmill

All 42 skills in this repo
  • Windmill Trigger Type Checklist

    windmill-labs/windmill

    Checklist of every backend, frontend, CLI and capture change needed to add a new TriggerCrud-based trigger type, such as Azure, GCP or Kafka, to Windmill.

    18k GitHub stars~4.7k tokensUpdated today
    Auto-check passed
  • Windmill AI Evals

    windmill-labs/windmill

    Writes and runs black-box benchmark cases for Windmill's flow, app, script, CLI and global AI generation modes, including before-and-after comparisons.

    18k GitHub stars~969 tokensUpdated today
    Auto-check: notes
  • Domain Modeling and Glossary

    windmill-labs/windmill

    Actively challenges vague or conflicting terminology as you design, and keeps a living domain glossary file up to date in real time.

    18k GitHub stars~622 tokensUpdated today
    Auto-check passed
  • Local PR Review

    windmill-labs/windmill

    Runs the same code review locally that GitHub's auto-review actions run on a PR, delegating to a fresh-context subagent so the review isn't biased by the main session's own reasoning.

    18k GitHub stars~995 tokensUpdated today
    Auto-check passed
  • Draft PR with CI Rounds

    windmill-labs/windmill

    Opens a draft GitHub pull request with a conventional title and explicit body, then drives CI review rounds before marking it ready.

    18k GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Windmill Dev Page Preview

    windmill-labs/windmill

    Opens the Windmill dev page to preview a flow, script or app, choosing between proxy and direct mode and deciding whether the agent or the runtime starts the wmill dev server.

    18k GitHub stars~1.8k tokensUpdated today
    Auto-check passed

Works with

Questions about SQLx Offline Cache Updater

What does SQLx Offline Cache Updater do?

Safely regenerates Windmill's SQLx offline query cache after a SQL query changes in Rust, with a mandatory backup step and worktree-specific database checks. Windmill compiles with SQLX_OFFLINE=true in CI, so every sqlx::query! and sqlx::query_as!

When should I use SQLx Offline Cache Updater?

SQLx Offline Cache Updater fits situations like: regenerating the SQLx offline cache after adding a new SQL query in Rust; fixing a CI failure that says there is no cached data for a query; cleaning up orphaned SQLx cache entries left by a removed query.

How do I install SQLx Offline Cache Updater in Claude Code?

Run `npx skills add windmill-labs/windmill --skill update-sqlx -a claude-code`. Or copy the skill folder (.agents/skills/update-sqlx in windmill-labs/windmill) into .claude/skills/update-sqlx in your project. Claude Code loads it when a task matches its description.

How do I install SQLx Offline Cache Updater in Codex?

Run `npx skills add windmill-labs/windmill --skill update-sqlx -a codex`. Or copy the skill folder (.agents/skills/update-sqlx in windmill-labs/windmill) into .agents/skills/update-sqlx in your project. Codex loads it when a task matches its description.

Can I use SQLx Offline Cache Updater in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add windmill-labs/windmill --skill update-sqlx -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/update-sqlx, .gemini/skills/update-sqlx, .github/skills/update-sqlx and .opencode/skills/update-sqlx in your project.

What does SQLx Offline Cache Updater need to run?

Going by SKILL.md and its folder, SQLx Offline Cache Updater needs a shell for the scripts in its folder and the command-line tools its instructions call (cargo, git and bash). Our summary lists: A local PostgreSQL database matching the current worktree's migrations; The Rust SQLx CLI.

Does SQLx Offline Cache Updater access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is SQLx Offline Cache Updater safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does SQLx Offline Cache Updater use?

SQLx Offline Cache Updater has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does SQLx Offline Cache Updater use?

About 1.7k tokens (SKILL.md is roughly 7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to SQLx Offline Cache Updater?

Skills that share tags, products or a category with SQLx Offline Cache Updater: Diesel Guard (ayarotsky/diesel-guard, 121 stars), Supabase Postgres Best Practices (supabase/agent-skills, 2.7k stars), Database Migrations SQL Migrations (rmyndharis/antigravity-skills, 1.7k stars) and DB Context (SilvioBaratto/optimizer, 176 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains SQLx Offline Cache Updater?

windmill-labs (a GitHub organization) maintains it in windmill-labs/windmill, which has 18,128 GitHub stars. The repository holds 42 skills in this directory. The repository was last updated on October 8, 2026.

Source: windmill-labs/windmill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.