edwardzhang/sps-cli/database
Claude Code and agent skill by edwardzhang/sps-cli
- community
Checking that the SKILL.md file is still in the repository.
Database end skill — schema design, indexing, queries, migrations, scaling. Engine-neutral (Postgres / MySQL / SQLite / NoSQL patterns). Pair with a language skill (`python`, `typescript`, `golang`), `backend` for where it fits, and `coding-standards`.
Install
npx vskill@latest install edwardzhang/sps-cli/databaseSKILL.md
The same SKILL.md was published earlier as edwardzhang/sps-cli/database.
Database
Schema design, indexing, queries, migrations, scaling. Engine-neutral. For query-level performance inside a service, also see backend/references/data-access.md.
When to load
- Designing or reviewing schema changes
- Writing migrations
- Diagnosing slow queries / choosing indexes
- Planning multi-tenant / sharding / read-replica topology
- Choosing between relational, document, key-value, time-series, graph
Core principles
- Model the domain, not the queries. Normalized schema first; denormalize when measurement shows it's needed.
- Every table has a primary key. Every foreign key is declared, so integrity is enforced by the DB, not hoped for in app code.
- Constraints over application validation for invariants.
NOT NULL,CHECK,UNIQUE,FOREIGN KEY— let the DB refuse bad data. - Indexes are a cost. Every index slows writes and costs storage. Add them to answer real queries; drop them when the queries change.
- Migrations are additive first, destructive later. Deploy the read; deploy the write; backfill; then remove the old path.
- Test migrations against production-scale data. A migration that runs in 5 seconds on 1 000 rows can lock a table for 30 minutes on 100 million.
- Keep transactions short. Long transactions hold locks that block everyone else.
- Pick the right tool. Postgres gets you far — but not everything is a relational problem.
How to use references
| Reference | When to load | |
|---|---|---|
| `references/schema.md` | Normalization, keys, constraints, types, partitioning, soft vs. hard delete | |
| `references/indexing.md` | B-tree, partial, expression, multi-column, GIN / GiST, covering indexes | |
| `references/queries.md` | JOINs, subqueries, CTEs, window functions, EXPLAIN | |
| `references/migrations.md` | Zero-downtime migrations, rename columns, schema evolution, backfills | |
| `references/scaling.md` | Replication, sharding, caching, pooling, partitioning | |
| `references/nosql.md` | Document, key-value, time-series, graph — when each fits |
Forbidden patterns (auto-reject)
- Tables without a primary key
- Foreign keys without a declared reference (rely-on-app-code pattern)
NULLmeaning two different things (e.g. "unknown" vs "not applicable")- Storing JSON blobs as the primary way to represent structured data (use columns for what you query)
SELECT *in production application code- Indexes added without a query that uses them
- Destructive migrations without a tested rollback plan
- Running
ALTER TABLEon a large table during peak hours without locking analysis - Business logic in stored procedures that the code doesn't see
TIMESTAMPwithout timezone where the app runs in multiple regions- Money stored as
FLOAT/DOUBLE— useDECIMAL/ cents-as-integer
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/database/SKILL.md
Popularity
- Repository stars
- 3
- 7-day trend score
- 7
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/edwardzhang/sps-cli/database)