agentleFS
Rikinshah787Rikinshah787/agent-skills-production-skills/skills/railway/SKILL.md

railway

Skill2 starsChanged 4 months agoMITView on GitHub

Use to deploy services and databases from a GitHub repo, the CLI, a Docker image, or a template, with managed infrastructure.

  • Reads credentials
  • Installs packages

7 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use cloudflare.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SentrySkill

    cloudflare

    Cloudflare production operations via the Cloudflare API MCP server. Use when users ask to investigate Workers errors or performance, check build or deployment status, query logs, inspect DNS records, check load balancer pool health, review Zero Trust tunnels, or manage Cloudflare resources. Do not use for Sentry issues, GitHub/Linear ticketing, or non-Cloudflare infrastructure.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use when: you want an always-on service (API/worker) and a database with minimal setup.

    line 19
  2. Distinctive:

    Use when: you need a quick full-stack environment with managed Postgres/Redis.

    line 20
  3. Distinctive:

    Don't use for: pure static sites (use Vercel/Netlify) or edge functions (use Cloudflare).

    line 21
  4. Distinctive:

    Don't expose database services publicly unless required.

    line 71

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Railway — Skillship

A PaaS that provisions infrastructure for you: deploy an app plus its Postgres/Redis from a repo, CLI, Docker image, or a marketplace template — all managed on a visual project canvas.

🧭 When to use this skill

  • Use when: you want an always-on service (API/worker) and a database with minimal setup.
  • Use when: you need a quick full-stack environment with managed Postgres/Redis.
  • Don't use for: pure static sites (use Vercel/Netlify) or edge functions (use Cloudflare).

⚡ Quickstart

Option A — Deploy from GitHub

  1. Dashboard → New Project → Deploy from GitHub repo.
  2. Pick the repo → Deploy Now (or Add Variables first).
  3. In service settings, Generate Domain to get a public URL.

Option B — Deploy from the CLI

npm i -g @railway/cli
railway login
railway init          # create a new project from the current directory
railway up            # build + deploy your local code
railway open          # open the project canvas

Add a database

  • On the canvas: New → Database → Postgres/Redis/MySQL/Mongo. Railway injects connection variables (e.g. DATABASE_URL) that your service can reference.

🧩 Common recipes

Recipe: Reference service/database variables

# Railway exposes managed vars like DATABASE_URL, REDIS_URL to linked services automatically.
# Reference another service's var in the dashboard with ${{ Postgres.DATABASE_URL }}

Recipe: Deploy a prebuilt Docker image

  • New Project → Empty project → Add a Service → Docker Image → enter e.g. org/image:tag (use the full registry URL for GHCR/GitLab/Quay). Private registries require a paid plan.

Recipe: Run a local command against Railway env

railway run npm run migrate    # runs locally with Railway's env vars injected
railway logs                   # tail build/deploy logs

🚀 Ship to production

  • Secrets set as service Variables (Railway UI/CLI), not committed to the repo.
  • Public domain generated (or custom domain added) for services that need ingress.
  • App reads config from env vars (DATABASE_URL, PORT) — bind to process.env.PORT.
  • Separate environments (e.g. production vs PR/testing) for isolation.
  • Health/observability: check the built-in metrics/logs; scroll full build logs when diagnosing.
  • Understand usage-based billing before scaling instances up.

🔐 Security & secrets

  • Store credentials as service Variables; reference cross-service secrets via ${{ Service.VAR }} instead of copy-pasting.
  • Don't expose database services publicly unless required; prefer Railway's private networking.

🐛 Common errors & fixes

SymptomLikely causeFix
App deploys but URL 404/noneNo public domain generatedService settings → Generate Domain
App crashes binding to a portHardcoded portUse process.env.PORT
Can't reach the databaseMissing/!referenced varUse the injected DATABASE_URL / ${{ Postgres.DATABASE_URL }}
Build failed, unclear whyError mid-logScroll the entire build log; the real error is rarely last
Private image won't pullFree plan / missing credsUpgrade plan; add registry credentials

💰 Pricing gotchas

  • Billing is usage-based (CPU/RAM/egress). Idle-but-running services still accrue cost — scale down unused ones.

📚 Sources

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.