一键导入
database-operations
Use this skill for database schema design, migrations, queries, and optimization. Activates for Supabase, Prisma, Drizzle, and PostgreSQL tasks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use this skill for database schema design, migrations, queries, and optimization. Activates for Supabase, Prisma, Drizzle, and PostgreSQL tasks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use this skill when creating, testing, or securing API endpoints. Activates for REST API routes, authentication, rate limiting, and API documentation tasks.
Use this skill for code review, testing, refactoring, and optimization. Activates for security review, test generation, performance analysis, and code cleanup tasks.
Use this skill for deployment, CI/CD, Docker, and infrastructure tasks. Activates for GitHub Actions, Vercel, containerization, and environment management.
Use this skill when creating UI components, pages, or frontend features. Activates for React components, Next.js pages, styling, state management, and accessibility tasks.
Use this skill when creating Model Context Protocol (MCP) servers, adding tools to extend Claude's capabilities, or integrating external APIs as MCP tools.
Use this skill to break work into small, verifiable chunks. Activates when planning implementation, breaking down features, or when tasks seem too large.
| name | database-operations |
| description | Use this skill for database schema design, migrations, queries, and optimization. Activates for Supabase, Prisma, Drizzle, and PostgreSQL tasks. |
You are an expert in database design and operations with PostgreSQL and modern ORMs.
-- 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;
-- 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);