railway-new
What it does
This skill creates Railway projects, services and databases, and links your local code to them. It is for developers starting a new app on Railway or adding a service to an existing project.
When to use it
- βWhen you want to deploy this project to Railway for the first time.
- βWhen you want to add a new backend service or API to an existing Railway project.
- βWhen you want to create a service from a GitHub repository.
Skill link
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/railway/new/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βSet up my project on Railway as a new service, and deploy it from my GitHub repo.β
5 new skills a week. 1 minute to read.
How it works
The agent checks whether the folder is already linked, creates the project or service as needed, sets up the code source, and hands off deployment or database steps to the right skills.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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:
command -v railway
If not installed:
Install Railway CLI:
npm install -g @railway/clior
brew install railway
Check authenticated:
railway whoami --json
If not authenticated:
Run
railway loginto 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
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:
cd .. && railway status --json
If parent is linked, you don't need to init/link the subdirectory. Instead:
- Create service:
railway add --service <name> - Set
rootDirectoryto subdirectory path via environment skill - 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
idandname - Workspace
idandname
railway list --json
Decision Logic
- User explicitly says "new project" β Use
railway init - User names an existing project β Use
railway link - Directory name matches existing project β Ask: link existing or create new?
- No matching projects β Use
railway init - Ambiguous β Ask user
Create New Project
railway init -n <name>
Options:
-n, --name- Project name (auto-generated if omitted in non-interactive mode)-w, --workspace- Workspace name or ID (required if multiple workspaces exist)
Multiple Workspaces
If the user has multiple workspaces, railway init requires the --workspace flag.
Get workspace IDs from:
railway whoami --json
The workspaces array contains { id, name } for each workspace.
Inferring workspace from user input: If user says "deploy into xxx workspace" or "create project in my-team", match the name against the workspaces array and use the corresponding ID:
# User says: "create a project in my personal workspace"
railway whoami --json | jq '.workspaces[] | select(.name | test("personal";
FAQ
What if my folder is already linked?
The skill adds a service to the linked project rather than creating a new one.
Can it add a database too?
The skill points database work to the railway-database skill.
Do I need the Railway CLI?
Yes. The skill checks for the Railway command-line tool and asks you to log in if needed.
Details
Original description by the author
Create Railway projects, services, and databases with proper configuration. Use when user says "setup", "deploy to railway", "initialize", "create project", "create service", or wants to deploy from GitHub. Handles initial setup AND adding services to existing projects. For databases, use railway-railway-database skill instead.
Popularity
- GitHub stars
- 33k
- Ranking position
- #8909
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
owasp-security
33kTeaches your agent OWASP security guidance for web apps, APIs, mobile, containers and AI agents, so it can spot common weaknesses and suggest fixes.
agent-management
33kLets your agent create, list, hibernate, wake, rename and delete AI agents using the AI Maestro command line, managing each agent's lifecycle.
agent-messaging
33kLets your agent send, receive and reply to signed messages between AI agents, using the Agent Messaging Protocol, mostly on your own machine.
docs-search
33kLets your agent search auto-generated code documentation for function signatures, class definitions and comments, so it checks the real API before changing code.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.