skills/infra-railway/SKILL.md
Railway deployment and infrastructure management skill. This skill should be used when deploying applications to Railway, managing Railway services, checking deployment status, viewing logs, configuring environment variables, or troubleshooting Railway deployments.
npx skillsauth add aussiegingersnap/cursor-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.
This skill provides workflows and knowledge for deploying and managing applications on Railway.
Railway is a modern cloud platform for deploying applications. This skill integrates with the Railway MCP tools to provide deployment, monitoring, and management capabilities.
Before using Railway MCP tools:
railway login in terminalrailway link in the project directory| Tool | Purpose |
|------|---------|
| check-railway-status | Verify CLI is installed and authenticated |
| list-projects | List all Railway projects for the account |
| list-services | List services in the linked project |
| list-deployments | List deployments with status and metadata |
| list-variables | Show environment variables for a service |
| set-variables | Set environment variables |
| get-logs | Get build or deployment logs |
| deploy | Upload and deploy from local directory |
| generate-domain | Generate a Railway domain for the service |
| link-service | Link to a specific Railway service |
| link-environment | Link to a specific Railway environment |
| create-environment | Create a new Railway environment |
| create-project-and-link | Create and link a new Railway project |
| deploy-template | Search and deploy Railway templates |
Verify CLI authentication:
Use check-railway-status to confirm Railway CLI is logged in
Link project (if not linked):
railway login in terminalrailway link in the project directorycreate-project-and-link for new projectsConfigure root directory (for monorepos):
web/, app/, frontend/), configure in Railway Dashboard:Check current status:
list-deployments with json=true to see recent deployment statuses
If deployment failed, check logs:
get-logs with logType="build" and the failed deploymentId
Common build failures:
Deploy changes:
deploy tool for manual deploymentView current variables:
list-variables with json=true
Set new variables:
set-variables with variables array like ["KEY=value", "KEY2=value2"]
Common patterns:
NEXT_PUBLIC_* - Next.js client-safe public variablesDATABASE_URL - Database connection string*_API_KEY - API keys (server-side only)Generate Railway domain:
generate-domain to get a *.up.railway.app domain
Custom domains:
railway.toml (place in app root):
[build]
builder = "nixpacks"
[deploy]
startCommand = "npm run start"
healthcheckPath = "/"
healthcheckTimeout = 300
restartPolicyType = "ON_FAILURE"
restartPolicyMaxRetries = 10
railway.toml:
[build]
builder = "nixpacks"
buildCommand = "npx prisma generate && npx prisma migrate deploy && npm run build"
[deploy]
startCommand = "node dist/main.js"
healthcheckPath = "/health"
healthcheckTimeout = 300
restartPolicyType = "ON_FAILURE"
restartPolicyMaxRetries = 10
railway.toml:
[build]
builder = "nixpacks"
[deploy]
startCommand = "node server.js"
healthcheckPath = "/health"
railway.toml:
[build]
builder = "nixpacks"
[deploy]
startCommand = "uvicorn main:app --host 0.0.0.0 --port $PORT"
healthcheckPath = "/health"
railway.toml:
[build]
builder = "nixpacks"
buildCommand = "python manage.py collectstatic --noinput"
[deploy]
startCommand = "gunicorn myproject.wsgi --bind 0.0.0.0:$PORT"
healthcheckPath = "/health"
Cause: Root directory not set for monorepo structures.
Fix: Set Root Directory in Railway Dashboard → Service → Settings → Source.
Cause: Code pushed with syntax errors.
Fix:
get-logs with logType="build"Cause: Required environment variables not set.
Fix:
list-variablesset-variablesCause: DNS not configured or not propagated.
Fix:
Railway automatically provides a PORT environment variable. Ensure your application listens on 0.0.0.0:$PORT.
Node.js:
const port = process.env.PORT || 3000;
app.listen(port, '0.0.0.0', () => console.log(`Listening on ${port}`));
Python:
import os
port = int(os.environ.get("PORT", 8000))
@ → Railway domainGoDaddy and some providers don't support CNAME flattening for root domains. Options:
www.domain.com or app.domain.com with CNAME recordFor subdomains on any provider:
app.yourdomain.com)abc123.up.railway.app)For projects with frontend + backend + database:
Railway Project
├── Frontend Service (Next.js) → goteammate/nextjs-template
├── Backend Service (NestJS) → goteammate/nestjs-template
└── PostgreSQL Database → Railway Postgres template
create-project-and-link — Create the Railway projectdeploy-template with "PostgreSQL" — Add databaseset-variables — Wire DATABASE_URL, NEXT_PUBLIC_API_URL, FRONTEND_URLgenerate-domain — Create domains for each service| Variable | Service | Source |
|----------|---------|--------|
| DATABASE_URL | Backend | Railway Postgres reference |
| PORT | Both | Railway auto-provides |
| FRONTEND_URL | Backend | Frontend Railway domain |
| NEXT_PUBLIC_API_URL | Frontend | Backend Railway domain |
| NEXT_PUBLIC_APP_URL | Frontend | Frontend Railway domain |
Use the new-project skill in teammate-ops to automate the entire multi-service setup from a single conversation.
After importing this skill, add project-specific details to your local skill copy:
## Project Configuration
- **Project Name:** [Your Project]
- **Project ID:** [from Railway Dashboard]
- **Environment ID:** [from Railway Dashboard]
- **Service ID:** [from Railway Dashboard]
- **Root Directory:** [e.g., web/, app/, or /]
- **Custom Domain:** [if configured]
- **Dashboard URL:** https://railway.com/project/[project-id]
### Required Environment Variables
| Variable | Description |
|----------|-------------|
| ... | ... |
tools
# Versioning Skill Semantic versioning automation based on conventional commits. Automatically manages version bumps, changelogs, and git tags using `standard-version`. ## When to Use - Before releasing a new version - When preparing a deployment - To generate/update CHANGELOG.md - When the user asks about version management - Setting up versioning for a new project ## Prerequisites - Conventional commits enforced (recommended: lefthook) - Node.js project with package.json ## Setup (One-Ti
tools
Theme generation with tweakcn for shadcn/ui and Magic UI animations. Use when setting up project themes, customizing color schemes, adding dark mode, or integrating animated components.
tools
shadcn/studio component library with MCP integration, theme generation, and block patterns. This skill should be used when building UI with shadcn components, selecting dashboard layouts, or generating landing pages. Canonical source for all shadcn-based work.
development
Enforce a precise, minimal design system inspired by Linear, Notion, and Stripe. Use this skill when building dashboards, admin interfaces, or any UI that needs Jony Ive-level precision - clean, modern, minimalist with taste. Every pixel matters.