
New
Spin up a Railway project, link a repo, and add app or API services from chat when you are ready to host what you built.
Overview
Railway new is an agent skill for the Ship phase that initializes Railway projects, links repos, and creates deployable services from natural-language deploy requests.
Install
npx skills add https://github.com/railwayapp/railway-skills --skill newWhat is this skill?
- Handles both cold start (new project) and adding services to an already-linked Railway project
- Covers GitHub repo deploy, link/connect flows, and greenfield stacks (Vite, React, Python API)
- Verifies Railway CLI install (`command -v railway`) and auth (`railway whoami --json`) before proceeding
- Documents npm global and Homebrew install paths when CLI is missing
- Explicitly defers databases to the separate database skill while still recognizing “add postgres/redis” prompts
- Allowed tools: Bash for railway, which, command, npm, and npx
- Two documented CLI install paths: npm global @railway/cli and brew install railway
Adoption & trust: 801 installs on skills.sh; 274 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You have code ready to share but no Railway project, link, or service configuration—and copying CLI steps from docs slows your ship date.
Who is it for?
Solo builders shipping Node, Vite/React, or Python APIs who already chose Railway and want the agent to run the official CLI setup path.
Skip if: Teams that need only database provisioning (use the Railway database skill), multi-cloud IaC, or deploy without granting shell access to Railway CLI commands.
When should I use this skill?
User says setup, deploy to railway, initialize, create project, create service, deploy from GitHub, link/connect, create vite/react/python api, or add/connect database wiring (defer DB to database skill).
What do I get? / Deliverables
You get a Railway project and services configured for deploy from GitHub or local stacks, with CLI prerequisites checked so the next step is push or `railway up` rather than setup archaeology.
- Railway project created or linked to the workspace
- One or more Railway services configured for the target repo or stack
Recommended Skills
Journey fit
Deploy-to-production setup is the moment you move from local build to a live URL—canonical shelf is Ship before ongoing Operate tuning. Launch subphase covers launch prep and first deploy; Railway init/link/service creation is the hosting handoff solo builders trigger with “deploy to railway.”
How it compares
Use this Railway skills-pack workflow instead of pasting ad-hoc `railway` commands from generic DevOps chat.
Common Questions / FAQ
Who is Railway new for?
Indie and solo developers using Claude Code or similar agents who deploy on Railway and want init, link, and add-service flows driven from conversation.
When should I use Railway new?
Use it during Ship when you say deploy to Railway, create or link a project, add a backend/API service, deploy from a GitHub repo, or stand up a Vite/React/Python API service—after code exists in validate/build.
Is Railway new safe to install?
It requests Bash access to Railway CLI, npm/npx, and system paths; review the Security Audits panel on this Prism page and approve only commands you expect before running against production accounts.
SKILL.md
READMESKILL.md - New
# New Project / Service / Database Create Railway projects, services, and databases with proper configuration. ## When to Use - User says "deploy to railway" (add service if linked, init if not) - User says "create a railway project", "init", "new project" (explicit new project) - User says "link to railway", "connect to railway" - User says "create a service", "add a backend", "new api service" - User says "create a vite app", "create a react website", "make a python api" - User says "deploy from github.com/user/repo", "create service from this repo" - User says "add postgres", "add a database", "add redis", "add mysql", "add mongo" - User says "connect to postgres", "wire up the database", "connect my api to redis" - User says "add postgres and connect to the server" - Setting up code + Railway service together ## Prerequisites Check CLI installed: ```bash command -v railway ``` If not installed: > Install Railway CLI: > > ``` > npm install -g @railway/cli > ``` > > or > > ``` > brew install railway > ``` Check authenticated: ```bash railway whoami --json ``` If not authenticated: > Run `railway login` to authenticate. ## Decision Flow ``` railway status --json (in current dir) │ ┌────┴────┐ Linked Not Linked │ │ │ Check parent: cd .. && railway status --json │ │ │ ┌────┴────┐ │ Parent Not linked │ Linked anywhere │ │ │ │ Add service railway list │ Set rootDir │ │ Deploy ┌───┴───┐ │ │ Match? No match │ │ │ │ │ │ Link Init new └───────┴────────┴────────┘ │ User wants service? │ ┌─────┴─────┐ Yes No │ │ Scaffold code Done │ railway add --service │ Configure if needed │ Ready to deploy ``` ## Check Current State ```bash railway status --json ``` - **If linked**: Add a service to the existing project (see below) - **If not linked**: Check if a PARENT directory is linked (see below) ### When Already Linked **Default behavior**: "deploy to railway" = add a service to the linked project. Do NOT create a new project unless user EXPLICITLY says: - "new project", "create a project", "init a project" - "separate project", "different project" App names like "flappy-bird" or "my-api" are SERVICE names, not project names. ``` User: "create a vite app called foo and deploy to railway" Project: Already linked to "my-project" WRONG: railway init -n foo RIGHT: railway add --service foo ``` ### Parent Directory Linking Railway CLI walks up the directory tree to find a linked project. If you're in a subdirectory: ```bash cd .. && railway status --json ``` **If parent is linked**, you don't need to init/link the subdirectory. Instead: 1. Create service: `railway add --service <name>` 2. Set `rootDirectory` to subdirectory path via environment skill 3. Deploy from root: `railway up` **If no parent is linked**, proceed with init or link flow. ## Init vs Link Decision **Skip this section if already linked** - just add a service instead. Only use this section when NO project is linked (directly or via parent). ### Check User's Projects The output can be large. Run in a subagent and extract only: - Project `id` and `name` - Workspace `id` and `name` ```bash railway list --json ``` ### Decision Logic 1. **User explicitly says "new project"** → Use `railway init` 2. **User names an existing project** → Use `railway link` 3. **Directory name matches existing project** → Ask: link existing or crea