skills/railway/SKILL.md
Deploy and manage applications on railway.com. Use when the user asks to deploy, host, or ship an app to Railway, add databases or services to Railway, configure Railway projects, or troubleshoot Railway deployments.
npx skillsauth add pietz/skills railwayInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The Railway CLI has built-in help for all commands:
railway --help
railway <command> --help
Important: The CLI has interactive menus that don't work in automated contexts. Always provide all required parameters explicitly to avoid prompts (e.g., --workspace, --service, --name).
# Create project (always specify workspace to avoid prompt)
railway init --name "my-project" --workspace "Workspace Name"
# Deploy from a template (get ID from template URL on railway.com)
railway init --template <template-id>
# Add PostgreSQL database
railway add --database postgres
# Add empty service for your app
railway add --service api
# Link local directory to service
railway service link api
# Set environment variables (use references for database URLs)
railway variables --service api --set 'DATABASE_URL=${{Postgres.DATABASE_URL}}'
# Deploy
railway up
# Generate public domain
railway domain --service api
# View logs
railway logs --service api
railway logs --service api --build # build logs
# SSH into running service
railway ssh --service api
These are less common but useful — run railway <command> --help for details:
railway status --json # full project overview (services, deployments, domains)
railway metrics --service api # CPU, memory, network, disk usage
railway redeploy --service api # redeploy latest deployment
railway restart --service api # restart without redeploying
railway down --service api # take a service offline
Reference variables across services with ${{ServiceName.VARIABLE}}:
# Wire a database to your app
railway variables --service api --set 'DATABASE_URL=${{Postgres.DATABASE_URL}}'
railway variables --service api --set 'REDIS_URL=${{Redis.REDIS_URL}}'
# Wire backend URL to frontend
railway variables --service web --set 'API_URL=${{api.RAILWAY_PUBLIC_DOMAIN}}'
Railway also provides built-in variables: RAILWAY_PUBLIC_DOMAIN, RAILWAY_PRIVATE_DOMAIN, RAILWAY_PROJECT_ID, RAILWAY_ENVIRONMENT_NAME, etc.
For operations not available in the CLI, Railway has a GraphQL API:
https://backboard.railway.com/graphql/v2~/.railway/config.json → user.token (use as Bearer token)Always bind your app to 0.0.0.0:$PORT - Railway injects the PORT variable.
Railway parses single-line JSON on stdout, colors by level field, and makes all JSON fields queryable via @field:value in the Log Explorer. For the full setup guide, patterns, and pitfalls, see logging-python.md.
development
Finish a build session by shipping the work. Ensure tests exist and pass, validate the functionality, spawn a fresh-eyes subagent review when the change is large or risky, then commit and push to main. Use when the user says "ship", "ship it", "wrap this up and push", "test, commit and push", or otherwise wants the session's changes tested, reviewed, committed, and pushed.
development
Search YouTube and read video transcripts from the command line. Use this whenever the user wants to find YouTube videos or channels, answer a question using knowledge from YouTube videos, get/read/summarize a video's transcript or captions, or find where in a video something is discussed. Also consider this skill for general purpose research, since YouTube is a rich source of information.
development
Create visual documents (presentations, flyers, brochures, posters) by generating HTML/CSS and converting to PDF via headless Chromium. Use this skill when the user wants to create slides, presentations, pitch decks, flyers, brochures, or posters.
development
Find and remove incidental architectural complexity in an existing codebase — structure that accreted through many locally-reasonable edits until the whole became more complex than the problem warrants. Preserves what the software does for its callers while simplifying how it's built. NOT for bug fixes, feature work, formatting/style cleanup, or refactors whose change is already obvious.