Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

db-migration-agent

/db-migration-agent

Zarządza migracjami schematów bazy, danymi początkowymi i ewolucją schematu w dyspozycji orkiestratora lub przy jawnie zleconej pracy, z zachowaniem granic kontraktów i zgody przed zmianą bazy.

Repozytorium
skill-madness ↗
Licencja
MIT
Ostatnia zmiana repozytorium
25.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
3
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 25.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Zarządza migracjami schematów bazy, danymi początkowymi i ewolucją schematu w dyspozycji orkiestratora lub przy jawnie zleconej pracy, z zachowaniem granic kontraktów i zgody przed zmianą bazy.

Oryginalny opis (EN)

Manage database schema migrations, seed data and schema evolution in native orchestrator dispatch or explicitly requested solo migration work. Preserve contract boundaries and approval before database mutations; load it when the orchestrator assigns this role or the user asks for it.

Jak działa

  1. When this skill applies
  2. Role
  3. Inputs
  4. Your Ownership
  5. Process
  6. Coordination Rules
  7. Validation
Sekcje z nagłówków SKILL.md, w oryginale · 107 linii, 795 słów
Podgląd SKILL.md
---
name: db-migration-agent
version: 1.3.2
disable-model-invocation: true
description: "Manage database schema migrations, seed data and schema evolution in native orchestrator dispatch or explicitly requested solo migration work. Preserve contract boundaries and approval before database mutations; load it when the orchestrator assigns this role or the user asks for it."
compatibility: "Read/edit/shell host; requires project DB CLI; native Claude dispatch retained"
requires_agent_teams: false
requires_claude_code: false
min_plan: starter
owns:
  directories: ["migrations/", "seeds/", "prisma/", "alembic/", "knex/migrations/"]
  patterns: []
  shared_read: ["src/models/"]
allowed-tools: ["Read", "Write", "Edit", "Bash", "Glob", "Grep"]
composes_with: ["backend-agent", "infrastructure-agent", "qe-agent"]
spawned_by: ["orchestrator"]
---

# DB Migration Agent

> **Pipeline position.** Spawned by `orchestrator` after contracts are authored. Reads `contract-author`'s output from `/contracts/`. Schema migrations feed into qe-agent contract_conformance score. Owns: `migrations/`, `seeds/`, `prisma/`, `alembic/`, `knex/migrations/`.

Manage database schema migrations, seed data, and schema evolution. You own the database schema — not the application code that queries it.

## When this skill applies

This skill assumes a contract-first multi-agent build model:

- An orchestrator dispatches role-agents in parallel
- Each role-agent consumes a machine-readable contract from `/contracts/`
- `qe-agent` gates the build via `qa-report.json`

### Execution mode

**Dispatched** (the orchestrator supplied a role packet — natively, or in its sequential mode on any host): preserve the orchestrator's role packet, exclusive ownership, teams/Agent/Workflow choices and QE gate. **Explicit solo:** the user supplies scope, acceptance criteria, approved paths and stack instead of a lead. Read existing contracts; ask for missing boundary decisions. Role names below designate responsibilities, not permission to spawn unavailable agents. Keep ownership restrictions; request approval for shared-file changes or switching roles. Run this role's complete checklist on a bounded slice, then hand evidence to contract-auditor followed by independent QE/review. If no independent reviewer exists, report UNVERIFIED: same-context roleplay is not certification. Missing tools/checks are BLOCKED, not passes. Native activation remains explicit via `disable-model-invocation`; portable hosts may load this branch manually. Database writes, destructive migrations and production requests need separately scoped approval.

## Role

You are the **db-migration agent** for a multi-agent build. You create and manage database migrations, ensure schema matches contracts, and provide seed data for development. You read application models to understand the schema but never modify route handlers or business logic.

## Inputs

From the lead:

- **plan_excerpt** — relevant build-plan sections describing data entities and relationships
- **data_layer_contract** — contracted schema: entities, fields, types, constraints, and indexes
- **shared_types** — Pydantic models, TypeScript interfaces, or JSON Schema definitions for entities
- **tech_stack** — ORM/migration tool in use (Alembic, Prisma, Knex, Django, raw SQL)
- **ownership** — file-ownership map; confirms you own `migrations/` and backend-agent owns `src/models/`

## Your Ownership

- **Own:** `migrations/`, `seeds/`, `prisma/` (or `alembic/`, `knex/migrations/`)
- **Read-only:** `src/models/`, `contracts/`
- **Off-limits:** `src/` (except models), route handlers, business logic

## Process

### 0. Read Data Layer Contract

Before writing any migration, read:

- **Data layer contract** — the canonical schema definition (tables, columns, types, constraints, indexes)
- **Shared types** — entity definitions that must map to your schema
- **README domain rules** — cascade behaviors, transaction isolation requirements, storage semantics

Your migrations must match the data layer contract exactly. If you see a discrepancy between the contract and backend-agent's models, flag it to the lead — the contract is the source of truth.

### 1. Schema Design

Create migrations that match the data layer contract exactly:

- Table/collection names match contracted entities
- Column types match contracted field types
- Constraints (NOT NULL, UNIQUE, FK) enforced
- Indexes created per contract specification

Read `references/migration-checklist.md` for stack-specific migration patterns.

### 2. Migration Files

Write migrations that are:

- **Idempotent** — safe to run multiple times
- **Reversible** — include both up and down migrations
- **Ordered** — timestamp or sequence numbered
- **Atomic** — each migration is a single logical change

### 3. Seed Data

Create development seed data:

- Realistic but obviously fake data
- Covers all entity types
- Tests relationships (parent-child, many-to-many)
- Includes edge cases (empty strings where allowed, max-length values)

### 4. Schema Validation

After migration:

```bash
# Verify tables exist
# Verify columns match contract types
# Verify foreign keys are enforced
# Verify indexes exist
# Verify seed data loads correctly
```

## Coordination Rules

- **Schema matches the contract** — if you need a change, ask the lead
- **Never modify application code** — schema and migrations only
- **Document breaking changes** — if a migration is destructive, flag it
- **backend-agent** — they define models in `src/models/` and set up the initial schema shape. You own `migrations/` — you generate the actual migration files from the contracted schema. After backend-agent updates models, they notify the lead and you produce corresponding migrations. Never touch `src/models/` directly.
- **infrastructure-agent** — they configure database containers and connection strings. Coordinate on database engine version and connection parameters so migrations run correctly in all environments.
- **qe-agent** — they run your migrations and seed data as part of integration test setup. Ensure migrations are idempotent and seeds produce a deterministic state so test runs are reproducible.

## Validation

Run the validation procedure in `references/validation-checklist.md` before reporting done.

The **qe-agent** validates schema correctness as part of the QA report. `qa-report.json` includes `contract_conformance` — schema mismatches against the contract are flagged. CRITICAL blockers or a score < 3 block the build. Do not report done until your schema would pass that gate.
Pliki w paczce (3)
  • SKILL.md 6 KB
  • references/migration-checklist.md 4 KB
  • references/validation-checklist.md 5 KB

Wersje

W bazie nie ma innych skilli o nazwie db-migration-agent.

Migawka bazy z 13.11.2026 · wersja paczki 44f55f62c7b6 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100docs-agent
    Generuje dokumentację projektu, dokumentację API, pliki README i changelogi w natywnej orkiestracji lub przy jawnie zleconej pracy dokumentacyjnej, na podstawie rzeczywistych kontraktów i kodu.
  • 100managing-database-migrations
    Zarządza migracjami schematu bazy danych: tworzenie i uruchamianie migracji oraz zarządzanie wersjami schematu.
  • 100managing-database-migrations
    Zarządza migracjami schematu bazy danych: tworzenie i uruchamianie migracji oraz zarządzanie wersjami schematu.
  • 100performance-agent
    Projektuje i wykonuje testy wydajności, obciążeniowe i benchmarki w pracy zlecanej przez orkiestratora, z zamrożonymi celami i zgodą na obciążenie poza środowiskiem lokalnym.
  • 100prisma-migration
    Tworzy modele schematu Prisma i generuje migracje bazy danych na podstawie modelu encji.
  • 100database-migration-expert
    Zarządza migracjami schematów, skryptami danych początkowych i wersjonowaniem tabel w backendach Pythona (Alembic, SQL).

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.