Skip to content
Skills Library
Data & analytics · Planning

data-storage-migrations

/data-storage-migrations

Use this capability for database schema design, SQL/NoSQL selection, migrations, indexing, query review, connection pooling, backups, object storage, event storage, data retention, and data lifecycle planning. Trigger on database, schema, migration, index, SQL, PostgreSQL, MySQL, MongoDB, Redis, S3, ORM, transaction, backup, retention, or data model.

Licence
Apache-2.0
Last repository change
26.10.2026

Assessment and security

95/ 100Class: good
Format20 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Use this capability for database schema design, SQL/NoSQL selection, migrations, indexing, query review, connection pooling, backups, object storage, event storage, data retention, and data lifecycle planning. Trigger on database, schema, migration, index, SQL, PostgreSQL, MySQL, MongoDB, Redis, S3, ORM, transaction, backup, retention, or data model.

Original author description

Use this capability for database schema design, SQL/NoSQL selection, migrations, indexing, query review, connection pooling, backups, object storage, event storage, data retention, and data lifecycle planning. Trigger on database, schema, migration, index, SQL, PostgreSQL, MySQL, MongoDB, Redis, S3, ORM, transaction, backup, retention, or data model.

How it works

  1. Operating contract
  2. When to activate
  3. Inputs to request or inspect
  4. Work protocol
  5. Required output format
  6. Verification gates
  7. Anti-patterns to block
  8. Hand-off rules
  9. Examples
  10. References to load on demand
Original SKILL.md headings · 68 lines, 606 words
SKILL.md preview
---
id: prodhardening.data_storage_migrations
name: data-storage-migrations
version: 1.0.0
status: stable
layer: "04 Database & Storage"
summary: "Design schemas, migrations, queries, indexes, transactions, storage selection, and data lifecycle controls."
description: "Use this capability for database schema design, SQL/NoSQL selection, migrations, indexing, query review, connection pooling, backups, object storage, event storage, data retention, and data lifecycle planning. Trigger on database, schema, migration, index, SQL, PostgreSQL, MySQL, MongoDB, Redis, S3, ORM, transaction, backup, retention, or data model."
activation:
  explicit_triggers:
    - database
    - schema
    - migration
    - index
    - SQL
    - PostgreSQL
    - MySQL
    - MongoDB
    - Redis
    - ORM
    - transaction
    - backup
    - retention
    - data model
    - object storage
inputs:
  - entity model
  - queries
  - migration files
  - ORM schema
  - access patterns
  - volume estimates
  - retention requirements
outputs:
  - data model
  - migration plan
  - index plan
  - query review
  - backup/restore strategy
  - data lifecycle controls
related_capabilities:
  - prodhardening.multitenancy_rls_isolation
  - prodhardening.privacy_compliance_data_governance
  - prodhardening.availability_recovery_continuity
---
# data-storage-migrations
Design schemas, migrations, queries, indexes, transactions, storage selection, and data lifecycle controls.
## Operating contract

Act as a production hardening specialist for **04 Database & Storage**. Use model-agnostic reasoning: no instruction, output, or workflow in this capability depends on a particular model vendor or agent runtime. Prefer deterministic evidence over persuasive prose. When evidence is missing, name the assumption and make it visible in the output.
## When to activate
Use this capability for database schema design, SQL/NoSQL selection, migrations, indexing, query review, connection pooling, backups, object storage, event storage, data retention, and data lifecycle planning. Trigger on database, schema, migration, index, SQL, PostgreSQL, MySQL, MongoDB, Redis, S3, ORM, transaction, backup, retention, or data model.
## Inputs to request or inspect
- entity model
- queries
- migration files
- ORM schema
- access patterns
- volume estimates
- retention requirements

## Work protocol
1. Choose storage from access patterns, consistency needs, query complexity, latency, operational maturity, and failure mode, not fashion.
2. Model entities, relationships, ownership, lifecycle, retention, and deletion semantics before writing migrations.
3. Design migrations for zero or low downtime: expand, backfill, dual-read/write if needed, contract, and cleanup.
4. Review queries with expected cardinality, indexes, lock behavior, transaction isolation, and connection pool impact.
5. Plan backups and restores as executable drills, not documents. Include data corruption and accidental deletion scenarios.
6. Treat caches and search indexes as derived data unless explicitly designed as source of truth.

## Required output format

Return a concise report with these sections unless the user requested a concrete file or code diff:

1. **Scope interpreted** — what is in and out.
2. **Findings / decisions** — ordered by production risk, not by discovery order.
3. **Recommended actions** — owner-ready tasks with priority and rationale.
4. **Verification evidence** — tests, scans, contracts, telemetry, commands, or review steps required.
5. **Residual risk / assumptions** — what remains uncertain and how to resolve it.
6. **Hand-offs** — other capabilities that should review the work.
## Verification gates
- Every schema change has forward migration, rollback/roll-forward plan, and data backfill strategy.
- Every high-volume query has an index or explicit performance rationale.
- Every data store has backup, restore, retention, and deletion behavior defined.
- Every transaction boundary is intentional and avoids long locks in user-facing paths.
- Production migrations are rehearsed with realistic data volume or a safe proxy.

## Anti-patterns to block
- Do not deploy destructive migrations in the same release that still depends on old fields.
- Do not assume ORM-generated queries are efficient without checking plans.
- Do not create caches that bypass authorization or tenant boundaries.

## Hand-off rules
- Hand off to the orchestrator when a request spans more than three production layers or has unclear risk ownership.
- Consider `prodhardening.multitenancy_rls_isolation` when its layer is implicated by the findings.
- Consider `prodhardening.privacy_compliance_data_governance` when its layer is implicated by the findings.
- Consider `prodhardening.availability_recovery_continuity` when its layer is implicated by the findings.

## Examples
**Prompt:** “Add organizations and teams to the data model.”

**Expected handling:** Produce entities, relationships, constraints, indexes, migrations, access patterns, and test data.

**Prompt:** “Why is this query slow?”

**Expected handling:** Inspect plan, cardinality, indexes, locks, data shape, and application call patterns.

## References to load on demand
- `../../references/data-storage-hardening.md` — read when detailed checklists, templates, or implementation guidance are needed.
- `../../references/production-readiness-gates.md` — read when detailed checklists, templates, or implementation guidance are needed.

## Completion definition
The work is complete only when recommendations are actionable, verification steps are explicit, and unresolved assumptions are visible. Never present a system as production-ready solely because code was generated or a checklist was copied.
Files in this package (2)
  • CAPABILITY.md 6 KB
  • SKILL.md 6 KB

Versions

The database has no other skills named data-storage-migrations.

Database snapshot: 13.11.2026 · package version 49400dfe175d (SHA-256 digest of the entire package)

Downloads in the last 30 days: 2 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100sql-toolkit
    Query, design, migrate, and optimize SQL databases. Use when working with SQLite, PostgreSQL, or MySQL — schema design, writing queries, creating migrations, indexing, backup/restore, and debugging slow queries. No ORMs required.
  • 100database-schema-designer
    Use this skill when designing or reviewing database schemas for SQL and NoSQL databases. Covers normalization, indexing strategy, migration management with rollback safety, query optimization, and multi-tenant patterns. Supports PostgreSQL, MySQL, SQLite, MongoDB, and Vitess.
  • 100database-design
    Database schema design, optimization, and migration patterns for PostgreSQL, MySQL, and NoSQL databases. Use for designing schemas, writing migrations, or optimizing queries.
  • 90database-engineer
    Database architecture design, schema optimization, query performance tuning, and data migration. Handles PostgreSQL, MySQL, MongoDB, Redis. Use when user asks to design database, optimize queries, create migrations, or improve database performance. Do NOT use for frontend or application logic.
  • 100database-design
    Designs database schemas, indexing strategies, query optimization, and migration patterns for SQL and NoSQL databases. Use when designing tables, optimizing queries, fixing N+1 problems, planning migrations, or when asked about database performance, normalization, ORMs, or data modeling.
  • 100database-designer
    Use when the user asks to design database schemas, plan data migrations, optimize queries, choose between SQL and NoSQL, or model data relationships.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.