skills/railway-deployment/SKILL.md
Use this skill when deploying to Railway, including environment checks, service configuration, health verification, rollout observation, logs, and rollback readiness.
npx skillsauth add chatandbuild/skills-repo Railway DeploymentInstall 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.
Guide Railway deployments from preflight validation to post-deploy verification.
Confirm deployment target and intended version/change scope. Identify the project and service(s). Choose deployment region (e.g., US West, EU) if relevant. Note whether this is a new deploy or an update.
Validate runtime and configuration. Use railway.json or Procfile to define build and start commands explicitly; do not rely on Nixpacks guessing. Example railway.json: {"build": {"builder": "NIXPACKS"}, "deploy": {"startCommand": "npm run start", "restartPolicyType": "ON_FAILURE", "restartPolicyMaxRetries": 3}}. For databases, ensure TCP proxy is enabled if connecting from external clients; Railway exposes DATABASE_URL with internal hostnames.
Configure volume mounts and environment groups. If the app needs persistent storage, add a volume and mount path in the Railway dashboard. Use environment variable groups to separate staging from production. Reference variables with $VAR syntax in railway.json or dashboard.
Identify risky changes. Review schema migrations, breaking env changes, and external API dependencies. Plan migration order (e.g., run migrations before deploy or use backward-compatible migrations).
Define verification plan. Ensure a health check endpoint exists and returns 200. Railway does not require a health check path for basic deploys, but configuring one improves reliability. Plan checks for critical user flows and error rate.
Execute deploy and monitor. Use railway up or connect a GitHub repo for automatic deploys. Watch build and deploy logs in the dashboard or via railway logs. On Starter plan, services may sleep after inactivity; document this behavior.
Trigger rollback if checks fail. Use Railway's deployment history: Dashboard -> Service -> Deployments -> select previous deploy -> Redeploy. Capture incident notes for post-mortem.
startCommand in railway.json, Procfile, or dashboard./health or similar for monitoring and load balancer checks.railway login
railway link # Link to existing project
railway up # Deploy from current directory
railway logs # Stream logs
railway run <cmd> # Run command with env vars injected
railway variables # List env vars
Example railway.json:
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"buildCommand": "npm run build"
},
"deploy": {
"startCommand": "npm run start",
"healthcheckPath": "/health",
"healthcheckTimeout": 30,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 3
}
}
Example Procfile: web: npm run start
Railway stores deployment history per service. Rollback: Dashboard -> select service -> Deployments -> choose previous successful deploy -> Redeploy. Use railway logs for real-time debugging. Integrate with external monitoring (e.g., Sentry, Datadog) for error tracking and performance.
## Deployment Plan
- Target service: <name>
- Change scope: <summary>
- Region: <if applicable>
- Start command: <explicit command>
## Preflight Checklist
- [ ] Required env vars validated
- [ ] Runtime/build settings confirmed (railway.json or Procfile)
- [ ] Migration risk reviewed
- [ ] Health check endpoint configured
- [ ] Volume mounts configured if needed
## Commands
1. railway up
2. railway logs
## Verification
- [ ] Health endpoint passes
- [ ] Key user flow validated
- [ ] Error rate and logs normal
- [ ] Sleep behavior documented (Starter plan)
## Rollback
- Trigger: <condition>
- Action: Dashboard -> Deployments -> select prior deploy -> Redeploy
- Notes: <incident capture>
tools
Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).
development
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.
development
Use this skill when turning messy workout information into clear logs, comparing user-provided sessions, surfacing trends or likely PRs, and suggesting realistic next-session steps.
tools
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.