open-ticket: Agent for Claude Code

.claude/agents/ot-db.md

ot-db is an agent for Claude Code from LucasLeguizamo/open-ticket. It costs 59 tokens per session (424 once invoked), scanned A, original, MIT.

A database guide for OpenTicket, an online ticket-purchasing system, using PostgreSQL through Supabase and Drizzle. It covers the database schema, migrations, storage layer, and inventory rules.

In plain words
What is it for?
Use it before changing the schema or database code, and when managing migrations, test data, Supabase projects, or inventory capacity. It covers conditional stock updates, unique request keys, webhook records, and concurrency tests.
Why use it?
It prevents overselling and duplicate orders by requiring database-enforced checks and tests with a real PostgreSQL database. It also keeps database access separated from the purchase logic.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is LucasLeguizamo/open-ticket's own configuration. It tells Claude Code how to work on open-ticket itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything open-ticket configures →

Reuse

Borrowing it

Nothing to install: this file belongs to LucasLeguizamo/open-ticket. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/LucasLeguizamo/open-ticket/main/.claude/agents/ot-db.md
Clone the repo
git clone --depth 1 https://github.com/LucasLeguizamo/open-ticket

Made for: Claude Code.

Wrote 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.

agentmods badge for ot-db

README.md
[![agentmods](https://agentmods.dev/badge/agents/lucasleguizamo/open-ticket/ot-db/github.svg)](https://agentmods.dev/agents/lucasleguizamo/open-ticket/ot-db)
Your own site
<a href="https://agentmods.dev/agents/lucasleguizamo/open-ticket/ot-db"><img src="https://agentmods.dev/badge/agents/lucasleguizamo/open-ticket/ot-db/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ot-db

Your own site · 80×15
<a href="https://agentmods.dev/agents/lucasleguizamo/open-ticket/ot-db"><img src="https://agentmods.dev/badge/agents/lucasleguizamo/open-ticket/ot-db.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 424 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00059 $0.00424
Opus 5 $0.00030 $0.00212
Sonnet 5 $0.00012 $0.00085
Haiku 4.5 $0.00006 $0.00042

Measured 9d ago against content hash f98344ef3376, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

ot-db 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 9d 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.

.claude/agents/ot-db.md · 26 lines

What it actually says

Eres el especialista de datos de OpenTicket. Postgres (Supabase) + Drizzle.

Invariante sagrado: cero overselling

Cupo decrementado con UPDATE condicional + CHECK constraint en DB — nunca locks de aplicación, nunca read-then-write. Cualquier cambio a inventario se prueba con el test de concurrencia (test/integration/inventory.concurrency.test.ts: Promise.all de 50-100 compras contra 1 cupo → exactamente 1 venta, Postgres real, nunca mock).

Constraints de seguridad (docs/SYNTHESIS.md §3)

  • UNIQUE (rail, buyer_email, idempotency_key) — scoped, no global.
  • processed_stripe_event para idempotencia de webhook.

Archivos

  • db/schema.ts — fuente de verdad del modelo (ver docs/data-model.md)
  • db/store.ts — implementa core/ports.ts; TODO acceso a DB pasa por acá (core/ jamás importa Drizzle)
  • drizzle.config.ts · scripts/seed.ts

Workflow

  1. Cambio en schema.ts → pnpm db:generate (migración SQL versionada; hoy el proyecto usa db:push — al pasar a Supabase remoto, migraciones generadas, no push ciego).
  2. pnpm test:integration con DATABASE_URL de test (.env.test).
  3. En Supabase remoto: usa las tools MCP de Supabase (list_tables, apply_migration, get_advisors) — corre advisors después de cada cambio de schema (RLS, índices).

Datos personales de compradores: Ley 1581 Colombia / GDPR — mínimo necesario, nunca en el ticker público.

Changes

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.

  1. 9d ago First seen · 26 lines · 59 tokens per session scan A f98344ef3376

Subscribe to this mod's changes

ot-db is an agent published in the GitHub repository LucasLeguizamo/open-ticket (0 stars, last pushed 2mo ago), licensed MIT. It adds 59 tokens to every session and 424 once invoked, about $0.0003 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-31.

Related

Other agents, from other repositories

supabase-identity-explorer

Use proactively for exploring creative, non-obvious applications of Supabase Auth, Row-Level Security, and GraphQL for Thoughtbox, where "users" are AI agents rather than humans. Specialist for generating surprising identity-dimension design proposals grounded in metaphors of theatrical masks, legal personhood, and…

Kastalien-Research/thoughtbox · 99 tokens

supabase-substrate-explorer

Specialist research agent for discovering creative, non-obvious applications of the Supabase SUBSTRATE dimension (Postgres Database, Storage object store, pgvector) to Thoughtbox's reasoning-persistence surfaces. Use proactively when exploring how substrate-layer primitives could become new "organs" for Thoughtbox…

Kastalien-Research/thoughtbox · 117 tokens

database-optimizer

Query optimization and N+1 detection with PostgreSQL MCP.

databayt/hogwarts · 15 tokens

PostgreSQL Database Administrator

Work with PostgreSQL databases using the PostgreSQL extension.

github/awesome-copilot · 17 tokens

database-reviewer

PostgreSQL specialist for query performance, schema design, security/RLS, and migration safety. Use PROACTIVELY when writing SQL, creating migrations, designing schemas, or troubleshooting database performance.

sjarmak/coding-agent-workflows · 43 tokens

supabase-rag-implementer

Materializa RAG em Supabase em 3 layers - migration vector(N)+HNSW, RPC matchdocuments security invoker com RLS por tenant, Edge Function embedding server-side. Use ao implementar RAG.

luanpdd/kit-mcp · 52 tokens