railway-new

Create Railway projects, services, and databases with proper configuration via the Railway CLI.

30.5k|3.5k|Updated Jul 4, 2025
One-click install
npx skills add https://github.com/davila7/claude-code-templates --skill railway-new
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: railway-new
Source: https://github.com/davila7/claude-code-templates/tree/main/cli-tool/components/skills/railway/new
Command: npx skills add https://github.com/davila7/claude-code-templates --skill railway-new

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires railway-cli, and includes references (resource) components.

What problem does it solve?

Setting up Railway infrastructure involves many decisions—init vs link, root directory vs custom commands, monorepo handling—and getting them wrong leads to broken builds and misconfigured services. This Skill guides the entire project and service creation workflow with correct decision logic.

Core Features & Use Cases

  • Project Initialization & Linking: Decide between railway init and railway link based on existing projects, workspaces, and directory state.
  • Service Creation & Configuration: Add services for static sites, Node.js SSR, Python, Go, and GitHub repos with correct Railpack build settings.
  • Monorepo Support: Distinguish isolated vs shared monorepos and apply the right root directory or custom build/start command strategy.
  • Use Case: A user says "create a vite react service and deploy to railway"—the Skill checks link status, scaffolds the app, runs railway add --service, and hands off to the deploy skill.

Quick Start

Ask the assistant to create a new Railway project and add a service for your app, for example by saying "create a vite react app called frontend and deploy it to Railway".

Frequently Asked Questions about railway-new

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

FAQPage Schema
How do I create a new Railway project from the CLI?

Run `railway init -n <name>` after verifying the CLI is installed and you are authenticated with `railway whoami --json`. If you have multiple workspaces, pass the workspace ID with the `--workspace` flag.

How do I add a service to an existing Railway project?

Use `railway add --service <name>` while in a directory linked to the project. Check link status first with `railway status --json`, and link with `railway link -p <project>` if needed.

Should I use railway init or railway link for deployment?

Use `railway init` when creating a brand-new project and `railway link -p <project>` when connecting to an existing one. If the directory name matches an existing project, ask the user whether to link or create new.

Does Railway support monorepo deployments?

Yes, with two approaches. Isolated monorepos set a root directory per service, while shared monorepos (pnpm workspaces, Turborepo) leave root directory empty and use filtered build/start commands like `pnpm --filter backend build`.

Why does my Railway static site return 404s after deploy?

Railpack may not detect your build output directory. Common outputs like dist and build are auto-detected, but non-standard paths require setting `RAILPACK_STATIC_FILE_ROOT` through the environment configuration skill.

Can I deploy a Railway service directly from a GitHub repo?

Yes, but avoid `railway add --repo` since it requires GitHub app integration. Instead create an empty service with `railway add --service`, then set `source.repo` and `source.branch` via the staged changes environment API.