Skip to content

ericrisco/rsc-harness / skills/railway

railway

Flagged

Use when deploying an app to Railway — pushing a repo or running railway up, provisioning a managed database, wiring env and reference variables across services, attaching a volume, or fixing a deploy that builds but will not serve. NOT Render (that is `render`), NOT Fly machines (that is `fly-io`), NOT a self-hosted PaaS on your own box (that is `coolify`).

FileKindSize
SKILL.mdskill md11.7 KB
evals/README.mdmarkdown1014 B
evals/cases.yamlconfig3.5 KB
references/cli-cookbook.mdmarkdown4.5 KB
references/config-as-code.mdmarkdown4.3 KB
scripts/verify.shexecutablescript6.2 KB

references/config-as-code.md

View on GitHub
# railway.json / railway.toml — full field reference

Config as code lives in `railway.json` **or** `railway.toml` at the service root. The fields a
file sets **override the dashboard**; per-environment overrides nest under `environments.<name>`
and take precedence over the base config. Schema: `https://railway.com/railway.schema.json`.

Precedence, highest to lowest: `environments.<active>.*` → base file config → dashboard.

## Build section

| Field | Type | Notes |
| --- | --- | --- |
| `builder` | `RAILPACK` \| `DOCKERFILE` | Default `RAILPACK` (successor to Nixpacks). A Dockerfile is auto-detected; `DOCKERFILE` forces it. |
| `buildCommand` | string | Overrides the inferred build step. |
| `watchPatterns` | string[] | Glob paths that, when changed, trigger a rebuild on auto-deploy (e.g. `["src/**"]`). |
| `dockerfilePath` | string | Path to the Dockerfile when not at root (with `builder: DOCKERFILE`). |
| `railpackVersion` | string | Pin the Railpack version for reproducible builds. |

## Deploy section

| Field | Type | Notes |
| --- | --- | --- |
| `startCommand` | string | Command to run the service. Set this if Railpack can't infer it. |
| `preDeployCommand` | string | Runs once before the new version goes live (e.g. DB migration). |
| `healthcheckPath` | string | Path Railway polls before marking the deploy healthy (e.g. `/healthz`). Must return 2xx. |
| `healthcheckTimeout` | number (s) | How long to wait for the healthcheck to pass before failing the deploy. |
| `restartPolicyType` | `ON_FAILURE` \| `ALWAYS` \| `NEVER` | What to do when the container exits. |
| `restartPolicyMaxRetries` | number | Cap on restart attempts under `ON_FAILURE`. |
| `numReplicas` | number | Horizontal replica count. Incompatible with an attached volume (volume pins to 1). |
| `multiRegionConfig` | object | Per-region replica config for multi-region deploys. |
| `cronSchedule` | string (cron) | Run the service as a cron job on this schedule instead of long-running. |
| `overlapSeconds` | number | Seconds the old + new versions overlap during a deploy (zero-downtime tuning). |
| `drainingSeconds` | number | Grace period to drain in-flight requests before the old version is killed. |

## JSON variant

```jsonc
{
  "$schema": "https://railway.com/railway.schema.json",
  "build": {
    "builder": "RAILPACK",
    "buildCommand": "npm run build",
    "watchPatterns": ["src/**", "package.json"]
  },
  "deploy": {
    "startCommand": "node dist/server.js",
    "preDeployCommand": "npm run migrate:deploy",
    "healthcheckPath": "/healthz",
    "healthcheckTimeout": 300,
    "restartPolicyType": "ON_FAILURE",
    "restartPolicyMaxRetries": 10,
    "overlapSeconds": 20,
    "drainingSeconds": 15
  },
  "environments": {
    "production": {
      "deploy": { "numReplicas": 2 }
    },
    "staging": {
      "build": { "buildCommand": "npm run build:staging" },
      "deploy": { "numReplicas": 1 }
    }
  }
}
```

## TOML variant (same fields)

```toml
"$schema" = "https://railway.com/railway.schema.json"

[build]
builder = "RAILPACK"
buildCommand = "npm run build"
watchPatterns = ["src/**", "package.json"]

[deploy]
startCommand = "node dist/server.js"
preDeployCommand = "npm run migrate:deploy"
healthcheckPath = "/healthz"
healthcheckTimeout = 300
restartPolicyType = "ON_FAILURE"
restartPolicyMaxRetries = 10
overlapSeconds = 20
drainingSeconds = 15

[environments.production.deploy]
numReplicas = 2

[environments.staging.build]
buildCommand = "npm run build:staging"

[environments.staging.deploy]
numReplicas = 1
```

## Dockerfile builds

```jsonc
{
  "$schema": "https://railway.com/railway.schema.json",
  "build": {
    "builder": "DOCKERFILE",
    "dockerfilePath": "docker/Dockerfile.prod"
  },
  "deploy": { "startCommand": "" }
}
```

With `DOCKERFILE`, the image's `CMD`/`ENTRYPOINT` drives startup; leave `startCommand` empty
unless you intend to override it. For Dockerfile authoring itself, see the `docker` and
`deployment` skills — this reference only covers wiring it into Railway.

## Notes

- Never inline secrets here. Anything sensitive belongs in variables, referenced as
  `${{Service.VAR}}`. The config file is committed to the repo.
- `cronSchedule` turns a service into a scheduled job; it should exit when done rather than
  staying resident.
- A volume forces a single replica — do not set `numReplicas > 1` on a service with a volume.
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse 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, .xltx, .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.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall