Golang Database
unxed/f4
Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context…
Database schema design, optimization, and migration patterns for PostgreSQL, MySQL, and NoSQL databases.
$ npx skills add MoizIbnYousaf/ai-agent-skills --skill database-design -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install MoizIbnYousaf/ai-agent-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/MoizIbnYousaf/ai-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/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/MoizIbnYousaf/ai-agent-skills/tree/main/skills/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/MoizIbnYousaf/ai-agent-skills/tree/main/skills/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 MoizIbnYousaf/ai-agent-skills --skill database-design -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install MoizIbnYousaf/ai-agent-skills database-design --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/MoizIbnYousaf/ai-agent-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/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/MoizIbnYousaf/ai-agent-skills/tree/main/skills/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 MoizIbnYousaf/ai-agent-skills --skill database-design -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install MoizIbnYousaf/ai-agent-skills database-design --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/MoizIbnYousaf/ai-agent-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/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/MoizIbnYousaf/ai-agent-skills/tree/main/skills/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/MoizIbnYousaf/ai-agent-skills.git --path skills/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 MoizIbnYousaf/ai-agent-skills --skill database-design -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install MoizIbnYousaf/ai-agent-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/MoizIbnYousaf/ai-agent-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/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/MoizIbnYousaf/ai-agent-skills/tree/main/skills/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 MoizIbnYousaf/ai-agent-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 MoizIbnYousaf/ai-agent-skills --skill database-design -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/MoizIbnYousaf/ai-agent-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/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/MoizIbnYousaf/ai-agent-skills/tree/main/skills/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 MoizIbnYousaf/ai-agent-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 MoizIbnYousaf/ai-agent-skills database-design --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/MoizIbnYousaf/ai-agent-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/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/MoizIbnYousaf/ai-agent-skills/tree/main/skills/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-designDatabase schema design, optimization, and migration patterns for PostgreSQL, MySQL, and NoSQL databases.
Database Design is an agent skill from MoizIbnYousaf/ai-agent-skills. Database schema design, optimization, and migration patterns for PostgreSQL, MySQL, and NoSQL databases. Use for designing schemas, writing migrations, or optimizing queries.
Its SKILL.md is about 1.2k 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. It works with MySQL and PostgreSQL. The repository describes itself as: Universal skill installer and package manager for AI coding agents. One command, 12+ runtimes. npx ai-agent-skills. The licence is MIT.
Read from SKILL.md and the folder at commit 6d95c78. 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).
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 1.2k tokens when it runs. Until then it costs about 48 tokens; SKILL.md has 76 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 MoizIbnYousaf/ai-agent-skills at commit 6d95c78, republished under its MIT licence (© MoizIbnYousaf). 76 words, ~1,158 tokens.
.claude/skills/database-design/SKILL.md (or your agent's skills folder).-- 1NF: Atomic values, no repeating groups
-- 2NF: No partial dependencies on composite keys
-- 3NF: No transitive dependencies
-- Users table (normalized)
CREATE TABLE users (
id SERIAL PRIMARY KEY,
email VARCHAR(255) UNIQUE NOT NULL,
created_at TIMESTAMPTZ DEFAULT NOW()
);
-- Addresses table (separate entity)
CREATE TABLE addresses (
id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES users(id) ON DELETE CASCADE,
street VARCHAR(255),
city VARCHAR(100),
country VARCHAR(100),
is_primary BOOLEAN DEFAULT false
);-- When read performance matters more than write consistency
CREATE TABLE order_summaries (
id SERIAL PRIMARY KEY,
order_id INTEGER REFERENCES orders(id),
customer_name VARCHAR(255), -- Denormalized from customers
total_amount DECIMAL(10,2),
item_count INTEGER,
last_updated TIMESTAMPTZ DEFAULT NOW()
);-- B-tree (default) for equality and range queries
CREATE INDEX idx_users_email ON users(email);
-- Composite index (order matters!)
CREATE INDEX idx_orders_user_date ON orders(user_id, created_at DESC);
-- Partial index for specific conditions
CREATE INDEX idx_active_users ON users(email) WHERE deleted_at IS NULL;
-- GIN index for array/JSONB columns
CREATE INDEX idx_posts_tags ON posts USING GIN(tags);
-- Covering index (includes additional columns)
CREATE INDEX idx_orders_covering ON orders(user_id) INCLUDE (total, status);-- Check index usage
SELECT
schemaname, tablename, indexname,
idx_scan, idx_tup_read, idx_tup_fetch
FROM pg_stat_user_indexes
ORDER BY idx_scan DESC;
-- Find missing indexes
SELECT
relname, seq_scan, seq_tup_read,
idx_scan, idx_tup_fetch
FROM pg_stat_user_tables
WHERE seq_scan > idx_scan
ORDER BY seq_tup_read DESC;-- Always use transactions
BEGIN;
-- Add column with default (non-blocking in PG 11+)
ALTER TABLE users ADD COLUMN status VARCHAR(20) DEFAULT 'active';
-- Create index concurrently (doesn't lock table)
CREATE INDEX CONCURRENTLY idx_users_status ON users(status);
-- Backfill data in batches
UPDATE users SET status = 'active' WHERE status IS NULL AND id BETWEEN 1 AND 10000;
COMMIT;1. Add new column (nullable)
2. Deploy code that writes to both columns
3. Backfill old data
4. Deploy code that reads from new column
5. Remove old column-- Always use EXPLAIN ANALYZE
EXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT)
SELECT * FROM orders WHERE user_id = 123 AND status = 'pending';
-- Key metrics to watch:
-- - Seq Scan vs Index Scan
-- - Actual rows vs Estimated rows
-- - Buffers: shared hit vs read-- Use EXISTS instead of IN for large sets
SELECT * FROM users u
WHERE EXISTS (SELECT 1 FROM orders o WHERE o.user_id = u.id);
-- Pagination with keyset (cursor) instead of OFFSET
SELECT * FROM posts
WHERE created_at < '2024-01-01'
ORDER BY created_at DESC
LIMIT 20;
-- Use CTEs for complex queries
WITH active_users AS (
SELECT id FROM users WHERE last_login > NOW() - INTERVAL '30 days'
)
SELECT * FROM orders WHERE user_id IN (SELECT id FROM active_users);-- Primary key
ALTER TABLE users ADD PRIMARY KEY (id);
-- Foreign key with cascade
ALTER TABLE orders ADD CONSTRAINT fk_orders_user
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
-- Check constraint
ALTER TABLE products ADD CONSTRAINT chk_price_positive
CHECK (price >= 0);
-- Unique constraint
ALTER TABLE users ADD CONSTRAINT uniq_users_email UNIQUE (email);
-- Exclusion constraint (no overlapping ranges)
ALTER TABLE reservations ADD CONSTRAINT excl_no_overlap
EXCLUDE USING gist (room_id WITH =, tsrange(start_time, end_time) WITH &&);created_at and updated_at timestampsdeleted_at) for important data© MoizIbnYousaf, MIT. 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 skills/database-design of MoizIbnYousaf/ai-agent-skills.
Open the folder on GitHubat commit 6d95c78
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in MoizIbnYousaf/ai-agent-skills, which our catalogue first saw on October 7, 2026.
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 skillMoizIbnYousaf/ai-agent-skills | 1.1k | 1 repos | ~1.2k | Automated safety check: Pass | MIT | |
| Golang Databaseunxed/f4 | 240 | 2 repos | ~2.9k | Automated safety check: Pass | MIT | |
| Database Expertcin12211/orca-q | 223 | — | ~2.8k | Automated safety check: Pass | MIT | |
| DB Migrationhiromaily/go-crypto-wallet | 128 | — | ~652 | Automated safety check: Pass | MIT | |
| Expert DatabaseReJeCtAll/ExpertTeam-Codex | 113 | — | ~692 | Automated safety check: Pass | MIT | |
| SQL ProJeffallan/claude-skills | 12k | — | ~1.3k | Automated safety check: Pass | MIT |
unxed/f4
Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context…
cin12211/orca-q
Database performance optimization, schema design, query analysis, and connection management across PostgreSQL, MySQL, MongoDB, and SQLite with ORM integration.
hiromaily/go-crypto-wallet
Database schema and migration workflow. An agent skill from hiromaily/go-crypto-wallet.
ReJeCtAll/ExpertTeam-Codex
数据库优化专家入口。用于 Codex CLI 的 $expert-database 调用. An agent skill from ReJeCtAll/ExpertTeam-Codex.
Jeffallan/claude-skills
Optimizes SQL queries and designs schemas using CTEs, window functions, covering indexes and EXPLAIN ANALYZE, with notes on dialect differences between major databases.
TencentCloudBase/CloudBase-AI-Toolkit
[Deprecated] Optional advanced tool for complex data modeling.
MoizIbnYousaf/ai-agent-skills
Building applications with Large Language Models - prompt engineering, RAG patterns, and LLM integration.
MoizIbnYousaf/ai-agent-skills
A skill your agent uses when checking the overall health of a skills library.
MoizIbnYousaf/ai-agent-skills
Backend API design, database architecture, microservices patterns, and test-driven development.
MoizIbnYousaf/ai-agent-skills
A skill your agent uses when exploring the ai-agent-skills catalog to find, compare, and evaluate skills before installing.
MoizIbnYousaf/ai-agent-skills
Writing effective code documentation - API docs, README files, inline comments, and technical guides.
MoizIbnYousaf/ai-agent-skills
A skill your agent uses when building a managed team skills library for a real stack.
Works with
Categories
Database schema design, optimization, and migration patterns for PostgreSQL, MySQL, and NoSQL databases. Database Design is an agent skill from MoizIbnYousaf/ai-agent-skills. Database schema design, optimization, and migration patterns for PostgreSQL, MySQL, and NoSQL databases.
Database Design fits situations like: designing schemas; writing migrations; optimizing queries.
Run `npx skills add MoizIbnYousaf/ai-agent-skills --skill database-design -a claude-code`. Or copy the skill folder (skills/database-design in MoizIbnYousaf/ai-agent-skills) into .claude/skills/database-design in your project. Claude Code loads it when a task matches its description.
Run `npx skills add MoizIbnYousaf/ai-agent-skills --skill database-design -a codex`. Or copy the skill folder (skills/database-design in MoizIbnYousaf/ai-agent-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 MoizIbnYousaf/ai-agent-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 MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.2k tokens (SKILL.md is roughly 4.6k 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: Golang Database (unxed/f4, 240 stars), Database Expert (cin12211/orca-q, 223 stars), DB Migration (hiromaily/go-crypto-wallet, 128 stars) and Expert Database (ReJeCtAll/ExpertTeam-Codex, 113 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
MoizIbnYousaf (a GitHub user) maintains it in MoizIbnYousaf/ai-agent-skills, which has 1,148 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on September 21, 2026.
Source: MoizIbnYousaf/ai-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.