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/krzysztofsurdy/code-virtuoso/database-designnpx skills add krzysztofsurdy/code-virtuoso --skill database-designgit clone --depth 1 https://github.com/krzysztofsurdy/code-virtuosoWrote 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/krzysztofsurdy/code-virtuoso/database-design)<a href="https://agentmods.dev/skills/krzysztofsurdy/code-virtuoso/database-design"><img src="https://agentmods.dev/badge/skills/krzysztofsurdy/code-virtuoso/database-design.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.1 | $0.00081 | $0.02458 |
| Opus 5 | $0.00041 | $0.01229 |
| Sonnet 5 | $0.00016 | $0.00492 |
| Haiku 4.5 | $0.00008 | $0.00246 |
Grade A, and why
database-design 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 6d 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 — 206 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Database Design
Good database design determines the long-term maintainability, performance, and correctness of any data-driven application. Schema decisions made early are expensive to reverse later. Every table, column, index, and constraint should exist for a reason backed by access patterns and business rules.
Data Modeling Principles
Start from Access Patterns
Design tables around how the application reads and writes data, not around how entities look in a domain model. Two questions drive every schema decision:
- What queries will run most frequently? - these determine table structure, indexes, and denormalization choices
- What consistency guarantees does the data need? - these determine normalization level, constraints, and transaction boundaries
Entity Relationships
| Relationship | Implementation | When to Use |
|---|---|---|
| One-to-one | Foreign key with UNIQUE constraint on the child table | Splitting rarely-accessed columns into a separate table, or enforcing exactly-one semantics |
| One-to-many | Foreign key on the child table referencing the parent | Orders to order items, users to addresses |
| Many-to-many | Join table with composite primary key | Tags to articles, students to courses |
| Many-to-many with attributes | Join table with its own columns beyond the two foreign keys | Enrollment with grade, membership with role |
| Self-referential | Foreign key referencing the same table | Org charts, category trees, threaded comments |
Naming Conventions
Consistent naming prevents confusion across teams and tools:
- Tables: plural nouns in snake_case (
order_items,user_addresses) - Columns: singular snake_case describing the value (
created_at,total_amount) - Foreign keys:
<referenced_table_singular>_id(user_id,order_id) - Indexes:
idx_<table>_<columns>(idx_orders_user_id_created_at) - Constraints:
chk_<table>_<rule>,uq_<table>_<columns>,fk_<table>_<referenced>
What ships with it
3 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.
- 6d ago First seen · 206 lines · 81 tokens per session scan A 44c8563467b8
database-design is a skill published in the GitHub repository krzysztofsurdy/code-virtuoso (20 stars, last pushed 3mo ago), licensed MIT. It adds 81 tokens to every session and 2,458 once invoked, about $0.0004 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
alloydb-basics
Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations. Use when creating, configuring, or administering AlloyDB databases. Do NOT use for general PostgreSQL instances (e.g. Cloud SQL) or other GCP databases.
obsidian-bases
Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.
supabase-postgres-best-practices
Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the…
db-repo
Работа с хранилищем конфигурации 1С. Используй когда нужно захватить объекты, поместить изменения в хранилище конфигурации, получить изменения из него, подключить базу к хранилищу.
db-load-xml
Загрузка конфигурации 1С из XML-файлов. Используй когда нужно загрузить конфигурацию из файлов, XML, исходников, LoadConfigFromFiles.
db-dump-dt
Выгрузка информационной базы 1С в DT-файл (вся база — конфигурация + данные). Используй когда нужно выгрузить информационную базу, выгрузить архив базы, сделать бэкап, выгрузить dt.