Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/rodolfochicone/rc-project/rc-sqlxnpx skills add rodolfochicone/rc-project --skill rc-sqlxgit clone --depth 1 https://github.com/rodolfochicone/rc-projectWrote 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/rodolfochicone/rc-project/rc-sqlx)<a href="https://agentmods.dev/skills/rodolfochicone/rc-project/rc-sqlx"><img src="https://agentmods.dev/badge/skills/rodolfochicone/rc-project/rc-sqlx.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00094 | $0.00734 |
| Opus 5 | $0.00047 | $0.00367 |
| Sonnet 5 | $0.00019 | $0.00147 |
| Haiku 4.5 | $0.00009 | $0.00073 |
Grade A, and why
rc-sqlx 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 4d ago.
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 — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SQLx 0.8 + PostgreSQL
Async SQL for Rust without a heavy ORM. Target: sqlx 0.8.x, PostgreSQL 16 (compatible with 14+). Complements rc-sql (general SQL design) and rc-axum (HTTP layer).
Core workflow
- Schema first — migrations under version control; no ad-hoc prod DDL from app code without a migration path.
- Pool — one
PgPoolin app state; tunemax_connectionsto VPS/DB limits. - Queries — always bind parameters (
$1,$2); neverformat!user input into SQL. - Mapping —
query_as/FromRowor compile-timequery_as!whenDATABASE_URLis available at build. - Transactions — multi-step writes use
pool.begin()→ commit/rollback. - Security — least-privilege DB role; secrets only in env. Read
references/security.md. - Test —
sqlx::testor isolated DB. Readreferences/testing.md.
Reference guide
| Topic | File | Load when |
|---|---|---|
| Pool, query_as, transactions, macros | references/guide.md |
Implementing queries |
| Injection, roles, secrets | references/security.md |
Reviewing data access |
| Migrations (sqlx-cli / embed) | references/migrations.md |
Schema changes |
| Integration tests | references/testing.md |
DB tests |
Must do
- Use bound parameters for all dynamic values (Postgres
$n). - Prefer
query_as::<_, T>orquery_as!into serde/FromRow structs. - Set pool size consciously (small VPS: start with 5–10).
- Run migrations in deploy pipeline before app start (or controlled startup migrate).
- Map
sqlx::Errorto domain/HTTP errors without leaking SQL internals to clients.
Must not do
- Share one long-lived transaction across HTTP requests.
- Use the superuser role for the app in production.
- Commit migrations that are not reversible or documented when data loss is possible.
- Ignore offline mode needs for CI (
SQLX_OFFLINE=true+.sqlxdata) if using macros without a live DB.
Output template
- Migration SQL (up, and down if required)
- Rust types (
FromRow/ domain models) - Query functions (pool/tx receiver)
- Error mapping
- Tests +
cargo test/ sqlx prepare notes
What ships with it
4 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.
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.
- 4d ago First seen · 60 lines · 94 tokens per session scan A 157a4aaa53e5
rc-sqlx is a skill published in the GitHub repository rodolfochicone/rc-project (19 stars, last pushed 28d ago), licensed MIT. It adds 94 tokens to every session and 734 once invoked, about $0.0005 per session on Opus 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
alembic-migration
Create, review, and apply database schema changes with Alembic. Use whenever a SQLAlchemy model is added or changed, a column/index/constraint needs to change, or a data backfill is required — anything that alters the PostgreSQL schema.
postgresql-table-design
Design a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.
database-schema-changes
Guide for making database schema changes in Platypus using Drizzle ORM — editing the schema, pushing to a dev database, and generating the migration that ships.
database
Query and manage SQLite, PostgreSQL, and MySQL databases from the command line. Use when the user asks to run SQL queries, inspect database schemas, create or alter tables, import or export data, manage indexes, analyze query performance with EXPLAIN, back up or restore databases, or perform CRUD operations via…
kverus-common-sync
Check whether the installed kverus-common skill stays synchronized with the local Verus guide under database/verified/code/tools/verus/source/docs/guide/src. Use when validating kverus-common after guide updates, before committing skill changes, or when checking for stale guide-derived references and missing source…
cli-forge-data
Design and implement safe PostgreSQL database changes for Rust/SQLx applications. Use for new schemas, migrations, constraints, indexes, repositories, transaction boundaries, state machines, idempotency, concurrency control, queues, multi-tenancy, soft deletion, ledgers, outbox/inbox, repair jobs, or corrections…