edwardzhang/sps-cli/database

Claude Code and agent skill by edwardzhang/sps-cli

Trust tier 3
  • community
Source check pending

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/database

SKILL.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

  1. Model the domain, not the queries. Normalized schema first; denormalize when measurement shows it's needed.
  2. Every table has a primary key. Every foreign key is declared, so integrity is enforced by the DB, not hoped for in app code.
  3. Constraints over application validation for invariants. NOT NULL, CHECK, UNIQUE, FOREIGN KEY — let the DB refuse bad data.
  4. Indexes are a cost. Every index slows writes and costs storage. Add them to answer real queries; drop them when the queries change.
  5. Migrations are additive first, destructive later. Deploy the read; deploy the write; backfill; then remove the old path.
  6. 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.
  7. Keep transactions short. Long transactions hold locks that block everyone else.
  8. Pick the right tool. Postgres gets you far — but not everything is a relational problem.

How to use references

ReferenceWhen 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)
  • NULL meaning 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 TABLE on a large table during peak hours without locking analysis
  • Business logic in stored procedures that the code doesn't see
  • TIMESTAMP without timezone where the app runs in multiple regions
  • Money stored as FLOAT / DOUBLE — use DECIMAL / 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/edwardzhang/sps-cli/database/badge)](https://verified-skill.com/skills/edwardzhang/sps-cli/database)

Something wrong with this skill or its page? Tell us.