sync-db

This skill should be used when the user asks to "sync database", "get production data", "download prod db", "migrate database", "update local db", "refresh dev database", or needs to sync production data to local/dev environment.

16 stars

Best use case

sync-db is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

This skill should be used when the user asks to "sync database", "get production data", "download prod db", "migrate database", "update local db", "refresh dev database", or needs to sync production data to local/dev environment.

Teams using sync-db should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/sync-db/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/sync-db/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/sync-db/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How sync-db Compares

Feature / Agentsync-dbStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

This skill should be used when the user asks to "sync database", "get production data", "download prod db", "migrate database", "update local db", "refresh dev database", or needs to sync production data to local/dev environment.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Sync Production Database to Development

Run the database migration script to sync production data to local development environment.

## Prerequisites
- Virtual environment must be activated: `source backend/env/bin/activate`
- AWS CLI configured with Parameter Store access
- Docker installed (for database operations)

## Script Location
`backend/scripts/migrate-prod-to-dev.sh`

## Usage Options

### Download Production Database Only (Safest)
```bash
cd backend/scripts
./migrate-prod-to-dev.sh --download
```
Downloads production database to `backend/backups/` without making any local changes.

### Upload Latest Dump to Dev Database
```bash
cd backend/scripts
./migrate-prod-to-dev.sh --upload
```
Restores the most recent backup file to development database.

### Run Django Migrations and Create Admin User Only
```bash
cd backend/scripts
./migrate-prod-to-dev.sh --setup
```
Runs migrations and creates/updates admin user (`dev@genlayer.foundation` / `password`).

### Full Migration (Download + Upload + Setup)
```bash
cd backend/scripts
./migrate-prod-to-dev.sh
```
Complete workflow: download production data, restore to dev, run migrations, and create admin.

## What It Does
1. Fetches production database credentials from AWS Parameter Store
2. Downloads production PostgreSQL database using Docker (matching version)
3. Restores to development database (local or AWS dev instance)
4. Runs Django migrations
5. Creates/updates admin user with Steward role

## Notes
- Backups are saved to `backend/backups/` with timestamps
- Uses Docker to avoid PostgreSQL version mismatch issues
- See `backend/scripts/README.md` for detailed documentation and troubleshooting

Related Skills

sync-docs

16
from diegosouzapw/awesome-omni-skill

Strategic documentation sync - review docs before implementation (pull context) OR export learnings after implementation (push to living docs). NOT bidirectional - two separate one-way operations at different phases.

skill-sync-checker

16
from diegosouzapw/awesome-omni-skill

Detects content drift between skill files and their source documents. Helps maintain skills that are derived from other documentation by comparing content and flagging outdated sections.

openclaw-docs-sync

16
from diegosouzapw/awesome-omni-skill

Sync OpenClaw + ClawHub + Skills docs into a local mirror for the QMD memory backend.

docs-sync

16
from diegosouzapw/awesome-omni-skill

Sync AILANG documentation website with codebase reality. Use after releases, when features are implemented, or when website accuracy is questioned. Checks design docs vs website, validates examples, updates feature status.

async

16
from diegosouzapw/awesome-omni-skill

Regel 10: Async-First mit Symfony Messenger. Use when working with async.

synchronization

16
from diegosouzapw/awesome-omni-skill

Convergence to common trajectory in coupled systems

sync-specs

16
from diegosouzapw/awesome-omni-skill

Sync ALL increment specifications to living docs structure by default. Creates FS-XXX folders for each increment. Use with increment ID to sync single increment.

asyncredux-error-handling

16
from diegosouzapw/awesome-omni-skill

Implement comprehensive error handling for actions. Covers the `wrapError()` method for action-level error wrapping, GlobalWrapError for app-wide error transformation, ErrorObserver for logging/monitoring, and the error handling flow (before → reduce → after).

ado-sync

16
from diegosouzapw/awesome-omni-skill

Help and guidance for Azure DevOps synchronization with SpecWeave increments. Use when asking how to set up ADO sync, configure credentials, or troubleshoot integration issues. For actual syncing, use /sw-ado:sync command.

sync

16
from diegosouzapw/awesome-omni-skill

Fast save-point: sync all session-context files and MEMORY.md with current progress. Zero questions, zero delay. Use when user says /sync, save progress, save state, sync context, or /sync --full for capability inventory.

Skill Synchronizer

16
from diegosouzapw/awesome-omni-skill

Lee los metadatos de todas las skills y actualiza el índice en AGENTS.md.

rust-async-patterns

16
from diegosouzapw/awesome-omni-skill

Master Rust async programming with Tokio, async traits, error handling, and concurrent patterns. Use when building async Rust applications, implementing concurrent systems, or debugging async code.