{"id":"5030c92e-c4b2-42e1-95fd-a21037221547","shortId":"EPaAFn","kind":"skill","title":"sqlspec","tagline":"Auto-activate for sqlspec imports, SQLSpec, SQLFileLoader, driver adapters, query builders, named SQL files, filters, pagination, Arrow, framework extensions, ADK stores, data dictionary introspection, or observability hooks. Use when working with direct SQL through sqlspec acros","description":"# SQLSpec Skill\n\nSQLSpec is a **type-safe SQL query mapper for Python** -- NOT an ORM. It provides flexible connectivity with consistent interfaces across 15+ database adapters. Write raw SQL, use the builder API, or load SQL from files. All statements pass through a sqlglot-powered AST pipeline for validation and dialect conversion.\n\n## Match-Your-Framework — read first\n\nsqlspec ships first-party extensions for four web frameworks. If your project uses one of these, **jump directly to the matching integration guide and skip the others**:\n\n- **Litestar** — `SQLSpecPlugin` with full DI, CLI, observability. The rest of this SKILL.md covers Litestar by default; also see [`references/extensions.md`](references/extensions.md).\n- **FastAPI** → [`references/fastapi-integration.md`](references/fastapi-integration.md) — `Depends(plugin.provide_session())` DI, `Annotated[...]` handlers, filter providers.\n- **Flask** → [`references/flask-integration.md`](references/flask-integration.md) — `plugin.init_app(app)`, pull-based `plugin.get_session()`, async-via-portal.\n- **Starlette** → [`references/starlette-integration.md`](references/starlette-integration.md) — `request.state`-based session access, lifespan wrapping, middleware variants.\n\nsqlspec has **no first-party Sanic integration** — other frameworks are not supported out-of-the-box.\n\nShared topics that apply to every framework live in [`references/commit-modes.md`](references/commit-modes.md) (autocommit / manual middleware) and [`references/multi-database.md`](references/multi-database.md) (multi-config registry). Read the framework guide first, then those for depth.\n\nThe 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.\n\n## Code Style Rules\n\n- **`from __future__ import annotations` rule** — SQLSpec adapter config modules and driver definitions avoid `from __future__ import annotations` because 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.\n\n## Quick Reference\n\n### Adapter Pattern\n\n```python\nfrom sqlspec.adapters.asyncpg import AsyncpgConfig, AsyncpgDriver\n\n# Configure the adapter with connection details\nconfig = AsyncpgConfig(\n    connection_config={\n        \"dsn\": \"postgresql://user:pass@localhost:5432/mydb\",\n        \"min_size\": 2,\n        \"max_size\": 10,\n    },\n)\n\n# Use the driver as a context manager for connection lifecycle\nasync with config.create_driver() as db:\n    users = await db.select_many(\n        \"SELECT * FROM users WHERE active = $1\",\n        [True],\n        schema_type=User,\n    )\n```\n\n### Query Builder Essentials\n\n```python\nfrom sqlspec import sql\n\n# SELECT with filters\nstmt = (\n    sql.select(\"id\", \"name\", \"email\")\n    .from_(\"users\")\n    .where_eq(\"status\", \"active\")\n    .where(\"created_at > :since\", since=cutoff_date)\n    .order_by(\"created_at\", desc=True)\n    .limit(50)\n    .to_statement()\n)\n\n# INSERT\nstmt = (\n    sql.insert_into(\"users\")\n    .columns(\"name\", \"email\")\n    .values(name=\"Alice\", email=\"alice@example.com\")\n    .to_statement()\n)\n\n# MERGE / upsert\nstmt = (\n    sql.merge_(\"inventory\")\n    .using(\"updates\", on=\"inventory.product_id = updates.product_id\")\n    .when_matched().do_update(qty=\"updates.qty\")\n    .when_not_matched().do_insert(product_id=\"updates.product_id\", qty=\"updates.qty\")\n    .to_statement()\n)\n```\n\n### Driver Method Summary\n\n| Method | Returns | Use Case |\n| --- | --- | --- |\n| `select_value()` | Single scalar | `COUNT(*)`, `MAX()`, existence checks |\n| `select_one()` | One row (strict) | Get-by-ID, raises `NotFoundError` |\n| `select_one_or_none()` | One row or `None` | Optional lookup |\n| `select_many()` | List of rows | Filtered queries, listing |\n| `select_to_arrow()` | `pyarrow.Table` | Bulk data export, analytics |\n| `execute()` | Row count | INSERT/UPDATE/DELETE |\n| `execute_many()` | Row count | Batch operations |\n\n### Arrow Integration Basics\n\n```python\n# Zero-copy on DuckDB, ADBC adapters; conversion on others\narrow_table = await db.select_to_arrow(\n    \"SELECT * FROM large_dataset WHERE region = $1\", [region]\n)\n\n# Bulk load from Arrow\nawait db.copy_from_arrow(arrow_table, target_table=\"users\")\n```\n\n<workflow>\n\n## Workflow\n\n### Step 1: Choose Adapter and Pattern\n\n| Need | Adapter | Key Feature |\n| --- | --- | --- |\n| PostgreSQL async | `asyncpg`, `psycopg` | Async, NUMERIC/PYFORMAT params |\n| PostgreSQL sync | `psycopg` | Sync+async, PYFORMAT params |\n| SQLite | `sqlite`, `aiosqlite` | QMARK params, local dev |\n| DuckDB analytics | `duckdb` | Arrow-native, zero-copy |\n| MySQL async | `asyncmy` | PYFORMAT params |\n| Oracle | `oracledb` | NAMED_COLON params, sync+async |\n| BigQuery / Spanner | `bigquery`, `spanner` | NAMED_AT params |\n| Raw SQL strings | Driver methods | `select_many()`, `execute()` |\n| Dynamic queries | Query builder | `sql.select()...to_statement()` |\n| SQL from files | `SQLFileLoader` | Metadata directives, caching |\n\n### Step 2: Implement\n\n1. Configure the adapter with connection details and pool settings\n2. Use `create_driver()` context manager for connection lifecycle\n3. Choose the appropriate driver method for your query shape\n4. Use `schema_type` parameter for typed results (Pydantic or msgspec models)\n5. Apply filters with `LimitOffsetFilter`, `OrderByFilter`, `SearchFilter`\n\n### Step 3: Validate\n\nRun through the validation checkpoint below before considering the work complete.\n\n</workflow>\n\n<guardrails>\n\n## Guardrails\n\n- **Always use typed adapters**: import the specific adapter config, not generic base classes\n- **Always use `schema_type`** for query results -- get typed objects, not raw dicts\n- **Always use context managers** for driver lifecycle -- `async with config.create_driver() as db:`\n- **Prefer the query builder** for complex dynamic queries -- avoids string concatenation, handles dialect conversion\n- **Prefer `SQLFileLoader`** for static queries -- keeps SQL out of Python, enables caching\n- **Never concatenate SQL strings** -- use parameterized queries or the query builder\n- **Never hold connections outside context managers** -- connection leaks exhaust the pool\n- **Match parameter style to adapter**: `$1` for asyncpg, `%s` for psycopg, `?` for sqlite, `:name` for oracledb\n- **Adapter config / driver modules avoid `from __future__ import annotations`**. Consumer app modules MAY use it.\n\n</guardrails>\n\n<validation>\n\n### Validation Checkpoint\n\nBefore delivering SQLSpec code, verify:\n\n- [ ] Adapter config uses the correct import path (`sqlspec.adapters.<name>`)\n- [ ] Connection lifecycle uses `create_driver()` context manager\n- [ ] Parameter style matches the adapter (see adapter registry table)\n- [ ] Query results use `schema_type` for type-safe mapping\n- [ ] Complex dynamic queries use the builder API, not string concatenation\n- [ ] Filters use SQLSpec filter objects (`LimitOffsetFilter`, etc.) not manual LIMIT/OFFSET\n\n</validation>\n\n<example>\n\n## Example\n\n**Task:** \"Set up an asyncpg adapter, define a typed model, and execute a parameterized query with pagination.\"\n\n```python\nfrom dataclasses import dataclass\nfrom sqlspec.adapters.asyncpg import AsyncpgConfig\nfrom sqlspec.core.filters import LimitOffsetFilter, OrderByFilter\n\n\n# --- Typed model ---\n\n@dataclass\nclass User:\n    id: int\n    name: str\n    email: str\n    active: bool\n\n\n# --- Adapter setup ---\n\nconfig = AsyncpgConfig(\n    connection_config={\n        \"dsn\": \"postgresql://user:pass@localhost:5432/mydb\",\n        \"min_size\": 2,\n        \"max_size\": 10,\n    },\n)\n\n\n# --- Query execution ---\n\nasync def list_active_users(page: int = 1, page_size: int = 25) -> list[User]:\n    filters = [\n        OrderByFilter(columns=[(\"name\", \"asc\")]),\n        LimitOffsetFilter(limit=page_size, offset=(page - 1) * page_size),\n    ]\n\n    async with config.create_driver() as db:\n        users = await db.select_many(\n            \"SELECT id, name, email, active FROM users WHERE active = $1\",\n            [True],\n            *filters,\n            schema_type=User,\n        )\n        return users\n\n\nasync def get_user_count() -> int:\n    async with config.create_driver() as db:\n        count = await db.select_value(\n            \"SELECT COUNT(*) FROM users WHERE active = $1\", [True]\n        )\n        return count\n```\n\n</example>\n\n## Query Builder\n\nThe `sql` factory provides a fluent builder API with full method chaining. All builders terminate with `.to_statement()` and pass through sqlglot for validation and dialect conversion.\n\n| Builder | Entry Point | Key Methods |\n| --- | --- | --- |\n| SELECT | `sql.select(*cols)` | `.from_()`, `.where()`, `.where_eq()`, `.join()`, `.order_by()`, `.limit()`, `.offset()` |\n| INSERT | `sql.insert_into(table)` | `.columns()`, `.values()`, `.returning()` |\n| UPDATE | `sql.update(table)` | `.set_()`, `.where()`, `.returning()` |\n| DELETE | `sql.delete_from(table)` | `.where()`, `.returning()` |\n| MERGE | `sql.merge_(target)` | `.using()`, `.when_matched()`, `.when_not_matched()` |\n| CREATE TABLE | `sql.create_table(name)` | `.column()`, `.primary_key()`, `.if_not_exists()` |\n| DROP TABLE | `sql.drop_table(name)` | `.if_exists()`, `.cascade()` |\n\n## ArrowResult\n\n`select_to_arrow()` returns an Apache Arrow `Table` for bulk and analytical workloads:\n\n- **Zero-copy** on DuckDB and ADBC-native adapters — no serialization overhead\n- **Conversion path** on other adapters — rows are materialized into an Arrow schema\n- Returned tables are compatible with Polars, Pandas, and PyArrow directly\n- Use `copy_from_arrow(table, target_table)` for bulk loads back into the database\n\n## Filters\n\nSQLSpec filter objects are passed directly to driver methods alongside the SQL string. They modify the statement before execution.\n\n| Filter | Purpose | Example Use |\n| --- | --- | --- |\n| `BeforeAfterFilter` | Date range bounds (`before`, `after`) | Audit log queries, time-range pagination |\n| `InCollectionFilter` | SQL `IN (...)` clause | Filter by a set of IDs or enum values |\n| `LimitOffsetFilter` | Page-based pagination | `limit=25, offset=50` |\n| `OrderByFilter` | Dynamic sort columns and direction | User-supplied sort fields |\n| `SearchFilter` | Text search (`ILIKE` / `LIKE`) | Full-text style search on string columns |\n\nFilters are composable — pass multiple to a single `select_many()` call and they are applied in order.\n\n## Framework Integrations\n\n| Framework | Integration | Key Feature |\n| --- | --- | --- |\n| Litestar | `SQLSpecPlugin` | Dependency injection of typed driver; auto session lifecycle |\n| FastAPI / Starlette | Middleware | Request-scoped connection; injects driver into route dependencies |\n| Flask | Extension | `init_app()` pattern; driver available via `g` or `current_app` |\n\n`SQLSpecPlugin` for Litestar registers the driver as a DI provider — inject it into route handlers via type annotation without manual context management.\n\n## Event Channels\n\nFor databases that support server-side pub/sub (e.g., PostgreSQL `LISTEN`/`NOTIFY`):\n\n- Use `AsyncEventChannel` to subscribe to named channels\n- Publish with `NOTIFY channel, payload` from SQL or from the `publish()` method\n- Handlers receive `EventMessage` objects with channel name, payload, and PID\n- Useful for real-time cache invalidation, cross-process coordination, and background job triggers\n\n## Key Design Principles\n\n1. **Single Source of Truth**: The `SQL` object holds all state for a given statement\n2. **Immutability**: All operations on a `SQL` object return new instances\n3. **Type Safety**: Parameters carry type information through the processing pipeline\n4. **Protocol-Based Design**: Uses Python protocols for runtime type checking instead of inheritance\n5. **Single-Pass Processing**: Parse once, transform once, validate once\n\n## References Index\n\n> **Choosing between `sqlspec` and `advanced-alchemy`:** `advanced-alchemy` gives you an opinionated ORM service layer with `UUIDAuditBase`, lifecycle hooks, repository / service / Alembic integration, and `OffsetPagination[T]` out of the box — pick it when you want a complete CRUD surface with attribute-style row access and you're happy inside the SQLAlchemy ecosystem. `sqlspec` gives you direct SQL control, 15+ driver adapters (asyncpg, oracledb, DuckDB, BigQuery, SQLite, and more), Arrow-native result streams for analytics, and a builder API when you need it — pick it when you want explicit SQL, heterogeneous database backends, or Arrow integration. Both skills integrate with Litestar via first-party plugins; see [`../advanced-alchemy/SKILL.md`](../advanced-alchemy/SKILL.md) for the ORM path.\n\nFor detailed instructions, patterns, and API guides, refer to the following documents:\n\n### Standards & Style\n\n- **[Code Quality & Mypyc](references/standards.md)** -- Type annotation rules, import standards, test structure.\n\n### Core Utilities\n\n- **[SQLglot Best Practices](references/sqlglot.md)** -- v30+ guardrails, AST manipulation, `copy=False` pattern.\n\n### Architecture & Performance\n\n- **[Architecture & Caching](references/architecture.md)** -- Core data flow, NamespacedCache system, Mypyc compilation.\n- **[Data Dictionary](references/data-dictionary.md)** -- Dialect feature flags, runtime introspection (`get_tables`, `get_columns`, `get_indexes`), driver-side metadata API.\n\n### Query Building & Execution\n\n- **[Query Builder API](references/query_builder.md)** -- `sql` factory: select, insert, update, delete, merge.\n- **[Driver Method Reference](references/driver_api.md)** -- `select_value()`, `select_one()`, `select_many()`, `select_to_arrow()`.\n- **[Filter & Pagination System](references/filters.md)** -- `LimitOffsetFilter`, `OrderByFilter`, `SearchFilter`.\n\n### Data Integration\n\n- **[Arrow & ADBC Integration](references/arrow.md)** -- `select_to_arrow()` zero-copy, `copy_from_arrow()` bulk loading.\n- **[SQL File Loading](references/loader.md)** -- `SQLFileLoader` with search paths, metadata directives.\n\n### Adapters & Drivers\n\n- **[Adapter & Driver Registry](references/adapters.md)** -- Full 15-adapter registry with dialects and parameter styles.\n\n### Framework & Storage Integrations\n\n- **[Framework Extensions](references/extensions.md)** -- Litestar plugin, FastAPI/Starlette integration.\n- **[Storage Integration](references/storage.md)** -- ADK store, Litestar session stores, event channel backends.\n- **[Event Channels (Pub/Sub)](references/events.md)** -- `AsyncEventChannel`, subscribe/publish patterns.\n- **[ADK Extension](references/adk.md)** -- `SQLSpecSessionService`, `SQLSpecMemoryService`, `SQLSpecArtifactService`, per-adapter ADK stores.\n\n### Migrations & Schema\n\n- **[Native Migration Runner](references/migrations.md)** -- `sqlspec database` CLI, timestamp versioning, `ddl_migrations` tracker, extension migrations, Litestar `litestar db` integration.\n\n### Observability\n\n- **[Observability & Tracing](references/observability.md)** -- Telemetry semantics, correlation extraction.\n\n### Advanced Patterns\n\n- **[Design Patterns](references/patterns.md)** -- Service layer, batch operations, upsert, AST tenant filters.\n- **[Service Patterns](references/service-patterns.md)** -- SQLSpecAsyncService base, named SQL templates via db_manager.get_sql, direct driver API (select_value / select_one / execute), variadic filter composition, create_filter_dependencies() wiring.\n- **[Dishka Integration](references/dishka-integration.md)** -- FromDishka as Inject alias, multi-provider pattern (REQUEST-scoped domain services, REQUEST-scoped driver, APP-scoped singletons), handler injection.\n- **[Vector Search](references/vector-search.md)** — Oracle VECTOR_DISTANCE cosine similarity, Vertex AI embedding generation, SHA256-keyed embedding cache, intent classification via exemplar similarity, pgvector cross-reference.\n\n## Key Resources\n\n- **SQLglot Docs**: <https://sqlglot.com/sqlglot.html>\n- **SQLglot GitHub**: <https://github.com/tobymao/sqlglot>\n- **Mypyc Docs**: <https://mypyc.readthedocs.io/>\n- **PyArrow Docs**: <https://arrow.apache.org/docs/python/>\n\n## Official References\n\n- <https://sqlspec.dev/>\n- <https://sqlspec.dev/changelog.html>\n- <https://github.com/litestar-org/sqlspec>\n\n## Shared Styleguide Baseline\n\n- Use shared styleguides for generic language/framework rules to reduce duplication in this skill.\n- [General Principles](../litestar-styleguide/references/general.md)\n- [Python](../litestar-styleguide/references/python.md)\n- [Litestar](../litestar-styleguide/references/litestar.md)\n- Keep this skill focused on tool-specific workflows, edge cases, and integration details.","tags":["sqlspec","litestar","skills","litestar-org","advanced-alchemy","agent-skills","agentskills","ai-agents","claude-code-plugin","claude-code-skills","gemini-cli-extension","htmx"],"capabilities":["skill","source-litestar-org","skill-sqlspec","topic-advanced-alchemy","topic-agent-skills","topic-agentskills","topic-ai-agents","topic-claude-code-plugin","topic-claude-code-skills","topic-gemini-cli-extension","topic-htmx","topic-inertia","topic-litestar","topic-mcp","topic-python"],"categories":["litestar-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/litestar-org/litestar-skills/sqlspec","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add litestar-org/litestar-skills","source_repo":"https://github.com/litestar-org/litestar-skills","install_from":"skills.sh"}},"qualityScore":"0.453","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 7 github stars · SKILL.md body (16,669 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:13:55.518Z","embedding":null,"createdAt":"2026-05-18T13:20:59.912Z","updatedAt":"2026-05-18T19:13:55.518Z","lastSeenAt":"2026-05-18T19:13:55.518Z","tsv":"'/advanced-alchemy/skill.md':1585,1586 '/changelog.html':1919 '/docs/python/':1913 '/litestar-org/sqlspec':1922 '/litestar-styleguide/references/general.md':1941 '/litestar-styleguide/references/litestar.md':1945 '/litestar-styleguide/references/python.md':1943 '/sqlglot.html':1900 '/tobymao/sqlglot':1905 '1':366,544,561,644,799,957,975,997,1027,1410 '10':340,947 '100':308 '15':63,1536,1728 '2':337,642,654,944,1425 '25':961,1243 '3':663,693,1436 '4':673,1447 '5':685,1462 '50':407,1245 '5432/mydb':334,941 'access':179,1521 'acro':38 'across':62 'activ':4,365,392,929,953,992,996,1026 'adapt':11,65,242,268,312,322,528,563,567,647,710,714,798,810,832,851,853,892,931,1147,1155,1538,1721,1723,1729,1772 'adbc':527,1145,1697 'adbc-nat':1144 'adk':22,252,1749,1764,1773 'advanc':1480,1483,1803 'advanced-alchemi':1479,1482 'agnost':240 'ai':1877 'aiosqlit':586 'alchemi':1481,1484 'alemb':1498 'alia':1848 'alic':420 'alice@example.com':422 'alongsid':1197 'also':143 'alway':707,720,733 'analyt':507,592,1136,1552 'annot':154,265,278,818,1344,1610 'apach':1130 'api':72,872,1040,1556,1596,1659,1665,1829 'app':162,163,304,820,1318,1326,1863 'app-scop':1862 'appli':205,686,1284 'applic':286 'appropri':666 'architectur':1629,1631 'arrow':19,502,518,532,537,549,553,554,595,1127,1131,1161,1176,1547,1572,1686,1696,1702,1708 'arrow-n':594,1546 'arrow.apache.org':1912 'arrow.apache.org/docs/python/':1911 'arrowresult':1124 'asc':968 'ast':86,1624,1813 'async':170,351,571,574,581,601,611,740,950,978,1005,1011 'async-via-port':169 'asynceventchannel':1364,1761 'asyncmi':602 'asyncpg':572,801,891,1539 'asyncpgconfig':318,327,912,934 'asyncpgdriv':319 'attribut':1518 'attribute-styl':1517 'audit':1217 'auto':3,1300 'auto-activ':2 'autocommit':213 'avail':1321 'avoid':274,754,814 'await':358,534,550,985,1018 'back':1183 'backend':1570,1756 'background':1404 'base':166,177,718,1240,1450,1820 'baselin':1925 'basic':520 'batch':516,1810 'beforeafterfilt':1211 'best':1619 'bigqueri':612,614,1542 'bool':930 'bound':1214 'box':201,1506 'build':1661 'builder':13,71,245,372,630,749,782,871,1032,1039,1046,1060,1555,1664 'bulk':504,546,1134,1181,1709 'cach':640,771,1397,1632,1884 'call':1280 'canon':302 'carri':1440 'cascad':1123 'case':462,1956 'chain':1044 'channel':1350,1369,1373,1387,1755,1758 'check':470,1458 'checkpoint':699,826 'choos':562,664,1475 'class':719,921 'classif':1886 'claus':1227 'cli':132,1783 'code':259,830,1605 'col':1067 'colon':608 'column':415,966,1081,1110,1249,1269,1652 'compat':1166 'compil':1640 'complet':705,1513 'complex':751,866 'compos':1272 'composit':1837 'concaten':756,773,875 'config':221,269,280,326,329,715,811,833,933,936 'config.create':353,742,980,1013 'configur':294,320,645 'connect':58,324,328,349,649,661,785,789,840,935,1309 'consid':702 'consist':60 'consum':285,819 'context':346,658,735,787,845,1347 'control':1535 'convers':92,529,759,1059,1151 'coordin':1402 'copi':524,599,1140,1174,1626,1705,1706 'core':1616,1634 'correct':836 'correl':1801 'cosin':1874 'count':467,510,515,1009,1017,1022,1030 'cover':139,237 'creat':394,402,656,843,1105,1838 'cross':1400,1892 'cross-process':1399 'cross-refer':1891 'crud':1514 'current':1325 'cutoff':398 'data':24,256,505,1635,1641,1694 'data-dictionari':255 'databas':64,1186,1352,1569,1782 'dataclass':906,908,920 'dataset':541 'date':399,1212 'db':356,745,983,1016,1793 'db.copy':551 'db.select':359,535,986,1019 'db_manager.get':1825 'ddl':1786 'def':951,1006 'default':142 'defin':893 'definit':273 'delet':1090,1672 'deliv':828 'depend':150,1295,1314,1840 'depth':231 'desc':404 'design':1408,1451,1805 'detail':325,650,1592,1959 'dev':590 'di':131,153,1335 'dialect':91,758,1058,1644,1732 'dict':732 'dictionari':25,257,1642 'direct':34,117,639,1172,1193,1251,1533,1720,1827 'dishka':1842 'distanc':1873 'doc':1897,1907,1910 'document':1602 'domain':1856 'driver':10,246,272,295,343,354,456,622,657,667,738,743,812,844,981,1014,1195,1299,1311,1320,1332,1537,1656,1674,1722,1724,1828,1861 'driver-sid':1655 'drop':1116 'dsn':330,937 'duckdb':526,591,593,1142,1541 'duplic':1935 'dynam':627,752,867,1247 'e.g':1359 'ecosystem':1529 'edg':1955 'email':386,417,421,927,991 'embed':1878,1883 'enabl':770 'entri':1061 'enum':1235 'eq':390,1071 'essenti':373 'etc':882 'event':1349,1754,1757 'eventmessag':1384 'everi':207 'exampl':886,1209 'execut':508,512,626,898,949,1206,1662,1834 'exemplar':1888 'exhaust':791 'exist':469,1115,1122 'explicit':1566 'export':506 'extens':21,104,253,1316,1740,1765,1789 'extract':1802 'factori':1035,1668 'fals':1627 'fastapi':147,1303 'fastapi/starlette':1744 'featur':569,1292,1645 'field':1256 'file':16,77,309,636,1712 'filter':17,156,248,381,497,687,876,879,964,999,1187,1189,1207,1228,1270,1687,1815,1836,1839 'first':98,102,188,227,1581 'first-parti':101,187,1580 'flag':1646 'flask':158,1315 'flexibl':57 'flow':1636 'fluent':1038 'focus':1949 'follow':1601 'four':106 'framework':20,96,108,193,208,225,239,1287,1289,1736,1739 'framework-agnost':238 'fromdishka':1845 'full':130,1042,1263,1727 'full-text':1262 'futur':263,276,816 'g':1323 'general':1939 'generat':1879 'generic':717,1930 'get':477,727,1007,1649,1651,1653 'get-by-id':476 'github':1902 'github.com':1904,1921 'github.com/litestar-org/sqlspec':1920 'github.com/tobymao/sqlglot':1903 'give':1485,1531 'given':1423 'guardrail':706,1623 'guid':122,226,1597 'handl':757 'handler':155,288,1341,1382,1866 'happi':1525 'heterogen':1568 'hold':784,1418 'hook':29,1495 'id':384,434,436,449,451,479,923,989,1233 'ilik':1260 'immut':1426 'implement':643 'import':7,264,277,317,377,711,817,837,907,911,915,1612 'incollectionfilt':1224 'index':1474,1654 'inform':1442 'inherit':1461 'init':1317 'inject':1296,1310,1337,1847,1867 'insert':410,447,1077,1670 'insert/update/delete':511 'insid':1526 'instanc':1435 'instead':1459 'instruct':1593 'int':924,956,960,1010 'integr':121,191,519,1288,1290,1499,1573,1576,1695,1698,1738,1745,1747,1794,1843,1958 'intent':1885 'interfac':61 'introspect':26,258,282,1648 'invalid':1398 'inventori':429 'inventory.product':433 'job':1405 'join':1072 'jump':116 'keep':765,1946 'key':568,1063,1112,1291,1407,1882,1894 'language/framework':1931 'larg':540 'layer':1491,1809 'leak':790 'lifecycl':350,662,739,841,1302,1494 'lifespan':180 'like':1261 'limit':406,970,1075,1242 'limit/offset':885 'limitoffsetfilt':689,881,916,969,1237,1691 'list':494,499,952,962 'listen':1361 'litestar':127,140,303,1293,1329,1578,1742,1751,1791,1792,1944 'live':209 'load':74,547,1182,1710,1713 'local':589 'localhost':333,940 'log':1218 'lookup':491 'manag':347,659,736,788,846,1348 'mani':360,493,513,625,987,1279,1683 'manipul':1625 'manual':214,884,1346 'map':865 'mapper':49 'match':94,120,438,445,794,849,1101,1104 'match-your-framework':93 'materi':1158 'max':338,468,945 'may':296,822 'merg':425,1096,1673 'metadata':638,1658,1719 'method':247,457,459,623,668,1043,1064,1196,1381,1675 'middlewar':182,215,1305 'migrat':250,1775,1778,1787,1790 'min':335,942 'model':684,896,919 'modifi':1202 'modul':270,287,813,821 'msgspec':683 'multi':220,1850 'multi-config':219 'multi-provid':1849 'multipl':1274 'mypyc':1607,1639,1906 'mypyc.readthedocs.io':1908 'mysql':600 'name':14,385,416,419,607,616,807,925,967,990,1109,1120,1368,1388,1821 'namespacedcach':1637 'nativ':596,1146,1548,1777 'need':566,1559 'never':772,783 'new':1434 'none':485,489 'notfounderror':481 'notifi':1362,1372 'numeric/pyformat':575 'object':729,880,1190,1385,1417,1432 'observ':28,133,249,1795,1796 'offici':1914 'offset':973,1076,1244 'offsetpagin':1501 'one':113,472,473,483,486,1681,1833 'oper':517,1428,1811 'opinion':1488 'option':490 'oracl':605,1871 'oracledb':606,809,1540 'order':400,1073,1286 'orderbyfilt':690,917,965,1246,1692 'orm':54,1489,1589 'other':126,531 'out-of-the-box':197 'outsid':786 'overhead':1150 'page':955,958,971,974,976,1239 'page-bas':1238 'pagin':18,903,1223,1241,1688 'panda':1169 'param':576,583,588,604,609,618 'paramet':677,795,847,1439,1734 'parameter':777,900 'pars':1467 'parti':103,189,1582 'pass':80,332,939,1052,1192,1273,1465 'path':838,1152,1590,1718 'pattern':313,565,1319,1594,1628,1763,1804,1806,1817,1852 'payload':1374,1389 'per':1771 'per-adapt':1770 'perform':1630 'pgvector':1890 'pick':1507,1561 'pid':1391 'pipelin':87,1446 'plugin':1583,1743 'plugin.get':167 'plugin.init':161 'plugin.provide':151 'point':1062 'polar':1168 'pool':652,793 'portal':172 'postgresql':570,577,1360 'power':85 'practic':1620 'prefer':746,760 'primari':1111 'principl':1409,1940 'process':1401,1445,1466 'product':448 'project':111 'protocol':1449,1454 'protocol-bas':1448 'provid':56,157,1036,1336,1851 'psycopg':573,579,804 'pub/sub':1358,1759 'publish':1370,1380 'pull':165 'pull-bas':164 'purpos':1208 'pyarrow':1171,1909 'pyarrow.table':503 'pydant':681 'pyformat':582,603 'python':51,314,374,521,769,904,1453,1942 'qmark':587 'qti':441,452 'qualiti':1606 'queri':12,48,244,371,498,628,629,671,725,748,753,764,778,781,856,868,901,948,1031,1219,1660,1663 'quick':310 'rais':480 'rang':1213,1222 'raw':67,619,731 're':1524 'read':97,223 'real':1395 'real-tim':1394 'receiv':1383 'reduc':1934 'refer':311,1473,1598,1676,1893,1915 'references/adapters.md':1726 'references/adk.md':1766 'references/architecture.md':1633 'references/arrow.md':1699 'references/commit-modes.md':211,212 'references/data-dictionary.md':1643 'references/dishka-integration.md':1844 'references/driver_api.md':1677 'references/events.md':1760 'references/extensions.md':145,146,1741 'references/fastapi-integration.md':148,149 'references/filters.md':1690 'references/flask-integration.md':159,160 'references/loader.md':1714 'references/migrations.md':1780 'references/multi-database.md':217,218 'references/observability.md':1798 'references/patterns.md':1807 'references/query_builder.md':1666 'references/service-patterns.md':1818 'references/sqlglot.md':1621 'references/standards.md':1608 'references/starlette-integration.md':174,175 'references/storage.md':1748 'references/vector-search.md':1870 'region':543,545 'regist':1330 'registri':222,854,1725,1730 'repositori':1496 'request':1307,1854,1859 'request-scop':1306,1853,1858 'request.state':176 'resourc':1895 'rest':135,233 'result':680,726,857,1549 'return':460,1003,1029,1083,1089,1095,1128,1163,1433 'rout':1313,1340 'row':474,487,496,509,514,1156,1520 'rule':261,266,1611,1932 'run':695 'runner':1779 'runtim':284,1456,1647 'safe':46,864 'safeti':1438 'sanic':190 'scalar':466 'schema':368,675,722,859,1000,1162,1776 'scope':1308,1855,1860,1864 'search':1259,1266,1717,1869 'searchfilt':691,1257,1693 'see':144,852,1584 'select':361,379,463,471,482,492,500,538,624,988,1021,1065,1125,1278,1669,1678,1680,1682,1684,1700,1830,1832 'semant':1800 'serial':1149 'server':1356 'server-sid':1355 'servic':289,1490,1497,1808,1816,1857 'session':152,168,178,1301,1752 'set':653,888,1087,1231 'setup':243,932 'sha256':1881 'sha256-keyed':1880 'shape':672 'share':202,1923,1927 'ship':100 'side':1357,1657 'similar':1875,1889 'sinc':396,397 'singl':465,1277,1411,1464 'single-pass':1463 'singleton':1865 'size':336,339,943,946,959,972,977 'skill':40,1575,1938,1948 'skill-sqlspec' 'skill.md':138,236 'skip':124 'sort':1248,1255 'sourc':1412 'source-litestar-org' 'spanner':613,615 'specif':713,1953 'sql':15,35,47,68,75,378,620,634,766,774,1034,1199,1225,1376,1416,1431,1534,1567,1667,1711,1822,1826 'sql.create':1107 'sql.delete':1091 'sql.drop':1118 'sql.insert':412,1078 'sql.merge':428,1097 'sql.select':383,631,1066 'sql.update':1085 'sqlalchemi':1528 'sqlfileload':9,637,761,1715 'sqlglot':84,1054,1618,1896,1901 'sqlglot-pow':83 'sqlglot.com':1899 'sqlglot.com/sqlglot.html':1898 'sqlite':584,585,806,1543 'sqlspec':1,6,8,37,39,41,99,184,267,376,829,878,1188,1477,1530,1781 'sqlspec.adapters':839 'sqlspec.adapters.asyncpg':316,910 'sqlspec.core.filters':914 'sqlspec.dev':1916,1918 'sqlspec.dev/changelog.html':1917 'sqlspecartifactservic':1769 'sqlspecasyncservic':1819 'sqlspecmemoryservic':1768 'sqlspecplugin':128,1294,1327 'sqlspecsessionservic':1767 'standard':1603,1613 'starlett':173,1304 'state':1420 'statement':79,409,424,455,633,1050,1204,1424 'static':763 'status':391 'step':560,641,692 'stmt':382,411,427 'storag':1737,1746 'store':23,1750,1753,1774 'str':926,928 'stream':1550 'strict':475 'string':621,755,775,874,1200,1268 'structur':1615 'style':260,796,848,1265,1519,1604,1735 'styleguid':1924,1928 'subscrib':1366 'subscribe/publish':1762 'summari':458 'suppli':1254 'support':196,1354 'surfac':1515 'sync':578,580,610 'system':1638,1689 'tabl':533,555,557,855,1080,1086,1093,1106,1108,1117,1119,1132,1164,1177,1179,1650 'target':556,1098,1178 'task':887 'telemetri':1799 'templat':1823 'tenant':1814 'termin':1047 'test':290,1614 'text':1258,1264 'time':1221,1396 'time-rang':1220 'timestamp':1784 'tool':1952 'tool-specif':1951 'topic':203,241 'topic-advanced-alchemy' 'topic-agent-skills' 'topic-agentskills' 'topic-ai-agents' 'topic-claude-code-plugin' 'topic-claude-code-skills' 'topic-gemini-cli-extension' 'topic-htmx' 'topic-inertia' 'topic-litestar' 'topic-mcp' 'topic-python' 'trace':1797 'tracker':1788 'transform':1469 'trigger':1406 'true':367,405,998,1028 'truth':1414 'type':45,369,676,679,709,723,728,860,863,895,918,1001,1298,1343,1437,1441,1457,1609 'type-saf':44,862 'typic':298 'updat':431,440,1084,1671 'updates.product':435,450 'updates.qty':442,453 'upsert':426,1812 'use':30,69,112,292,300,305,341,430,461,655,674,708,721,734,776,823,834,842,858,869,877,1099,1173,1210,1363,1392,1452,1926 'user':331,357,363,370,388,414,558,922,938,954,963,984,994,1002,1004,1008,1024,1253 'user-suppli':1252 'util':1617 'uuidauditbas':1493 'v30':1622 'valid':89,694,698,825,1056,1471 'valu':418,464,1020,1082,1236,1679,1831 'variad':1835 'variant':183 'vector':1868,1872 'verifi':831 'version':1785 'vertex':1876 'via':171,1322,1342,1579,1824,1887 'want':1511,1565 'web':107 'wire':1841 'without':1345 'work':32,704 'workflow':559,1954 'workload':1137 'wrap':181 'write':66 'zero':523,598,1139,1704 'zero-copi':522,597,1138,1703","prices":[{"id":"3199b3b9-7997-42e8-bd20-5b780100d1e7","listingId":"5030c92e-c4b2-42e1-95fd-a21037221547","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"litestar-org","category":"litestar-skills","install_from":"skills.sh"},"createdAt":"2026-05-18T13:20:59.912Z"}],"sources":[{"listingId":"5030c92e-c4b2-42e1-95fd-a21037221547","source":"github","sourceId":"litestar-org/litestar-skills/sqlspec","sourceUrl":"https://github.com/litestar-org/litestar-skills/tree/main/skills/sqlspec","isPrimary":false,"firstSeenAt":"2026-05-18T13:20:59.912Z","lastSeenAt":"2026-05-18T19:13:55.518Z"}],"details":{"listingId":"5030c92e-c4b2-42e1-95fd-a21037221547","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"litestar-org","slug":"sqlspec","github":{"repo":"litestar-org/litestar-skills","stars":7,"topics":["advanced-alchemy","agent-skills","agentskills","ai-agents","claude-code-plugin","claude-code-skills","gemini-cli-extension","htmx","inertia","litestar","mcp","python","sqlspec"],"license":"mit","html_url":"https://github.com/litestar-org/litestar-skills","pushed_at":"2026-05-13T16:04:09Z","description":"Opinionated first-party agent skills, plugins, subagents, slash commands, and MCP servers for the Litestar framework ecosystem — publishable to Claude Code, Gemini CLI, Codex CLI, Cursor, OpenCode, and VS Code/Copilot from a single repo.","skill_md_sha":"359b95fd6456fc41dd8839295fedff64c4496933","skill_md_path":"skills/sqlspec/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/litestar-org/litestar-skills/tree/main/skills/sqlspec"},"layout":"multi","source":"github","category":"litestar-skills","frontmatter":{"name":"sqlspec","description":"Auto-activate for sqlspec imports, SQLSpec, SQLFileLoader, driver adapters, query builders, named SQL files, filters, pagination, Arrow, framework extensions, ADK stores, data dictionary introspection, or observability hooks. Use when working with direct SQL through sqlspec across Litestar, FastAPI, Flask, or Starlette. Not for ORM-specific repository patterns or raw driver usage without sqlspec."},"skills_sh_url":"https://skills.sh/litestar-org/litestar-skills/sqlspec"},"updatedAt":"2026-05-18T19:13:55.518Z"}}