Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/litestar-org/litestar-skillsnpx agentmods add skills/litestar-org/litestar-skills/sqlspecWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/litestar-org/litestar-skills/sqlspec)<a href="https://agentmods.dev/skills/litestar-org/litestar-skills/sqlspec"><img src="https://agentmods.dev/badge/skills/litestar-org/litestar-skills/sqlspec/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/litestar-org/litestar-skills/sqlspec"><img src="https://agentmods.dev/badge/skills/litestar-org/litestar-skills/sqlspec.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00051 | $0.04245 |
| Opus 5.5 | $0.00020 | $0.01698 |
| Sonnet 5.5 | $0.00010 | $0.00849 |
| Haiku 4.5 | $0.00005 | $0.00424 |
Grade A, and why
sqlspec scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 330 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SQLSpec Skill
SQLSpec is a type-safe SQL query mapper for Python -- NOT an ORM. It provides flexible connectivity with consistent interfaces across 20 database adapter packages. Write raw SQL, use the builder API, or load SQL from files. Statements pass through a sqlglot-powered AST pipeline for validation, parameter handling, and dialect conversion.
Match-Your-Framework — read first
sqlspec ships first-party extensions for five web frameworks. If your project uses one of these, jump directly to the matching integration guide and skip the others:
- Litestar — register configs on
SQLSpec, then pass that registry toSQLSpecPlugin. The plugin adds DI, thelitestar dbCLI, and request observability. Seereferences/extensions.md. - FastAPI →
references/fastapi-integration.md—Depends(plugin.provide_session())DI,Annotated[...]handlers, filter providers. - Flask →
references/flask-integration.md—plugin.init_app(app), pull-basedplugin.get_session(), async-via-portal. - Starlette →
references/starlette-integration.md—request.state-based session access, lifespan wrapping, middleware variants. - Sanic — first-party ASGI-style extension for Sanic applications; match Sanic's app/request lifecycle instead of copying Litestar DI examples.
Shared topics that apply to every framework live in references/commit-modes.md (autocommit / manual middleware) and references/multi-database.md (multi-config registry). Read the framework guide first, then those for depth.
The rest of this SKILL.md covers framework-agnostic topics: adapter setup, query builder, driver methods, filters, observability, migrations, the ADK extension, and data-dictionary introspection.
Code Style Rules
from __future__ import annotationsrule — SQLSpec adapter config modules and driver definitions avoidfrom __future__ import annotationsbecause configs are introspected at runtime. Consumer application modules (handlers, services, tests that use a configured driver) MAY and typically SHOULD use it — canonical Litestar apps use it in 100+ files.
What ships with it
27 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/adapters.md 19 KB
- references/adk.md 13 KB
- references/architecture.md 4.2 KB
- references/arrow.md 4.2 KB
- references/bulk-ingest.md 5.1 KB
- references/commit-modes.md 9.0 KB
- references/data-dictionary.md 5.9 KB
- references/dishka-integration.md 13 KB
- references/driver_api.md 11 KB
- references/events.md 6.8 KB
- references/extensions.md 6.6 KB
- references/fastapi-integration.md 25 KB
- references/filters.md 8.7 KB
- references/flask-integration.md 21 KB
- references/loader.md 7.5 KB
- references/migrations.md 12 KB
- references/multi-database.md 16 KB
- references/observability.md 16 KB
- references/patterns.md 7.3 KB
- references/performance.md 7.2 KB
- references/query_builder.md 9.2 KB
- references/service-patterns.md 16 KB
- references/sqlglot.md 2.6 KB
- references/standards.md 5.4 KB
- references/starlette-integration.md 18 KB
- references/storage.md 5.3 KB
- references/vector-search.md 13 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday Changed 0c0a3a4cec9b
- 17d ago Changed · +1 lines 0e3f48f11e94
- 25d ago Changed · +4 lines · -3 tokens per session 1b7e050855c2
- 1mo ago First seen · 325 lines · 54 tokens per session scan A 56ceb422001d
sqlspec is a skill published in the GitHub repository litestar-org/litestar-skills (16 stars, last pushed 2d ago), licensed MIT. It adds 51 tokens to every session and 4,245 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
phoenix-contexts
Phoenix context design — creating/splitting contexts, Scope (1.8+), Ecto.Multi, PubSub, routers, plugs, controllers. Use when editing contexts, routers, or designing boundaries.
motherduck-connect
Set up or troubleshoot MotherDuck connections, authentication, client runtimes, and read scaling.
motherduck-rest-api
Administer MotherDuck service accounts, tokens, Ducklings, and Dive embed sessions through the control-plane REST API.
craft-model
Crafting the Eloquent model. Source of truth.
craft-query
Crafting QueryBuilders. Eloquent power, not Repositories.
domain-modeling
Use when introducing, reviewing, or renaming a top-level type, table, or domain concept; or choosing where state lives (in-memory vs persistent).