Agent skill
railway
Deploy and manage Railway projects. Authenticate, link projects, deploy code, manage variables, view logs, SSH into services, and provision databases. Use /railway to quickly deploy or manage Railway services.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/railway
SKILL.md
Railway CLI
Deploy and manage Railway cloud platform projects.
Installation
brew install railway
# or: npm i -g @railway/cli
# or: bash <(curl -fsSL cli.new)
Authentication
railway login # Browser-based login
railway login --browserless # For headless/SSH environments (prints pairing code)
railway logout # Disconnect from account
Environment Variables for CI/CD:
RAILWAY_TOKEN- Project token (deploy, redeploy, logs only)RAILWAY_API_TOKEN- Account token (full access including init, link)
Project Management
railway init # Create new project
railway link # Link current directory to existing project/environment
railway service # Link to specific service in project
railway environment # Switch linked environment (default: production)
Deployment
railway up # Deploy with build logs
railway up --detach # Deploy and return immediately (no logs)
railway redeploy # Redeploy current service
Local Development
railway run <cmd> # Run command locally with Railway env vars
railway run npm start # Example: start dev server with Railway vars
railway shell # Open shell with Railway environment loaded
Logs & Debugging
railway logs # View service logs
railway ssh # SSH into running service
railway ssh -- ls # Execute single command via SSH
SSH with specific target:
railway ssh --project=<ID> --environment=<ID> --service=<ID>
Database & Services
railway add # Provision database (Postgres, MySQL, Redis, MongoDB)
Common Workflows
Deploy a new project
railway login
railway init
railway up
Link existing project and deploy
railway login
railway link
railway up
Run local dev with production database
railway link
railway run npm run dev
View logs for debugging
railway logs
# or SSH in for interactive debugging
railway ssh
User Invocation
/railway- Show status and common commands/railway deploy- Deploy current directory/railway logs- View service logs/railway ssh- Connect to service
Agent Response Protocol
For /railway or /railway status:
- Check if logged in:
railway whoami - Check linked project:
railway status - Report current state and suggest next actions
For /railway deploy:
- Verify logged in and linked
- Run
railway upand report results - On failure, suggest fixes
For /railway logs:
- Run
railway logs(add--helpto see filtering options) - Summarize recent activity
For /railway ssh:
- Run
railway sshfor interactive session - Or
railway ssh -- <command>for one-off commands
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?