DB Migrations
kurealnum/dotfiles
A skill your agent uses when generating or regenerating Drizzle migration files, changing database schema tables or columns, resolving migration sequence conflicts after rebase, reviewing migration…
Design database schemas — tables, relationships, indexes, constraints, and ORM setup.
$ npx skills add spencerpauly/awesome-cursor-skills --skill database-design -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install spencerpauly/awesome-cursor-skills database-design --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/spencerpauly/awesome-cursor-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/resources/database-design .claude/skills/database-design && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "database-design" agent skill from https://github.com/spencerpauly/awesome-cursor-skills/tree/main/resources/database-design into .claude/skills/database-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "database-design", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/spencerpauly/awesome-cursor-skills/tree/main/resources/database-designType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add spencerpauly/awesome-cursor-skills --skill database-design -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install spencerpauly/awesome-cursor-skills database-design --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/spencerpauly/awesome-cursor-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/resources/database-design .agents/skills/database-design && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "database-design" agent skill from https://github.com/spencerpauly/awesome-cursor-skills/tree/main/resources/database-design into .agents/skills/database-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "database-design", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add spencerpauly/awesome-cursor-skills --skill database-design -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install spencerpauly/awesome-cursor-skills database-design --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/spencerpauly/awesome-cursor-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/resources/database-design .cursor/skills/database-design && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "database-design" agent skill from https://github.com/spencerpauly/awesome-cursor-skills/tree/main/resources/database-design into .cursor/skills/database-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "database-design", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/spencerpauly/awesome-cursor-skills.git --path resources/database-design--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add spencerpauly/awesome-cursor-skills --skill database-design -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install spencerpauly/awesome-cursor-skills database-design --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/spencerpauly/awesome-cursor-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/resources/database-design .gemini/skills/database-design && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "database-design" agent skill from https://github.com/spencerpauly/awesome-cursor-skills/tree/main/resources/database-design into .gemini/skills/database-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "database-design", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install spencerpauly/awesome-cursor-skills database-designInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add spencerpauly/awesome-cursor-skills --skill database-design -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/spencerpauly/awesome-cursor-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/resources/database-design .github/skills/database-design && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "database-design" agent skill from https://github.com/spencerpauly/awesome-cursor-skills/tree/main/resources/database-design into .github/skills/database-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "database-design", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add spencerpauly/awesome-cursor-skills --skill database-design -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install spencerpauly/awesome-cursor-skills database-design --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/spencerpauly/awesome-cursor-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/resources/database-design .opencode/skills/database-design && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "database-design" agent skill from https://github.com/spencerpauly/awesome-cursor-skills/tree/main/resources/database-design into .opencode/skills/database-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "database-design", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
database-designDesign database schemas — tables, relationships, indexes, constraints, and ORM setup.
Database Design is an agent skill from spencerpauly/awesome-cursor-skills. Design database schemas — tables, relationships, indexes, constraints, and ORM setup. Covers relational design, normalization, and common patterns.
Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Databases, covering Database schema design and ORMs and data access. The repository describes itself as: A curated list of awesome skills for Cursor. The licence is CC0-1.0.
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 99cd265. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are sql, prisma and typescript).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Database Design loads about 1k tokens when it runs. Until then it costs about 41 tokens; SKILL.md has 295 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from spencerpauly/awesome-cursor-skills at commit 99cd265, republished under its CC0-1.0 licence (© spencerpauly). 295 words, ~1,028 tokens.
.claude/skills/database-design/SKILL.md (or your agent's skills folder).Design a database schema from requirements.
From the requirements, extract the core entities (nouns):
| Relationship | Implementation |
|---|---|
| One-to-one | Foreign key with unique constraint, or embed in same table |
| One-to-many | Foreign key on the "many" side |
| Many-to-many | Junction/join table |
| Self-referential | Foreign key pointing to same table (e.g. parent_id) |
For each table:
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
email TEXT NOT NULL UNIQUE,
name TEXT NOT NULL,
avatar_url TEXT,
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE TABLE projects (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
name TEXT NOT NULL,
owner_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);Primary keys:
UUID for distributed systems or public-facing IDsSERIAL/BIGSERIAL for internal-only IDs (faster joins)Timestamps:
created_at and updated_atTIMESTAMPTZ (with timezone), never TIMESTAMPNaming:
users, project_members)user_id, created_at)idx_<table>_<columns> (idx_users_email)Constraints:
NOT NULL on everything unless it's genuinely optionalUNIQUE on natural keys (email, slug, external IDs)REFERENCES with ON DELETE behavior (CASCADE, SET NULL, RESTRICT)CHECK constraints for enums or value ranges-- For columns you filter/sort by frequently
CREATE INDEX idx_projects_owner_id ON projects(owner_id);
-- For unique lookups
CREATE UNIQUE INDEX idx_users_email ON users(email);
-- Composite for common query patterns
CREATE INDEX idx_tasks_project_status ON tasks(project_id, status);When to index:
When NOT to index:
Prisma:
model User {
id String @id @default(uuid())
email String @unique
name String
projects Project[]
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
@@map("users")
}Drizzle:
export const users = pgTable('users', {
id: uuid('id').primaryKey().defaultRandom(),
email: text('email').notNull().unique(),
name: text('name').notNull(),
createdAt: timestamp('created_at', { withTimezone: true }).notNull().defaultNow(),
updatedAt: timestamp('updated_at', { withTimezone: true }).notNull().defaultNow(),
});Soft deletes: Add deleted_at TIMESTAMPTZ instead of actually deleting rows
Audit log: Separate audit_events table with entity_type, entity_id, action, actor_id, payload
Tags/labels: Junction table (task_tags) with task_id + tag_id
Tree/hierarchy: parent_id self-reference, or materialized path (/1/4/7/)
Polymorphic associations: Use entity_type + entity_id columns (avoid if possible, prefer separate FKs)
© spencerpauly, CC0-1.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in resources/database-design of spencerpauly/awesome-cursor-skills.
Open the folder on GitHubat commit 99cd265
Database Design next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Database Design this skillspencerpauly/awesome-cursor-skills | 842 | — | ~1k | Automated safety check: Pass | CC0-1.0 | |
| DB Migrationskurealnum/dotfiles | 290 | — | ~820 | Automated safety check: Pass | None | |
| Change Database Schemamartin-ueding/geo-activity-playground | 100 | — | ~225 | Automated safety check: Pass | Custom licence | |
| Drizzlekurealnum/dotfiles | 290 | — | ~1.3k | Automated safety check: Pass | None | |
| Jpa Patternsaffaan-m/ECC | 275k | 5 repos | ~1.2k | Automated safety check: Pass | MIT | |
| Prisma Expertdavila7/claude-code-templates | 32k | 7 repos | ~2.6k | Automated safety check: Pass | MIT |
kurealnum/dotfiles
A skill your agent uses when generating or regenerating Drizzle migration files, changing database schema tables or columns, resolving migration sequence conflicts after rebase, reviewing migration…
martin-ueding/geo-activity-playground
How to change the SQLAlchemy data model and generate the matching Alembic migration.
kurealnum/dotfiles
Drizzle ORM schema and database guide. An agent skill from kurealnum/dotfiles.
affaan-m/ECC
JPA/Hibernate patterns for entity design, relationships, query optimization, transactions, auditing, indexing, pagination, and pooling in Spring Boot.
davila7/claude-code-templates
Prisma ORM expert for schema design, migrations, query optimization, relations modeling, and database operations.
dotnet/skills
Optimize and improve the performance of slow Entity Framework Core (EF Core) queries: make them generate less SQL, make fewer database round-trips, and return results faster.
spencerpauly/awesome-cursor-skills
Monitor a pull request for CI failures, review comments, and merge conflicts — then fix them automatically.
spencerpauly/awesome-cursor-skills
Solve a hard problem by trying multiple approaches in parallel using isolated git worktrees.
spencerpauly/awesome-cursor-skills
Keep iterating on code changes until the tests pass, the build succeeds, or linting is clean.
spencerpauly/awesome-cursor-skills
When GitHub Actions fails, fetch failing job logs and assign each failing job to a separate subagent that fixes its slice of the problem in parallel.
spencerpauly/awesome-cursor-skills
Explore a large codebase in parallel by launching multiple explore subagents that each investigate a different area simultaneously.
spencerpauly/awesome-cursor-skills
Profile a running web application's CPU performance using Cursor's built-in browser profiler.
Categories
Design database schemas — tables, relationships, indexes, constraints, and ORM setup. Database Design is an agent skill from spencerpauly/awesome-cursor-skills. Design database schemas — tables, relationships, indexes, constraints, and ORM setup.
Database Design fits situations like: tasks that involve Database schema design; tasks that involve ORMs and data access.
Run `npx skills add spencerpauly/awesome-cursor-skills --skill database-design -a claude-code`. Or copy the skill folder (resources/database-design in spencerpauly/awesome-cursor-skills) into .claude/skills/database-design in your project. Claude Code loads it when a task matches its description.
Run `npx skills add spencerpauly/awesome-cursor-skills --skill database-design -a codex`. Or copy the skill folder (resources/database-design in spencerpauly/awesome-cursor-skills) into .agents/skills/database-design in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add spencerpauly/awesome-cursor-skills --skill database-design -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/database-design, .gemini/skills/database-design, .github/skills/database-design and .opencode/skills/database-design in your project.
SKILL.md names no scripts, command-line tools or credentials: Database Design is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Database Design is published under the CC0-1.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1k tokens (SKILL.md is roughly 4.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Database Design: DB Migrations (kurealnum/dotfiles, 290 stars), Change Database Schema (martin-ueding/geo-activity-playground, 100 stars), Drizzle (kurealnum/dotfiles, 290 stars) and Jpa Patterns (affaan-m/ECC, 275k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
spencerpauly (a GitHub user) maintains it in spencerpauly/awesome-cursor-skills, which has 842 GitHub stars. The repository holds 57 skills in this directory. The repository was last updated on August 2, 2026.
Source: spencerpauly/awesome-cursor-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.