Agent skill · software engineering · davila7

railway-database

Add official Railway database services (Postgres, Redis, MySQL, MongoDB). Use when user wants to add a database, says "add postgres", "add redis", "add database", "connect to database", or "wire up the database". For other templates (Ghost, Strapi, n8n), use the railway-templates skill.

Why this skill is useful

Adds specific commands and workflows for deploying and managing Railway database services that the AI wouldn't reliably generate on its own.

What it needs

Requires railway-cli installed locally. About 4k tokens when loaded. Last updated 2026-08-06. 30,138 stars on the source repository.

What this skill does

Railway Database Add official Railway database services. These are maintained templates with pre-configured volumes, networking, and connection variables. For non-database templates, see the railway-templates skill. When to Use User asks to "add a database", "add Postgres", "add Redis", etc. User needs a database for their application User asks about connecting to a database User says "add postgres and connect to my server" User says "wire up the database" Decision Flow ALWAYS check for existing databases FIRST before creating. Check for Existing Databases Before creating a database, check if one already exists. For full environment config structure, see environment-config.md. Then query environment config and check source.image for each service: The config.services object contains each service's configuration. Check source.image for: ghcr.io/railway/postgres or postgres: → Postgres ghcr.io/railway/redis or redis: → Redis ghcr.io/railway/mysql or mysql: → MySQL ghcr.io/railway/mongo or mongo: → MongoDB Available Databases Database Template Code ---------- --------------- PostgreSQL postgres Redis redis MySQL mysql MongoDB mongodb Prerequisites Get project context: Extract: id - project ID environments.edges[0].node.id - environment ID Get workspace ID (not in status output): Adding a Database Step 1: Fetch Template This returns the template's id and serializedConfig needed for deployment. Step 2: Deploy Template Important: serializedConfig is the exact object from the template query, not a string. Connecting to the Database After deployment, other services connect using reference variables. For complete variable reference syntax and wiring patterns, see variables.md. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills davila7/database

View the source on GitHub

Browse the @skills marketplace