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/cli-cookbook.md

View on GitHub
# Railway CLI cookbook

Full command catalog and recipes. Commands run against the linked project/environment unless you
pass `--service` / `--environment`.

## Install matrix

```bash
brew install railway                          # macOS (Homebrew)
npm i -g @railway/cli                          # any host with Node 16+
bash <(curl -fsSL railway.com/install.sh)      # shell installer (Linux/macOS)
railway --version                              # verify
```

## Auth

```bash
railway login                # interactive browser login (dev machines)
railway login --browserless  # paste a code; for headless/remote shells
railway logout
```

For CI / non-interactive: **do not** `railway login`. Set a project token instead — the CLI
reads `RAILWAY_TOKEN` and acts as that project, no login step.

```bash
RAILWAY_TOKEN=$RAILWAY_PROJECT_TOKEN railway up --detach --service api
```

## Project setup

```bash
railway init               # create a new project from the current directory
railway link               # link this dir to an existing project (and pick service/env)
railway status             # show the linked project / environment / service
railway open               # open the project in the dashboard
```

## Deploy

```bash
railway up                                   # build + deploy current dir, stream logs
railway up --detach                          # don't attach to build/deploy logs
railway up --service api                     # target a service in a multi-service project
railway up --environment staging             # deploy into a specific environment
railway redeploy                             # re-run the latest deployment unchanged
```

There is no `railway deploy`. Deploys happen via `railway up` or a push to the GitHub-connected
branch.

## Variables

```bash
railway variables                            # list variables for the active service/env
railway variables --set "LOG_LEVEL=info"     # set one (repeat --set for several)
railway variables --set "API_URL=${{RAILWAY_PUBLIC_DOMAIN}}"   # set a reference var
# older documented form:
railway variable set KEY=value
```

Reference syntax (set as a variable's value): `${{ServiceName.VAR}}`, `${{shared.VAR}}`,
`${{RAILWAY_PUBLIC_DOMAIN}}`, `${{RAILWAY_PRIVATE_DOMAIN}}`.

## Run with Railway env injected

```bash
railway run <cmd>                            # run a local command with prod/linked env vars
railway run npm run dev                      # local dev against the linked environment's vars
railway run -- printenv DATABASE_URL         # inspect a resolved value locally
```

`railway run` injects the linked environment's variables into a local process — handy to run
migrations or scripts locally against the real config without copying secrets.

## Services & environments

```bash
railway service                              # switch the active service
railway environment                          # switch the active environment
railway environment staging                  # switch to a named environment
```

## Add services & databases

```bash
railway add                                  # interactive: add a service or a database template
# pick Postgres / MySQL / Redis / MongoDB from the template list,
# or in the dashboard use + New / cmd-K
```

After adding a DB, reference its vars into the app service as `${{Postgres.DATABASE_URL}}` rather
than copying the literal URL.

## Database shells

```bash
railway connect              # open a shell to the linked DB service (psql/mysql/mongosh/redis-cli)
railway connect Postgres     # target a specific DB service by name
```

## Logs & domains

```bash
railway logs                 # stream logs for the active deployment
railway logs --service api   # logs for a specific service
railway domain               # generate a *.up.railway.app domain for the service
```

## CI/CD snippet (GitHub Actions)

```yaml
# .github/workflows/deploy.yml
name: deploy
on:
  push:
    branches: [main]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm i -g @railway/cli
      - run: railway up --detach --service api
        env:
          RAILWAY_TOKEN: ${{ secrets.RAILWAY_PROJECT_TOKEN }}
```

Use a **project token** (`RAILWAY_TOKEN`) for CI — never a personal login. Scope the token to the
project and rotate it from the dashboard if leaked.

## Notes

- Most commands act on the *linked* project/env/service; run `railway status` if a command targets
  the wrong place.
- `railway run` resolves reference variables (`${{...}}`) the same way the deployed container
  does, so it's a faithful local mirror of prod config.
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