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 skills add fcsouza/agent-skills --skill postgres-game-schemagit clone --depth 1 https://github.com/fcsouza/agent-skillsWrote 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/fcsouza/agent-skills/postgres-game-schema)<a href="https://agentmods.dev/skills/fcsouza/agent-skills/postgres-game-schema"><img src="https://agentmods.dev/badge/skills/fcsouza/agent-skills/postgres-game-schema/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.
<a href="https://agentmods.dev/skills/fcsouza/agent-skills/postgres-game-schema"><img src="https://agentmods.dev/badge/skills/fcsouza/agent-skills/postgres-game-schema.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00081 | $0.02147 |
| Opus 5.5 | $0.00032 | $0.00859 |
| Sonnet 5.5 | $0.00016 | $0.00429 |
| Haiku 4.5 | $0.00008 | $0.00215 |
Grade A, and why
postgres-game-schema 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 19d 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 — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PostgreSQL Game Schema
The schema is the value of this skill. Install, driver setup, config and migrations come from the vendor: use the neon-drizzle skill if it is installed, otherwise https://orm.drizzle.team/docs/get-started.
Target the stable Drizzle line, drizzle-orm 0.45.x. The Drizzle docs install lines use drizzle-orm@rc and drizzle-kit@rc; pin the 0.45 versions instead (see "Drizzle 1.0" below).
Conventions
Every table and query in a game project follows these. Other skills (stripe-game-payments, gameplay-analytics, game-economy-design) build on them.
- Naming. Tables are plural snake_case (
item_definitions). Columns are snake_case in SQL and camelCase in TypeScript:playerId: text("player_id"). Indexes are named<table>_<columns>_idx. - IDs.
text("id").primaryKey().$defaultFn(() => crypto.randomUUID()). Player-facing identifiers are never auto-increment integers; sequential ids let anyone enumerate players and items. - Timestamps.
timestamp(...).notNull().defaultNow(). Entity and catalog tables (players,item_definitions,guilds) carrycreatedAtandupdatedAt; append-only and state rows carry the time that matters (events.createdAt,sessions.startedAt,guild_members.joinedAt). Give a new mutable table both columns. SetupdatedAtin every update; a column default fills it only on insert. - Soft delete.
playershasdeletedAt: timestamp("deleted_at"); a deleted player keeps their rows for history. Every read that returns players, including joins, filtersisNull(players.deletedAt). AdddeletedAtto a new entity when its history matters (templates/entity-template.tspattern 1). - JSONB. Typed columns for anything you filter, sort, join or sum.
jsonb(...).$type<...>().default({})for per-genre extras:stats,baseStats,properties,metadata. Never add genre columns (swordDamage) to core tables. Usejsonb, notjson: PostgreSQL storesjsonbdecomposed, processes it faster and can index it. - Enums.
pgEnumfor fixed sets that code switches on (rarity, guild role, leaderboard period). Plaintextfor open sets designers extend (event type, currency type). - Foreign keys.
onDelete: "cascade"from player-owned rows toplayers. Analytics rows (events) useonDelete: "set null"so history survives. Catalog references (itemDefinitionId) have no cascade. - Indexes. Index the owner key (
playerId) of every player-owned table. Add a composite index for each common filter, leading with the owner:events (playerId, type),leaderboards (category, period, score). Put a unique index on every natural key an upsert targets (currencies (playerId, currencyType)): PostgreSQL infers theON CONFLICTtarget from a unique index. - Money and currency. Integer amounts, never read-modify-write. Credit with the atomic
amount = amount + nupsert (addCurrencyintemplates/query-patterns.ts). Debit withspendCurrency: oneUPDATE ... WHERE amount >= cost, and it reports failure when no row was updated, so two parallel spends cannot overdraw. Thecurrenciestable also hasCHECK (amount >= 0), so a debit that bypasses the guard fails instead of going negative. - Idempotency.
processed_eventsholds one row per external event or job already applied (a Stripe event id, a reward job key), withidas the primary key, akindandcreated_at. Insert it in the same transaction as the change it guards; a primary-key conflict means the change already happened.stripe-game-paymentsandbullmq-game-queuesuse this table.
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.
- 19d ago Changed · -49 lines · +29 tokens per session 2c184c3ce9de
- 3mo ago First seen · 129 lines · 52 tokens per session scan A 124fd2a7e1c0
postgres-game-schema is a skill published in the GitHub repository fcsouza/agent-skills (29 stars, last pushed today), licensed MIT. It adds 81 tokens to every session and 2,147 once invoked, about $0.0003 per session on Opus 5.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.
postgres-game-schema compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| postgres-game-schemafcsouza/agent-skills | Skill | 29 | today | MIT | A | 81 | Claude Code |
| postgresql-table-designHermeticOrmus/claude-code-game-development | Skill | 84 | 2mo ago | MIT | A | 31 | Claude Code |
| sql-optimization-patternsHermeticOrmus/claude-code-game-development | Skill | 84 | 2mo ago | MIT | A | 44 | Claude Code |
| alloydb-basicsgoogle/skills | Skill | 26k | today | Apache-2.0 | A | 72 | Claude Code, Codex |
| postgresql-table-designwshobson/agents | Skill | 43k | yesterday | MIT | A | 37 | Claude Code |
| db-repairgarrytan/gbrain | Skill | 34k | today | MIT | A | 96 | Claude Code |
| volcengine-rds-postgresqlbytedance/agentkit-samples | Skill | 496 | yesterday | Apache-2.0 | A | 63 | Claude Code, Codex |