# go-goose

go-goose — a skill for planning and running database migrations using the pressly/goose CLI and Go library. Available on Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 1 install · ★ 27 repo stars
- Author: metalagman
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/metalagman/agent-skills/tree/HEAD/go-goose/SKILL.md
- Updated: 2026-08-21
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/go-goose

## What it does

go-goose guides you through writing and executing SQL and Go migrations while respecting your project's layout and database dialect. It clarifies when to use the CLI for CI/CD pipelines and when to embed migrations in Go services via the provider API. The skill recommends SQL migrations for schema changes and Go migrations for complex data backfills, ensures your database driver matches the goose dialect, and flags missing Down migrations before rollbacks.

After understanding your target database, driver, and required command, the skill provides exact commands or code tailored to your environment. If a migration needs special parsing rules or non-transactional execution, the skill will highlight that.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add metalagman/agent-skills --skill go-goose -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add metalagman/agent-skills --skill go-goose -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add metalagman/agent-skills --skill go-goose -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install metalagman/agent-skills go-goose
```

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

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add metalagman/agent-skills --skill go-goose -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/metalagman/agent-skills --path go-goose
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add metalagman/agent-skills --skill go-goose -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/metalagman/agent-skills/tree/HEAD/go-goose/SKILL.md

## When to use it
- Write and run an SQL migration to alter database schema
- Create a rollback migration for a deployed change
- Embed migrations inside a Go service using the provider API
- Sequence and deploy hybrid-versioned migrations to production
- Debug migration parsing or transactional execution issues

## Example prompts
- Help me write a Go migration to backfill data into a new column
- What's the goose command to check migration status on Postgres?
- Create an SQL migration adding an index and show how to run it via CLI

## Similar
- [databases](https://affpapa.org/en/nevibecode/skills/databases.md) — skill · 447 installs
- [Neon](https://affpapa.org/en/nevibecode/mcp/neon-neon.md) — MCP server · 1350 installs
- [encore-go-database](https://affpapa.org/en/nevibecode/skills/encore-go-database.md) — skill · 609 installs
- [postgres-best-practices](https://affpapa.org/en/nevibecode/skills/neondatabase-postgres-best-practices.md) — skill · 2100 installs
- [migrate-postgres-tables-to-hypertables](https://affpapa.org/en/nevibecode/skills/migrate-postgres-tables-to-hypertables.md) — skill · 382 installs
- [postgresql-expert-best-practices-code-review](https://affpapa.org/en/nevibecode/skills/postgresql-expert-best-practices-code-review.md) — skill · 392 installs

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