Agent skill
db-designer
Generate database schema from feature descriptions. User doesn't see SQL. Use when: features require data persistence. Triggers: internal use only.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/db-designer
SKILL.md
Database Designer
Infer schema from requirements. User never writes SQL.
Process
-
Analyze requirements
- "Users can save expenses" → users, expenses tables
- "Track categories" → categories table
- "Monthly reports" → consider aggregation
-
Design schema
- Tables and columns
- Relationships (1:1, 1:N, N:M)
- Indexes for performance
-
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)
-- 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)
# 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)
// 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:
- Create expenses table
- Create categories table
- Add foreign key
- Generate models
- Create migration
- Apply to database
User sees: "✅ Ready to save expenses"
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?