database_skill

This skill helps you add and connect a database (Postgres, Redis, MySQL, MongoDB) to your project by deploying templates and wiring variables.
  • Shell
  • Official

79

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill railwayapp/railway-skills --skill database

  • SKILL.md7.3 KB

Overview

This skill adds official Railway database services (Postgres, Redis, MySQL, MongoDB) and helps wire them into your project. It checks for existing databases, deploys maintained templates with volumes and networking, and provides the connection variables services need to use them. Use it when you want to create or connect database services quickly and reliably.

How this skill works

First, it inspects the environment config to detect existing database services by checking each service's source.image. If none exist, it fetches the requested database template (id and serializedConfig) and deploys it to the project environment. After deployment, it produces the standard connection variables and guides wiring those variables into target services using the environment wiring pattern.

When to use it

  • User asks to add a database ("add database", "add postgres", "add redis", etc.)
  • User needs to connect an app or server to a database
  • User says "connect to database" or "wire up the database"
  • You need a managed Railway database with persistence and networking preconfigured
  • User requests creating Postgres, Redis, MySQL, or MongoDB in a project

Best practices

  • Always check for existing databases in the environment before creating a new one
  • Use private/internal URL variables for backend services (e.g., Postgres.DATABASE_URL)
  • Do not expose DB credentials directly to frontends; use a backend API or public connection only when necessary
  • When multiple target services exist, ask which service should receive the DATABASE_URL and wire via environment variables
  • Prefer the maintained template codes: postgres, redis, mysql, mongodb

Example use cases

  • Add Postgres to a project and return the connection variable for a backend service
  • Create Redis and wire REDIS_URL into an existing server service
  • Check environment for existing DBs and skip creation if found
  • Deploy MongoDB and provide instructions for backend and optional public URL usage
  • Respond to "add postgres and connect to my server" by creating (if needed) and wiring DATABASE_URL

FAQ

Query the environment config and check each service's source.image for known database image patterns (postgres, redis, mysql, mongo).

Which variable should my backend use to connect?

Use the internal connection variable (e.g., ${Postgres.DATABASE_URL}, ${Redis.REDIS_URL}, ${MySQL.MYSQL_URL}, ${MongoDB.MONGO_URL}).

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational