{"id":50490882,"url":"https://github.com/melonask/sqlx-skills","last_synced_at":"2026-06-02T02:31:19.948Z","repository":{"id":353009175,"uuid":"1216516978","full_name":"melonask/sqlx-skills","owner":"melonask","description":"A comprehensive AI skill for the sqlx Rust library — the async-first, pure-Rust SQL toolkit with compile-time query checking. Supports PostgreSQL, MySQL, and SQLite.","archived":false,"fork":false,"pushed_at":"2026-04-22T03:27:35.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-22T05:33:13.688Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/melonask.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-21T01:39:44.000Z","updated_at":"2026-04-22T03:27:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/melonask/sqlx-skills","commit_stats":null,"previous_names":["melonask/sqlx-skills"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/melonask/sqlx-skills","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melonask%2Fsqlx-skills","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melonask%2Fsqlx-skills/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melonask%2Fsqlx-skills/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melonask%2Fsqlx-skills/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/melonask","download_url":"https://codeload.github.com/melonask/sqlx-skills/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melonask%2Fsqlx-skills/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33803734,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-02T02:31:19.372Z","updated_at":"2026-06-02T02:31:19.943Z","avatar_url":"https://github.com/melonask.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# sqlx-skills\n\nA comprehensive AI skill for the [sqlx](https://github.com/launchbadge/sqlx) Rust library — the async-first, pure-Rust SQL toolkit with compile-time query checking. Supports PostgreSQL, MySQL, and SQLite.\n\n## Overview\n\nThis skill enables an LLM to generate correct, production-ready Rust code using sqlx. It covers every major feature of the library with practical examples, type references, and common-pitfall documentation so that the LLM developer can build reliable database solutions without trial-and-error errors.\n\nThe skill uses a **progressive disclosure** architecture: the main `SKILL.md` file provides a concise quick-reference with 11 essential patterns, while 8 deep-dive reference files cover each topic in full detail (type tables, error code catalogs, Cargo.toml recipes, and more).\n\n## Installation\n\n```bash\nnpx skills add melonask/sqlx-skills\n```\n\n## What This Skill Covers\n\n| Feature Area              | Highlights                                                                                                                                                                                                                     |\n| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| **Compile-Time Checking** | `query!`, `query_as!`, `query_scalar!`, type overrides, `query_unchecked!` variants, offline mode (`cargo sqlx prepare`), `.sqlx/` directory, query files                                                                      |\n| **Connection Pooling**    | `PgPool` / `MySqlPool` / `SqlitePool`, pool options (max/min connections, timeouts, lifetimes), connect options, SSL modes, `after_connect` hooks, pool lifecycle                                                              |\n| **Type Mapping**          | 40+ Rust-to-SQL type mappings across PostgreSQL, MySQL, and SQLite; `FromRow` derive attributes (`rename`, `flatten`, `skip`, `json`); custom `Encode`/`Decode`; transparent types; enum mapping; composite types              |\n| **Transactions**          | Manual transactions, closure-based (auto-commit/rollback), nested transactions (SAVEPOINTs), generic functions over `Executor`                                                                                                 |\n| **Migrations**            | CLI commands (`add`, `run`, `revert`, `info`), `migrate!()` macro, reversible migrations (`-- down` separator), `sqlx.toml` configuration                                                                                      |\n| **Testing**               | `#[sqlx::test]` attribute macro, fixture files, test database lifecycle, repository pattern for mockability, in-memory SQLite testing                                                                                          |\n| **Database-Specifics**    | PostgreSQL (PgListener / LISTEN/NOTIFY, COPY bulk import, arrays, ranges, composite types, SSL modes), MySQL (placeholder syntax, `LAST_INSERT_ID`), SQLite (in-memory, WAL journal mode, PRAGMA, boolean pitfall, extensions) |\n| **Error Handling**        | Full `sqlx::Error` enum reference, PostgreSQL SQLSTATE error codes (23505 unique violation, 23503 FK violation, etc.), Axum integration patterns, custom error conversion                                                      |\n| **Feature Flags**         | Complete 39-flag reference table, Cargo.toml patterns for every use case (PostgreSQL, MySQL, SQLite, minimal, all-databases), TLS options, runtime options                                                                     |\n\n## File Structure\n\n```\nsqlx/\n├── SKILL.md                              # Main guide (410 lines)\n└── references/\n    ├── compile-time-checking.md          # Query macros, type overrides, offline mode (225 lines)\n    ├── connection-pooling.md             # Pool config, connect options, lifecycle (178 lines)\n    ├── type-mapping.md                   # Full type table, FromRow, custom types (230 lines)\n    ├── transactions-migrations.md        # Transactions, migrations, CLI commands (246 lines)\n    ├── testing-mocking.md                # #[sqlx::test], fixtures, repository pattern (271 lines)\n    ├── database-specifics.md             # PostgreSQL/MySQL/SQLite specifics (303 lines)\n    ├── error-handling.md                 # sqlx::Error, error codes, patterns (228 lines)\n    └── feature-flags.md                  # Complete flag reference, Cargo.toml recipes (180 lines)\n```\n\n**Total: 2,271 lines** of documentation.\n\n## How It Works\n\n1. **Triggering** — The skill description is designed to activate whenever the user mentions sqlx, Rust database operations, compile-time query checking, async database Rust, or any SQL database interaction in Rust.\n2. **Core guide** — `SKILL.md` loads first with a quick-start setup, 11 essential patterns, placeholder syntax reference, key imports, and common pitfalls.\n3. **Deep dives** — The LLM reads reference files on demand based on the specific task. For example, a question about error handling triggers loading `references/error-handling.md`.\n\n## Trigger Phrases\n\nThis skill activates on mentions of: `sqlx`, `Rust database`, `Rust PostgreSQL`, `Rust MySQL`, `Rust SQLite`, `Rust SQL toolkit`, `compile-time query checking`, `async database Rust`, `database migrations Rust`, `sqlx pool`, `sqlx macros`, `query!`, `query_as!`, `FromRow`, `PgPool`, `#[sqlx::test]`, `PgListener`, `cargo sqlx prepare`, `SQLX_OFFLINE`, or any SQL database interaction in Rust.\n\n## Requirements\n\n- sqlx version 0.8.x (the skill references 0.8 APIs and feature flags)\n- Rust edition 2021+\n- An async runtime: Tokio or async-std\n- For compile-time checking: a running database or prepared `.sqlx/` metadata\n\n## License\n\nThis skill is provided as-is for use with LLM-powered development environments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelonask%2Fsqlx-skills","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmelonask%2Fsqlx-skills","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelonask%2Fsqlx-skills/lists"}