Postgres Backup Restore
fmflurry/settings-opencode
PostgreSQL backup & restore playbook for the docker instance: pgdump/pgdumpall recipes, WAL archiving + PITR setup (archivemode, archivecommand, recovery.signal, recoverytargettime, timelines)…
Trigger phrases - "reset local db", "recreate local postgres", "restore dump to local", "reset local database", "load backup locally"
$ npx skills add modelguide/modelguide --skill mg-local-db-restore -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install modelguide/modelguide mg-local-db-restore --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/modelguide/modelguide.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/mg-local-db-restore .claude/skills/mg-local-db-restore && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "mg-local-db-restore" agent skill from https://github.com/modelguide/modelguide/tree/main/.claude/skills/mg-local-db-restore into .claude/skills/mg-local-db-restore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mg-local-db-restore", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/modelguide/modelguide/tree/main/.claude/skills/mg-local-db-restoreType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add modelguide/modelguide --skill mg-local-db-restore -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install modelguide/modelguide mg-local-db-restore --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/modelguide/modelguide.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/mg-local-db-restore .agents/skills/mg-local-db-restore && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "mg-local-db-restore" agent skill from https://github.com/modelguide/modelguide/tree/main/.claude/skills/mg-local-db-restore into .agents/skills/mg-local-db-restore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mg-local-db-restore", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add modelguide/modelguide --skill mg-local-db-restore -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install modelguide/modelguide mg-local-db-restore --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/modelguide/modelguide.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/mg-local-db-restore .cursor/skills/mg-local-db-restore && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "mg-local-db-restore" agent skill from https://github.com/modelguide/modelguide/tree/main/.claude/skills/mg-local-db-restore into .cursor/skills/mg-local-db-restore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mg-local-db-restore", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/modelguide/modelguide.git --path .claude/skills/mg-local-db-restore--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add modelguide/modelguide --skill mg-local-db-restore -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install modelguide/modelguide mg-local-db-restore --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/modelguide/modelguide.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/mg-local-db-restore .gemini/skills/mg-local-db-restore && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "mg-local-db-restore" agent skill from https://github.com/modelguide/modelguide/tree/main/.claude/skills/mg-local-db-restore into .gemini/skills/mg-local-db-restore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mg-local-db-restore", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install modelguide/modelguide mg-local-db-restoreInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add modelguide/modelguide --skill mg-local-db-restore -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/modelguide/modelguide.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/mg-local-db-restore .github/skills/mg-local-db-restore && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "mg-local-db-restore" agent skill from https://github.com/modelguide/modelguide/tree/main/.claude/skills/mg-local-db-restore into .github/skills/mg-local-db-restore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mg-local-db-restore", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add modelguide/modelguide --skill mg-local-db-restore -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install modelguide/modelguide mg-local-db-restore --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/modelguide/modelguide.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/mg-local-db-restore .opencode/skills/mg-local-db-restore && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "mg-local-db-restore" agent skill from https://github.com/modelguide/modelguide/tree/main/.claude/skills/mg-local-db-restore into .opencode/skills/mg-local-db-restore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mg-local-db-restore", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
mg-local-db-restoreTrigger phrases - "reset local db", "recreate local postgres", "restore dump to local", "reset local database", "load backup locally"
Mg Local DB Restore is an agent skill from modelguide/modelguide. Trigger phrases - "reset local db", "recreate local postgres", "restore dump to local", "reset local database", "load backup locally"
Its SKILL.md is about 650 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in DevOps & Cloud, covering Containers and Backup and disaster recovery. It works with PostgreSQL and Docker. The repository describes itself as: Open-source voice agent orchestration framework - build production voice AI pipelines without vendor lock-in. The licence is MIT.
9 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 554caa0. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
dockermakepsqlFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use docker, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
POSTGRES_PASSWORDFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Mg Local DB Restore loads about 645 tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 269 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from modelguide/modelguide at commit 554caa0, republished under its MIT licence (© modelguide). 269 words, ~645 tokens.
.claude/skills/mg-local-db-restore/SKILL.md (or your agent's skills folder).Reset the local Docker Postgres and restore it from a .dump backup file.
Ask the user if not provided:
.dump.gz file. If not specified, list files matching .claude/local/*.dump.gz and ask the user to pick one.ls -lh .claude/local/*.dump.gzAsk the user which backup to use.
This destroys all local database data. Ask the user to confirm before proceeding.
Only target the postgres service to avoid affecting other containers:
docker compose down -v postgresdocker compose up -d postgresPoll until the container is healthy (~5-10 seconds):
until docker compose ps postgres | grep -q healthy; do sleep 1; doneRead docker-compose.yml at the project root and extract:
POSTGRES_USERPOSTGRES_PASSWORDPOSTGRES_DBNever hardcode credentials — always read them from the compose file.
Never pass credentials in command-line arguments. Use PGPASSWORD as an inline env var:
gunzip -c <backup-file> | PGPASSWORD=<password> pg_restore --clean --if-exists --no-owner --no-acl \
-h localhost -p <port> -U <user> -d <db>Query pg_tables via psql to confirm tables exist:
PGPASSWORD=<password> psql -h localhost -p <port> -U <user> -d <db> \
-c "SELECT schemaname, tablename FROM pg_tables WHERE schemaname = 'public' ORDER BY tablename;"Report the table count and list to the user.
Tell the user the restore is complete. Remind them:
make db-migrate if the dump may be behind on migrationsmake db-seed if they need fresh seed data on top of the backupdocker-compose.yml)init.sql script automatically creates the modelguide_app role on a fresh volume, so the restore should work without manual role creationpg_restore reports errors about missing roles or permissions, these are usually safe to ignore with --no-owner --no-acl© modelguide, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/mg-local-db-restore of modelguide/modelguide.
Open the folder on GitHubat commit 554caa0
Mg Local DB Restore next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Mg Local DB Restore this skillmodelguide/modelguide | 108 | — | ~645 | Automated safety check: Pass | MIT | |
| Postgres Backup Restorefmflurry/settings-opencode | 171 | — | ~2.3k | Automated safety check: Pass | MIT | |
| Supabasemagnus919/agent-skills | 116 | — | ~2.2k | Automated safety check: Pass | MIT | |
| Cb Build TestBlkLeg/CircuitBreaker | 201 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Monstermq Broker Configvogler75/monster-mq | 143 | — | ~2.2k | Automated safety check: Pass | GPL-3.0 | |
| Unraiddinglebear-ai/unraid | 135 | — | ~2.8k | Automated safety check: Pass | MIT |
fmflurry/settings-opencode
PostgreSQL backup & restore playbook for the docker instance: pgdump/pgdumpall recipes, WAL archiving + PITR setup (archivemode, archivecommand, recovery.signal, recoverytargettime, timelines)…
magnus919/agent-skills
A skill your agent uses when developing applications with Supabase, running the Supabase CLI, designing migrations and RLS policies, testing database behavior, generating client types, deploying the…
BlkLeg/CircuitBreaker
How Circuit Breaker is built, tested, packaged, and kept secret-safe — the make dev/verify/test targets, the PostgreSQL integration test database and its fixtures, the mono Docker image and native…
vogler75/monster-mq
Guide for configuring, deploying, and operating the MonsterMQ broker.
dinglebear-ai/unraid
Query and monitor an Unraid NAS/homelab server — array health, disk temperatures, Docker containers, virtual machines, system metrics, notifications, alerts, shares, UPS status, log files, network…
pavel-molyanov/molyanov-ai-dev
Provides project infrastructure conventions and review criteria for local setup, Docker, Git hooks, CI/CD, service delivery, release artifacts, monitoring, backups, and operations.
modelguide/modelguide
Generate YAML configuration files and run CLI commands to onboard organizations into ModelGuide.
modelguide/modelguide
A skill your agent uses when the user asks to add a connector, create a connector, implement a connector for a service, add a tool to a connector, update a connector tool, or asks about connector…
modelguide/modelguide
Use before committing significant code changes to verify project integrity.
modelguide/modelguide
Backup a PostgreSQL database from a Railway environment. An agent skill from modelguide/modelguide.
modelguide/modelguide
Restore a PostgreSQL database backup to a Railway environment.
modelguide/modelguide
Deploy all ModelGuide services (API, UI, LB) to a Railway environment.
Works with
Categories
Trigger phrases - "reset local db", "recreate local postgres", "restore dump to local", "reset local database", "load backup locally". Mg Local DB Restore is an agent skill from modelguide/modelguide.
Mg Local DB Restore fits situations like: phrases - reset local db; recreate local postgres; restore dump to local; reset local database.
Run `npx skills add modelguide/modelguide --skill mg-local-db-restore -a claude-code`. Or copy the skill folder (.claude/skills/mg-local-db-restore in modelguide/modelguide) into .claude/skills/mg-local-db-restore in your project. Claude Code loads it when a task matches its description.
Run `npx skills add modelguide/modelguide --skill mg-local-db-restore -a codex`. Or copy the skill folder (.claude/skills/mg-local-db-restore in modelguide/modelguide) into .agents/skills/mg-local-db-restore in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add modelguide/modelguide --skill mg-local-db-restore -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mg-local-db-restore, .gemini/skills/mg-local-db-restore, .github/skills/mg-local-db-restore and .opencode/skills/mg-local-db-restore in your project.
Going by SKILL.md and its folder, Mg Local DB Restore needs the command-line tools its instructions call (docker, make and psql) and credentials named POSTGRES_PASSWORD. Our summary lists: Docker.
SKILL.md contains no URLs. Its commands use docker, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Mg Local DB Restore is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 645 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Mg Local DB Restore: Postgres Backup Restore (fmflurry/settings-opencode, 171 stars), Supabase (magnus919/agent-skills, 116 stars), Cb Build Test (BlkLeg/CircuitBreaker, 201 stars) and Monstermq Broker Config (vogler75/monster-mq, 143 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
modelguide (a GitHub organization) maintains it in modelguide/modelguide, which has 108 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on June 20, 2026.
Source: modelguide/modelguide on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.