agentleFS
reescalderreescalder/claude-skills/railway-deploy/SKILL.md

railway-deploy

Skill0 starsChanged 4 months agoMITView on GitHub

Deploy Node.js services to Railway with auto-deploy from GitHub. Set in Railway dashboard or CLI: Access in code: Railway auto-deploys on every push to the connected branch (usually main). To deploy manually: View in dashboard or:

  • Reads credentials

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 2

    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
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Update DNS with provided CNAME

    line 77
  2. Distinctive:

    Use environment variables: - never commit secrets

    line 104

“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 Deploy Skill

Deploy Node.js services to Railway with auto-deploy from GitHub.

When to Use

  • Always-on backend services
  • APIs and proxies
  • Cron jobs and workers
  • Anything that needs to run 24/7

Quick Deploy

1. Create railway.toml

[build]
builder = "nixpacks"

[deploy]
startCommand = "node index.js"
healthcheckPath = "/"
healthcheckTimeout = 100
restartPolicyType = "ON_FAILURE"
restartPolicyMaxRetries = 3

2. Set Up package.json

{
  "name": "my-service",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "start": "node index.js"
  },
  "dependencies": {
    "express": "^4.18.0"
  }
}

3. Add Health Check

app.get('/', (req, res) => {
  res.json({ status: 'ok', version: '1.0.0' });
});

4. Connect GitHub

  1. Go to railway.app
  2. New Project → Deploy from GitHub
  3. Select repo
  4. Railway auto-detects Node.js and deploys

Environment Variables

Set in Railway dashboard or CLI:

railway variables set API_KEY=xxx
railway variables set DATABASE_URL=xxx

Access in code:

const API_KEY = process.env.API_KEY;

Custom Domain

  1. Go to Settings → Domains
  2. Add custom domain
  3. Update DNS with provided CNAME

Auto-Deploy

Railway auto-deploys on every push to the connected branch (usually main).

To deploy manually:

railway up

Logs

View in dashboard or:

railway logs

Pricing

  • $5/month gives 500 hours + $5 usage
  • Hobby tier is usually enough for small services
  • Pay for what you use (CPU/RAM/bandwidth)

Best Practices

  1. Always add health check - Railway uses it for deployments
  2. Use environment variables - never commit secrets
  3. Add error handling - unhandled errors = crash = restart
  4. Log important events - helps with debugging
  5. Set restart policy - auto-recover from crashes

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.