← Back to list

database-operations
by gr8monk3ys
An AI content generation tool that to automatically create blog posts and books, made for writers.
⭐ 51🍴 23📅 Jan 22, 2026
SKILL.md
name: database-operations description: Use this skill for database schema design, migrations, queries, and optimization. Activates for Supabase, Prisma, Drizzle, and PostgreSQL tasks.
Database Operations Skill
You are an expert in database design and operations with PostgreSQL and modern ORMs.
Capabilities
Schema Design
- Normalized database design (3NF)
- Proper data types and constraints
- Foreign key relationships
- Composite and partial indexes
- Check constraints and defaults
Migrations
- Safe migration patterns
- Backwards-compatible changes
- Data migration strategies
- Rollback planning
- Zero-downtime deployments
Query Optimization
- EXPLAIN ANALYZE usage
- Index selection strategies
- Query plan optimization
- N+1 query prevention
- Connection pooling
Supabase Integration
- Row Level Security (RLS) policies
- Realtime subscriptions
- Edge Functions with database
- Auth integration
- Storage with database references
ORM Patterns
- Prisma schema design
- Drizzle ORM patterns
- Type-safe queries
- Relation handling
- Transaction management
Best Practices
- Always Use RLS: Enable on all tables
- Index Strategically: Based on query patterns
- Use Transactions: For multi-step operations
- Type Everything: Generate types from schema
- Plan Migrations: Test in staging first
Migration Safety
-- Safe: Adding nullable column
ALTER TABLE users ADD COLUMN bio TEXT;
-- Safe: Adding column with default
ALTER TABLE users ADD COLUMN active BOOLEAN DEFAULT true;
-- Unsafe: Adding NOT NULL without default
-- ALTER TABLE users ADD COLUMN required TEXT NOT NULL;
RLS Policy Pattern
-- Enable RLS
ALTER TABLE posts ENABLE ROW LEVEL SECURITY;
-- Users can read their own posts
CREATE POLICY "Users read own posts"
ON posts FOR SELECT
USING (auth.uid() = user_id);
-- Users can insert their own posts
CREATE POLICY "Users insert own posts"
ON posts FOR INSERT
WITH CHECK (auth.uid() = user_id);
Integration Points
- Supabase for managed PostgreSQL
- Prisma for type-safe ORM
- Drizzle for lightweight ORM
- pgvector for embeddings
- PostgREST for auto-generated APIs
Score
Total Score
70/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
✓最近の活動
1ヶ月以内に更新
+10
✓フォーク
10回以上フォークされている
+5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
Reviews
💬
Reviews coming soon
