sqlx
Regenerate `.sqlx/` cached metadata when adding or modifying `sqlx::query!`, `sqlx::query_as!`, or `sqlx::query_scalar!` macros.
by OGKevin★ 55 GitHub stars
Install sqlx in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
SQLx Offline Query Cache
Regenerate .sqlx/ cached metadata when adding or modifying sqlx::query!,
sqlx::query_as!, or sqlx::query_scalar! macros.
When to use
- New typed SQLx macro introduced
- Existing query string changed
- Schema migration added or altered
Prerequisites
sqlx-cliandsqlite3onPATH(both are in the devenv shell)
Do not set DATABASE_URL. cargo xtask sqlx-prepare creates a temporary
SQLite file, applies crates/core/migrations, then applies
crates/core/dictionary/migrations, and points cargo sqlx prepare at that
file. One crate build can describe queries against only one URL
(sqlx#916). The dictionary
migrator is not run on the temporary file: both migrators use version 1 in
_sqlx_migrations. The app migrates dictionary.sqlite on its own.
Command
cargo xtask sqlx-prepare
The command passes -- --tests so #[cfg(test)] queries are cached, and sets
SQLX_OFFLINE=false for that process only. devenv keeps SQLX_OFFLINE=true
for normal builds.
Verification
After regenerating, run the normal emulator-feature checks:
cadmuscli clippy --features emulator
cadmuscli test --features emulator
A device feature is required because workspace defaults do not enable one.
Complete the formatting and Kobo-build steps in the root verification
sequence, and commit the updated .sqlx/ files
alongside the query or migration changes.
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the sqlx skill do?
Regenerate `.sqlx/` cached metadata when adding or modifying `sqlx::query!`, `sqlx::query_as!`, or `sqlx::query_scalar!` macros.
How do I install the sqlx skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the sqlx skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…