Skip to content
Agentmart
Submit a tool

database-design

Skill by ucav

IndexedMIT★ 8
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/ucav-database-design

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

The publisher has not written a description yet.

Use cases: design, backend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions: not checked yet.

What's inside

Skill name
database-design
Description
None
License
MIT
Instructions
53 lines in SKILL.md · view on GitHub

Agent Skills spec issues

  • missing YAML frontmatter
  • name: missing
  • description: missing

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Skill: Database Design

**Trigger:** database, schema, migration, SQL design, table

**Description:** Conception de base de données : schéma, normalisation, index, migrations, requêtes optimisées.

## Body

### Schéma minimal (PostgreSQL)
```sql
CREATE TABLE users (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    email TEXT UNIQUE NOT NULL,
    created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);

CREATE TABLE orders (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    user_id UUID NOT NULL REFERENCES users(id),
    status TEXT NOT NULL DEFAULT 'pending',
    total_cents INT NOT NULL CHECK (total_cents >= 0),
    created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);

CREATE INDEX idx_orders_user_id ON orders(user_id);
CREATE INDEX idx_orders_status ON orders(status) WHERE status = 'pending';
```

### Règles
1. **Toujours UUID** — pas de serial/auto-increment pour les IDs publics
2. **TIMESTAMPTZ** — pas de TIMESTAMP sans timezone
3. **TEXT > VARCHAR(n)** — PostgreSQL traite pareil, TEXT plus flexible
4. **Indexer les FK** — chaque foreign key doit avoir un index
5. **CHECK contraints** — valider les données côté DB, pas côté app
6. **Éviter NULL** — utiliser NOT NULL + valeur par défaut

### Migrations
```bash
# diesel (Rust)
diesel migration generate create_users
diesel migration run
diesel migration redo

# Prisma (Node)
npx prisma migrate dev --name init
npx prisma migrate deploy
```

### Pièges
- Pas de FK → intégrité des données compromise
- `SELECT *` en prod → largeur de table change, ton code casse
- Pas de pagination → `SELECT * FROM users` sur 1M lignes = crash

From ucav/Sparrow, MIT.

Signals

Stars
8
Forks
3
Open issues
0
Last commit (this folder)
Jun 8, 2026 (4 months ago)
Last release
Jun 15, 2026 (4 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026
Cite this page

database-design skill. Agent Mart. https://agentmart.dev/skills/ucav-database-design (last updated 2026-10-24)