duet
Write queries and mutations with Gertrude's custom Duet/DuetSQL ORM.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Menu
Write queries and mutations with Gertrude's custom Duet/DuetSQL ORM.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Basé sur la classification professionnelle SOC
Query and analyze the Gertrude PostgreSQL database. Use when answering questions about database schema, writing SQL queries, analyzing data, or debugging database-related issues.
Update local Apple device artwork for the Dashboard_v2 from ipsw.dev. Use when asked to add, refresh, audit, crop, or wire up Mac, iPhone, or iPad model images in web/dashboard-v2/public/devices, especially after new Apple model releases.
Run or design an agentic persona usability eval of a Gertrude surface - drive a real interface as a zero-backstory user, think aloud, and score it on a rubric. Use when asked to usability/UX test a site or app, or to measure whether a change improves real-user comprehension. The working driver today is web (Playwright MCP); native apps are not yet supported.
Verify non-trivial database migrations (data backfill, column drops, FK retargets, type changes, dedup) by capturing pre-migration baseline state, running the up/down/up cycle through the user, and asserting expected outcomes at each step. Use when a migration touches data — not just schema.
Research and prepare a new public keychain for a website or service. Use when asked to create or prepare a public keychain for a domain.
| name | duet |
| description | Write queries and mutations with Gertrude's custom Duet/DuetSQL ORM. |
Import DuetSQL when using the fluent query DSL. It provides operators like ==,
!=, <, >, .&&, .||, and |=|.
Prefer operator-style predicates over explicit enum cases:
import DuetSQL
try await Parent.query()
.where(.email == email)
.where(.deletedAt == nil)
.all(in: db)
Use .deletedAt == nil / .deletedAt != nil, not .isNull(.deletedAt) or
.not(.isNull(.deletedAt)). For grouped logic, prefer
(.deletedAt == nil .|| .deletedAt > cutoff) .&& .email == email.
Duet has db.transaction { tx in ... }. In the API target, prefer
db.withTransaction { tx in ... } when dependency values are used inside the closure;
it carries dependency context across SQLKit/Postgres and avoids surprising test failures.
Use transactions for rare and IMPORTANT multi-step writes that must commit or roll back together to preserve critical business invariantes. Our customer base is small, and our API almost never crashes, so we don't need to be over defensive. Do not wrap every resolver, single insert, or low-value cleanup by default; they add complexity and may cost a little performance.
createdAt in testsIf you need to backdate createdAt for tests, use the modifyCreatedAt helper.
Model structs are declared with @DuetModel(schema: "parent", table: "dash_announcements"),
which generates Id, CodingKeys, and insertValues from the stored properties — never
hand-write those. Column values bind via PostgresBindable; primitives, Date, UUID,
Tagged, and optionals are built in. For custom property types, add a conformance in
api/Sources/Api/Models/Models+DuetSQL.swift:
PostgresRawBindable (binds rawValue); the column is
text with a CHECK constraint. NEVER create a Postgres enum type (CREATE TYPE ... AS ENUM) — this codebase deliberately eliminated them because check constraints are far
easier to evolvePostgresJsonable