Skip to content
Back to skills

Db Designer

ASecurity

Generate database schema from feature descriptions. User doesn't see SQL. Use when: features require data persistence. Triggers: internal use only.

  • 666 stars
  • 0 votes
  • 1 copy
  • 5 views
  • Added February 8, 2026
databasestypescriptpythongosqlnextjsfastapiapidatabaseperformance

Works with

  • api

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill db-designer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Db Designer?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Db Designer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-db-designer/badge)](https://www.skillsdirectory.com/skills/majiayu000-db-designer)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: db-designer
description: |
  Generate database schema from feature descriptions. User doesn't see SQL.
  Use when: features require data persistence.
  Triggers: internal use only.
---

# Database Designer

Infer schema from requirements. User never writes SQL.

## Process

1. **Analyze requirements**
   - "Users can save expenses" → users, expenses tables
   - "Track categories" → categories table
   - "Monthly reports" → consider aggregation

2. **Design schema**
   - Tables and columns
   - Relationships (1:1, 1:N, N:M)
   - Indexes for performance

3. **Generate migration**
   - Create migration file
   - Apply to database
   - Update ORM models

## Schema Patterns

| Feature | Tables |
|---------|--------|
| Auth | users, sessions |
| Blog | posts, comments, tags |
| E-commerce | products, orders, order_items |
| Tasks | tasks, projects, labels |
| Social | users, posts, follows, likes |

## Template-Specific

### Supabase (nextjs-supabase)
```sql
-- Auto-generated, user doesn't see
create table expenses (
  id uuid primary key default gen_random_uuid(),
  user_id uuid references users(id),
  amount decimal not null,
  category text,
  created_at timestamptz default now()
);
```

### PostgreSQL (fastapi-postgres)
```python
# Alembic migration auto-generated
class Expense(Base):
    id = Column(UUID, primary_key=True)
    user_id = Column(UUID, ForeignKey('users.id'))
    amount = Column(Numeric, nullable=False)
```

### Drizzle (hono-drizzle)
```typescript
// Schema auto-generated
export const expenses = pgTable('expenses', {
  id: uuid('id').primaryKey().defaultRandom(),
  userId: uuid('user_id').references(() => users.id),
  amount: numeric('amount').notNull(),
});
```

## User Experience

User: "I want to track expenses by category"

Internally:
1. Create expenses table
2. Create categories table
3. Add foreign key
4. Generate models
5. Create migration
6. Apply to database

User sees: "✅ Ready to save expenses"

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.