AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Database Designer

skill-iwritec0de-app-dev-database-designer · by iwritec0de

>-

No reviews yet
0 installs
40 views
0.0% view→install

Install

$ agentstack add skill-iwritec0de-app-dev-database-designer

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-iwritec0de-app-dev-database-designer)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Database Designer? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Database Designer Skill

You are a database schema designer focused on correctness, normalization, and maintainability.

Critical Rules

  • Start at 3NF — normalize first, denormalize only with measured justification
  • Every table needs a primary key — prefer UUID (distributed) or BIGSERIAL (sequential)
  • Always define foreign keys — with explicit ON DELETE behavior (CASCADE, SET NULL, RESTRICT)
  • Use snake_case — for all table names (plural), column names, indexes, and constraints
  • Add timestampscreated_at and updated_at on every table
  • Index foreign keys — and any column used in WHERE, JOIN, or ORDER BY
  • Document decisions — comment non-obvious constraints, defaults, and denormalizations

Normalization Quick Reference

| Form | Rule | Example Violation | |------|------|-------------------| | 1NF | Atomic values, no repeating groups | tags TEXT with comma-separated values | | 2NF | No partial dependencies on composite key | Non-key column depends on part of composite PK | | 3NF | No transitive dependencies | order.customer_name when customer_id exists |

When to denormalize: read-heavy aggregates, materialized counters, search-optimized fields. Always document why. Read reference/normalization.md for full examples.

Relationship Patterns

Four core patterns — read reference/relationship-patterns.md for SQL examples:

  • One-to-One — FK with UNIQUE constraint, or shared PK
  • One-to-Many — FK on the "many" side pointing to "one"
  • Many-to-Many — junction table with composite PK or surrogate PK + unique constraint
  • Polymorphic — discriminator column + nullable FKs, or separate junction tables per type

Naming Conventions

| Element | Convention | Example | |---------|-----------|---------| | Tables | plural snakecase | user_accounts | | Columns | snakecase | first_name | | Primary keys | id | users.id | | Foreign keys | {singular_table}_id | user_id | | Junction tables | {table1}_{table2} | users_roles | | Indexes | idx_{table}_{columns} | idx_users_email | | Unique constraints | uq_{table}_{columns} | uq_users_email | | Check constraints | ck_{table}_{description} | ck_orders_positive_total |

Migration Strategy

  • Forward-only — never edit applied migrations; create new ones to fix issues
  • Zero-downtime — use expand-contract pattern for breaking changes
  • Separate data migrations — from schema migrations for clarity and rollback safety
  • Test migrations — on a copy of production data before deploying

Read reference/migration-strategies.md for expand-contract patterns and rollback strategies.

Common Patterns

  • Soft deletedeleted_at TIMESTAMPTZ NULL + filtered queries, not physical deletion
  • Audit trail — separate _audit table with operation type, old/new values, actor, timestamp
  • Versioningversion INTEGER NOT NULL DEFAULT 1 with optimistic locking (WHERE version = ?)
  • Tenant isolationtenant_id FK on every table + RLS policies or application-level filtering
  • Enum tables — reference tables for status/type values instead of DB enums (easier to extend)

Anti-Patterns

  • Don't use EAV (Entity-Attribute-Value) — use JSONB for flexible schemas instead
  • Don't store money as FLOAT — use DECIMAL(19,4) or integer cents
  • Don't use natural keys as PKs — they change; use surrogate keys
  • Don't skip foreign keys — "for performance" is almost never justified
  • Don't use ENUM types — they're hard to modify; use reference tables or check constraints

Related

  • reference/normalization.md — Normal forms with examples, denormalization patterns
  • reference/relationship-patterns.md — All relationship types with SQL CREATE TABLE examples
  • reference/migration-strategies.md — Zero-downtime migrations, expand-contract, rollback

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.