# db-stinger

The db-stinger skill guides PostgreSQL schema work, migration planning, and query-performance reviews. Use it when assessing a database layer or choosing an ORM or serverless platform.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 96 repo stars
- Author: Legion Code Inc.
- License: AGPL-3.0-or-later · policy=link-only · description only; the file stays with the author
- Source: https://github.com/legioncodeinc/vibe-coding-tools/tree/HEAD/plugins/data-and-ai-tools/skills/db-stinger/SKILL.md
- Updated: 2026-10-18
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/db-stinger

## What it does

db-stinger begins by examining the project’s DDL or ORM schema alongside `package.json`. It uses those details to account for the PostgreSQL version, database library, connection pool, migration tool, and hosting setup. Then it selects guidance for the requested work, such as schema design, index review, migration planning, ORM evaluation, or platform selection.

Its deliverables vary by task: schema specifications, migration plans, architecture decisions, or audit reports. Findings need supporting references. For performance work, the required evidence includes `EXPLAIN (ANALYZE, BUFFERS)`; a recommendation without a query plan does not meet that bar.

The skill focuses on PostgreSQL and hands security audits to a separate subagent. Serverless workloads require connection pooling. For changes to large tables, it rules out destructive one-step DDL and calls for an expand-backfill-contract migration approach.

## Requirements
- Works with: PostgreSQL

## Install

### Claude Code (native platform)

1. **Plugin marketplace**
In the agent chat (not a shell):
```text
/plugin marketplace add legioncodeinc/vibe-coding-tools
```
In the agent chat (not a shell):
```text
/plugin install data-and-ai-tools@wasp-nest
```
This installs the whole data-and-ai-tools plugin with all its skills

2. **Skills CLI (Vercel)**
```bash
npx skills add legioncodeinc/vibe-coding-tools --skill db-stinger -a claude-code
```

3. **Manually: put the files in place**
- File: `~/.claude/skills/db-stinger/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/db-stinger/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add legioncodeinc/vibe-coding-tools --skill db-stinger -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/db-stinger/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add legioncodeinc/vibe-coding-tools --skill db-stinger -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/db-stinger/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install legioncodeinc/vibe-coding-tools plugins/data-and-ai-tools/skills/db-stinger
```

2. **Manually: put the files in place**
- File: `.github/skills/db-stinger/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add legioncodeinc/vibe-coding-tools --skill db-stinger -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/legioncodeinc/vibe-coding-tools --path plugins/data-and-ai-tools/skills/db-stinger
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/db-stinger/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/legioncodeinc/vibe-coding-tools/tree/HEAD/plugins/data-and-ai-tools/skills/db-stinger/SKILL.md

## When to use it
- design a PostgreSQL schema for a new feature
- plan a migration for a live database
- spot missing or redundant indexes
- review a query plan and propose performance fixes
- choose an ORM or database platform for a workload

## Example prompts
- Design a PostgreSQL schema for this feature and draft its specification.
- Review the current schema and `package.json` for indexing issues.
- Plan a live-table migration without using destructive one-step DDL.

## Similar
- [postgresql-expert](https://affpapa.org/en/nevibecode/skills/postgresql-expert.md) — skill · 427 installs
- [prisma-postgres](https://affpapa.org/en/nevibecode/skills/prisma-postgres.md) — skill · 431100 installs
- [prisma-postgres-setup](https://affpapa.org/en/nevibecode/skills/prisma-postgres-setup.md) — skill · 425700 installs
- [drizzle-migrations](https://affpapa.org/en/nevibecode/skills/drizzle-migrations.md) — skill · 1300 installs
- [sequelize](https://affpapa.org/en/nevibecode/skills/sequelize.md) — skill · 1000 installs
- [drizzle-best-practices](https://affpapa.org/en/nevibecode/skills/drizzle-best-practices.md) — skill · 718 installs

From the same set: [legioncodeinc/vibe-coding-tools](https://affpapa.org/en/nevibecode/by/legioncodeinc/vibe-coding-tools.md) — 172 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
