Agent skill

Mg Railway DB Backup

by modelguide in modelguide/modelguide

Backup a PostgreSQL database from a Railway environment. An agent skill from modelguide/modelguide.

MITAuto-check passedDatabases

Install Mg Railway DB Backup

skills CLI
$ npx skills add modelguide/modelguide --skill mg-railway-db-backup -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install modelguide/modelguide mg-railway-db-backup --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/modelguide/modelguide.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/mg-railway-db-backup .claude/skills/mg-railway-db-backup && rm -rf skills-src

Use ~/.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/

Facts

Skill name
mg-railway-db-backup
GitHub stars
108
Token cost
~534 tokens
SKILL.md length
150 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Backup a PostgreSQL database from a Railway environment. An agent skill from modelguide/modelguide.

  • Works in 4 steps: Link to the correct project and… → Ensure output directory exists → Run pg_dump — credentials piped from… → …
  • The user asks to backup db
  • SKILL.md covers Inputs, Procedure and Notes
  • Calls railway and pg_dump

What it does

Mg Railway DB Backup is an agent skill from modelguide/modelguide. Backup a PostgreSQL database from a Railway environment. Use when the user asks to "backup db", "dump database", "save db from railway", "backup railway database", or "export db".

Its SKILL.md is about 530 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 Databases, covering Backup and disaster recovery. It works with PostgreSQL. The repository describes itself as: Open-source voice agent orchestration framework - build production voice AI pipelines without vendor lock-in. The licence is MIT.

When your agent uses it

  • The user asks to backup db
  • Save db from railway
  • Backup railway database

Example prompts

  • “backup db”
  • “dump database”
  • “save db from railway”
  • “/mg-railway-db-backup”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Link to the correct project and environment using Railway MCP link-environment tool
  2. Ensure output directory exists
  3. Run pg_dump — credentials piped from Railway CLI (never write credential values in commands)
  4. Verify the backup file exists and report path + size to the user.

What it can do on your machine

Read from SKILL.md and the folder at commit 554caa0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • railway
    • pg_dump

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mg Railway DB Backup loads about 534 tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 150 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~534

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from modelguide/modelguide at commit 554caa0, republished under its MIT licence (© modelguide). 150 words, ~534 tokens.

Download SKILL.mdSave it as .claude/skills/mg-railway-db-backup/SKILL.md (or your agent's skills folder).
name
mg-railway-db-backup
description
Backup a PostgreSQL database from a Railway environment. Use when the user asks to "backup db", "dump database", "save db from railway", "backup railway database", or "export db".

Railway DB Backup

Backup a PostgreSQL database from a Railway environment to a local file.

Inputs

Ask the user if not provided:

  • project — Railway project name
  • environment — Railway environment name to backup from (e.g., demo, production)

Procedure

  1. Link to the correct project and environment using Railway MCP link-environment tool:

    • workspacePath: <project-root>
    • environmentName: <environment>
  2. Ensure output directory exists:

    bash
    mkdir -p <project-root>/.claude/local
  3. Run pg_dump — credentials piped from Railway CLI (never write credential values in commands):

    bash
    VARS=$(railway variables -s Postgres -e <environment> --kv 2>/dev/null) && \
    export PGPASSWORD=$(echo "$VARS" | grep '^PGPASSWORD=' | cut -d= -f2-) && \
    PGUSER=$(echo "$VARS" | grep '^PGUSER=' | cut -d= -f2-) && \
    PGDATABASE=$(echo "$VARS" | grep '^PGDATABASE=' | cut -d= -f2-) && \
    DB_URL=$(echo "$VARS" | grep '^DATABASE_PUBLIC_URL=' | cut -d= -f2-) && \
    PGHOST=$(echo "$DB_URL" | sed 's|postgresql://[^@]*@||;s|:.*||') && \
    PGPORT=$(echo "$DB_URL" | sed 's|.*:||;s|/.*||') && \
    pg_dump -h "$PGHOST" -p "$PGPORT" -U "$PGUSER" -d "$PGDATABASE" \
      --no-owner --no-acl -F c \
      | gzip > <project-root>/.claude/local/<project>-<environment>-backup-$(date +%Y%m%d-%H%M%S).dump.gz

    This reads credentials from railway variables into shell vars at runtime — no secrets ever appear in the command text.

  4. Verify the backup file exists and report path + size to the user.

Notes

  • Railway runs PostgreSQL 17 — if local pg_dump version is too old, use the one from postgresql@17 homebrew package
  • Backup format is custom (-F c) for efficient restore with pg_restore
  • --no-owner --no-acl strips ownership/permissions for portable restores
  • Backups are stored in .claude/local/ which is git-ignored

© modelguide, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/mg-railway-db-backup of modelguide/modelguide.

Open the folder on GitHubat commit 554caa0

Compare with similar skills

Mg Railway DB Backup 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.

Mg Railway DB Backup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mg Railway DB Backup this skillmodelguide/modelguide108—~534Automated safety check: PassMIT
Database Backupssickn33/agentic-awesome-skills47k2 repos~3.1kAutomated safety check: NotesMIT
GCP Cloud SQLsickn33/agentic-awesome-skills47k2 repos~2.4kAutomated safety check: PassMIT
Postgresql Devsecsickn33/agentic-awesome-skills47k2 repos~2.5kAutomated safety check: NotesMIT
Alloydb Basicsgoogle/skills21k—~1.7kAutomated safety check: PassApache-2.0
Alloydb Basicsdavila7/claude-code-templates33k—~611Automated safety check: PassMIT

Similar skills

  • Database Backups

    sickn33/agentic-awesome-skills

    Implement database backup strategies. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~3.1k tokens
    DatabasesAuto-check: notes
  • GCP Cloud SQL

    sickn33/agentic-awesome-skills

    Provision Cloud SQL and Spanner databases. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~2.4k tokens
    DatabasesAuto-check passed
  • Postgresql Devsec

    sickn33/agentic-awesome-skills

    Administer PostgreSQL databases. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~2.5k tokens
    DatabasesAuto-check: notes
  • Alloydb Basics

    google/skills

    Official

    Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations.

    21k GitHub stars~1.7k tokensUpdated today
    DatabasesAuto-check passed
  • Alloydb Basics

    davila7/claude-code-templates

    Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB MCP tools for automated database operations including AI-powered search and vector capabilities.

    33k GitHub stars~611 tokensUpdated today
    DatabasesAuto-check passed
  • AWS Cloudformation Rds

    giuseppe-trisciuoglio/developer-kit

    Provides AWS CloudFormation patterns for Amazon RDS databases.

    357 GitHub stars~3k tokensUpdated 1 mo ago
    DatabasesAuto-check: notes

More from modelguide/modelguide

  • Mg CLI

    modelguide/modelguide

    Generate YAML configuration files and run CLI commands to onboard organizations into ModelGuide.

    108 GitHub stars~3.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Mg Connector

    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…

    108 GitHub stars~4.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Mg Integrity Check

    modelguide/modelguide

    Use before committing significant code changes to verify project integrity.

    108 GitHub stars~2.4k tokensUpdated 3 mo ago
    Auto-check: notes
  • Mg Local DB Restore

    modelguide/modelguide

    Trigger phrases - "reset local db", "recreate local postgres", "restore dump to local", "reset local database", "load backup locally"

    108 GitHub stars~645 tokensUpdated 3 mo ago
    Auto-check passed
  • Mg Railway DB Restore

    modelguide/modelguide

    Restore a PostgreSQL database backup to a Railway environment.

    108 GitHub stars~562 tokensUpdated 3 mo ago
    Auto-check passed
  • Mg Railway Deploy All

    modelguide/modelguide

    Deploy all ModelGuide services (API, UI, LB) to a Railway environment.

    108 GitHub stars~667 tokensUpdated 3 mo ago
    Auto-check passed

Works with

Questions about Mg Railway DB Backup

What does Mg Railway DB Backup do?

Backup a PostgreSQL database from a Railway environment. An agent skill from modelguide/modelguide. Mg Railway DB Backup is an agent skill from modelguide/modelguide. Backup a PostgreSQL database from a Railway environment.

When should I use Mg Railway DB Backup?

Mg Railway DB Backup fits situations like: the user asks to backup db; save db from railway; backup railway database.

How do I install Mg Railway DB Backup in Claude Code?

Run `npx skills add modelguide/modelguide --skill mg-railway-db-backup -a claude-code`. Or copy the skill folder (.claude/skills/mg-railway-db-backup in modelguide/modelguide) into .claude/skills/mg-railway-db-backup in your project. Claude Code loads it when a task matches its description.

How do I install Mg Railway DB Backup in Codex?

Run `npx skills add modelguide/modelguide --skill mg-railway-db-backup -a codex`. Or copy the skill folder (.claude/skills/mg-railway-db-backup in modelguide/modelguide) into .agents/skills/mg-railway-db-backup in your project. Codex loads it when a task matches its description.

Can I use Mg Railway DB Backup in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add modelguide/modelguide --skill mg-railway-db-backup -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-railway-db-backup, .gemini/skills/mg-railway-db-backup, .github/skills/mg-railway-db-backup and .opencode/skills/mg-railway-db-backup in your project.

What does Mg Railway DB Backup need to run?

Going by SKILL.md and its folder, Mg Railway DB Backup needs the command-line tools its instructions call (railway and pg_dump).

Does Mg Railway DB Backup access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Mg Railway DB Backup safe to install?

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.

What licence does Mg Railway DB Backup use?

Mg Railway DB Backup is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mg Railway DB Backup use?

About 534 tokens (SKILL.md is roughly 2.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Mg Railway DB Backup?

Skills that share tags, products or a category with Mg Railway DB Backup: Database Backups (sickn33/agentic-awesome-skills, 47k stars), GCP Cloud SQL (sickn33/agentic-awesome-skills, 47k stars), Postgresql Devsec (sickn33/agentic-awesome-skills, 47k stars) and Alloydb Basics (google/skills, 21k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mg Railway DB Backup?

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.