# database-driver-design

Guidance for designing Swift database clients, from protocol handling to connection pools and streamed results. Useful when building a driver or shaping its concurrency model.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · ★ 62
- Author: wendylabsinc
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/wendylabsinc/claude-skills/tree/HEAD/database-driver-design/SKILL.md
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/skills/database-driver-design

## What it does

The skill covers typed commands with associated responses, parameter binding for queries, and explicit state transitions for protocol handling. It also discusses length-prefixed binary data, typed row decoding, and adapting result buffers to consumer demand.

Connection guidance includes pooling, keep-alive behavior, and graceful shutdown. For Swift Concurrency, it describes matching an actor’s executor to a SwiftNIO event loop. That alignment matters when the connection is built on NIO channels. The examples draw on valkey-swift and postgres-nio.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add wendylabsinc/claude-skills --skill database-driver-design -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add wendylabsinc/claude-skills --skill database-driver-design -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add wendylabsinc/claude-skills --skill database-driver-design -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install wendylabsinc/claude-skills database-driver-design
```

2. **Manually: put the files in place**
- File: `.github/skills/database-driver-design/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add wendylabsinc/claude-skills --skill database-driver-design -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/wendylabsinc/claude-skills --path database-driver-design
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add wendylabsinc/claude-skills --skill database-driver-design -a opencode
```

### 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/wendylabsinc/claude-skills/tree/HEAD/database-driver-design/SKILL.md

## When to use it
- model driver commands with typed responses
- bind query values instead of joining user input into SQL
- map protocol messages to connection state transitions
- align an actor’s executor with a SwiftNIO event loop
- adapt result buffering to consumer demand

## Example prompts
- Help me design typed commands and responses for a Swift database client.
- Review the connection state transitions needed to handle this wire protocol.
- How should this driver apply backpressure while streaming rows through SwiftNIO?

## Similar
- [xlsx](https://affpapa.org/en/nevibecode/skills/xlsx.md) — skill · 187223 installs
- [google-agents-cli-observability](https://affpapa.org/en/nevibecode/skills/google-agents-cli-observability.md) — skill · 511300 installs
- [caveman-evidence-review](https://affpapa.org/en/nevibecode/skills/caveman-evidence-review.md) — skill · 104500 installs
- [migration](https://affpapa.org/en/nevibecode/skills/migration.md) — skill · 103900 installs
- [performance-optimization](https://affpapa.org/en/nevibecode/skills/performance-optimization.md) — skill · 65200 installs
- [supabase](https://affpapa.org/en/nevibecode/skills/supabase.md) — skill · 8 installs

From the same set: [wendylabsinc/claude-skills](https://affpapa.org/en/nevibecode/by/wendylabsinc/claude-skills.md) — 14 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
