use-railway

Operate Railway infrastructure including projects, services, databases, deployments, and feature flags.

5|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/nuggocto/dotfiles --skill use-railway-nuggocto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: use-railway
Source: https://github.com/nuggocto/dotfiles/tree/main/opencode/skills/use-railway
Command: npx skills add https://github.com/nuggocto/dotfiles --skill use-railway-nuggocto

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Managing Railway cloud infrastructure requires knowing dozens of CLI commands, GraphQL queries, and MCP tools, plus handling tricky flows like headless OAuth sign-in and deployment verification. This Skill routes every Railway task to the right tool path and encodes the operational knowledge needed to do it correctly. ## Core Features & Use Cases - Full infrastructure lifecycle: Sign up or sign in, create projects, provision services, databases, and S3-compatible buckets, deploy code, and manage domains, environments, and variables. - Database analysis and operations: Run deep introspection scripts for PostgreSQL, MySQL, Redis, and MongoDB with per-database tuning guidance, thresholds, and performance pattern diagnosis. - Intent-based routing: Automatically chooses between the Railway CLI, remote MCP server, or GraphQL API based on the task, and handles device-code sign-in flows for headless environments. - Use Case: A user pastes a Railway dashboard URL and says "my service is crashing" — the Skill extracts the project and service IDs, pulls logs and metrics, triages the failure, and guides the fix and redeploy. ## Quick Start Ask the assistant to deploy the current directory to Railway or to analyze a Railway database service by pasting its dashboard URL.

Frequently Asked Questions about use-railway

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy my app to Railway from the command line?

Run railway up from your project directory. It authenticates you if needed, creates a project and service when none is linked, and deploys the current directory in one chain. Use railway up -y to skip prompts non-interactively.

How do I analyze a Railway PostgreSQL or MySQL database?

Provide the Railway dashboard URL or service name, and the Skill runs the matching analysis script (analyze-postgres.py, analyze-mysql.py, analyze-redis.py, or analyze-mongo.py) over SSH. It collects connections, cache hit ratios, slow queries, vacuum health, and infrastructure metrics, then presents findings with tuning recommendations.

Does Railway sign-in work in headless or SSH environments?

Yes. The Railway CLI auto-detects SSH sessions, CI, and missing displays, then switches to a device-code flow that prints a sign-in link and code. The Skill relays that link immediately by running the command in the background, since the code expires after 10 minutes.

When should I use the Railway CLI versus the MCP server?

Use the CLI for workflows needing local state such as railway up, railway run, SSH, and database scripts. Use the remote MCP server for OAuth-scoped platform operations like project discovery, deployment state, and feature flags that do not depend on local files.

Why does railway up --json fail with NOT_AUTHENTICATED?

JSON and CI modes never open a browser, so an unauthenticated user gets a structured NOT_AUTHENTICATED error instead of a login prompt. Run railway login first to authenticate, then retry the original command.

Can I manage Railway infrastructure as code?

Yes. The Skill supports Railway's IaC workflow using .railway/railway.ts, railway.py, or railway.go config files, including migrating legacy JSON/TOML config, reviewing plans, applying changes, and checking drift.