From beagle-rust
Reviews Rust sqlx database code for compile-time query checks, connection pool management, migrations, type mappings, transactions, and PostgreSQL usage. Use for sqlx/Rust DB reviews.
npx claudepluginhub existential-birds/beagle --plugin beagle-rustThis skill uses the workspace's default tool permissions.
1. **Check Cargo.toml** — Note sqlx features (`runtime-tokio`, `tls-rustls`/`tls-native-tls`, `postgres`/`mysql`/`sqlite`, `uuid`, `chrono`, `json`, `migrate`)
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
runtime-tokio, tls-rustls/tls-native-tls, postgres/mysql/sqlite, uuid, chrono, json, migrate)query!, query_as!) vs runtime (query, query_as)Report findings as:
[FILE:LINE] ISSUE_TITLE
Severity: Critical | Major | Minor | Informational
Description of the issue and why it matters.
| Issue Type | Reference |
|---|---|
| Query macros, bind parameters, result mapping | references/queries.md |
| Migrations, pool config, transaction patterns | references/migrations.md |
query!, query_as!) used where possiblesqlx.toml or DATABASE_URL configured for offline compile-time checking$1, $2)query_as! maps to named structs, not anonymous records, for public APIs.fetch_one(), .fetch_optional(), .fetch_all() chosen appropriately.fetch() (streaming) used for large result setsPgPool shared via Arc or framework state (not created per-request)pool.begin() used for multi-statement operationstx.begin()) if neededsqlx::Type derives match database column typesUuid, DateTime<Utc>, Decimal types used (not strings for structured data)Option<T> used for nullable columnsserde_json::Value used for JSONB columnsYYYYMMDDHHMMSS_description.sql)sqlx::migrate!() called at application startupquery()) where compile-time (query!()) could verify correctness.fetch_all() on potentially large tables.fetch_optional() (using .fetch_one() then handling error for "not found")SELECT * when only specific columns neededquery_as! for type-safe result mappingquery() for dynamic queries — Compile-time checking doesn't work with dynamic SQLsqlx::FromRow derive — Valid alternative to query_as! for reusable row typesTEXT columns for enum storage — Valid with sqlx::Type derive, simpler than custom SQL types.execute() ignoring row count — Acceptable for idempotent operations (upserts, deletes)Load and follow beagle-rust:review-verification-protocol before reporting any issue.