Agent skill

Railway New

by davila7 in davila7/claude-code-templates

Create Railway projects, services, and databases with proper configuration.

MITAuto-check passedDevelopment

Install Railway New

skills CLI
$ npx skills add davila7/claude-code-templates --skill railway-new -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davila7/claude-code-templates railway-new --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davila7/claude-code-templates.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cli-tool/components/skills/railway/new .claude/skills/railway-new && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
railway-new
GitHub stars
33k
Token cost
~3.2k tokens
SKILL.md length
968 words
Files
5 (incl. references)
Skills in repo
479
Repo updated
First seen
Licence
MIT

At a glance

Create Railway projects, services, and databases with proper configuration.

  • Works in 3 steps: Create service: railway add --service → Set rootDirectory to subdirectory path… → Deploy from root: railway up
  • User says setup
  • SKILL.md covers When to Use, Prerequisites, Decision Flow and Check Current State, plus 9 more sections
  • Calls railway, npm and jq

What it does

Railway New is an agent skill from davila7/claude-code-templates. 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.

Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `references/environment-config.md`, `references/monorepo.md` and `references/railpack.md`).

It sits in Development. It works with GitHub and PostgreSQL. The repository describes itself as: CLI tool for configuring and monitoring Claude Code. The licence is MIT.

When your agent uses it

  • User says setup
  • Deploy to railway
  • Wants to deploy from GitHub

Example prompts

  • “deploy to railway”
  • “initialize”
  • “create project”
  • “/railway-new”

Requirements

  • Python 3
  • Node.js
  • Pre-approved tools (allowed-tools): Bash(railway:*), Bash(which:*), Bash(command:*), Bash(npm:*), Bash(npx:*)

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Create service: railway add --service
  2. Set rootDirectory to subdirectory path via environment skill
  3. Deploy from root: railway up

What it can do on your machine

Read from SKILL.md and the folder at commit c0ca7da. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(railway:*)
    • Bash(which:*)
    • Bash(command:*)
    • Bash(npm:*)
    • Bash(npx:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • railway
    • npm
    • jq
    • brew
    • bun
    • pnpm
    • yarn
    • turbo

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, pnpm and yarn, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Railway New loads about 3.2k tokens when it runs, and up to ~8.6k if it reads all its reference files. Until then it costs about 85 tokens; SKILL.md has 968 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~85
When it runs · the whole SKILL.md, loaded when a task matches
~3.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from davila7/claude-code-templates at commit c0ca7da, republished under its MIT licence (© davila7). 968 words, ~3,244 tokens.

Download SKILL.mdSave it as .claude/skills/railway-new/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
railway-new
description
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.
allowed-tools
Bash(railway:*), Bash(which:*), Bash(command:*), Bash(npm:*), Bash(npx:*)
version
1.0.0
author
Railway
license
MIT
tags
Railway, Project, Service, Setup, Initialize, Deploy, Infrastructure, Scaffolding
dependencies
railway-cli

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.

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 create new?
  4. No matching projects → Use railway init
  5. Ambiguous → Ask user

Create New Project

bash
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:

bash
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:

bash
# User says: "create a project in my personal workspace"
railway whoami --json | jq '.workspaces[] | select(.name | test("personal"; "i"))'
# Use the matched ID: railway init -n myapp --workspace <matched-id>
bash
railway link -p <project>

Options:

  • -p, --project - Project name or ID
  • -e, --environment - Environment (default: production)
  • -s, --service - Service to link
  • -t, --team - Team/workspace

Create Service

After project is linked, create a service:

bash
railway add --service <name>

For GitHub repo sources: Create an empty service, then invoke the railway-environment skill to configure the source via staged changes API. Do NOT use railway add --repo - it requires GitHub app integration which often fails.

Flow:

  1. railway add --service my-api
  2. Invoke railway-environment skill to set source.repo and source.branch
  3. Apply changes to trigger deployment
Show full SKILL.md (410 more words)Show less
Configure Based on Project Type

Reference railpack.md for build configuration. Reference monorepo.md for monorepo patterns.

Static site (Vite, CRA, Astro static):

  • Railpack auto-detects common output dirs (dist, build)
  • If non-standard output dir: invoke railway-environment skill to set RAILPACK_STATIC_FILE_ROOT
  • Do NOT use railway variables CLI - always use the environment skill

Node.js SSR (Next.js, Nuxt, Express):

  • Verify start script exists in package.json
  • If custom start needed: invoke railway-environment skill to set startCommand

Python (FastAPI, Django, Flask):

  • Verify requirements.txt or pyproject.toml exists
  • Auto-detected by Railpack, usually no config needed

Go:

  • Verify go.mod exists
  • Auto-detected, no config needed
Monorepo Configuration

Critical decision: Root directory vs custom commands.

Isolated monorepo (apps don't share code):

  • Set Root Directory to the app's subdirectory (e.g., /frontend)
  • Only that directory's code is available during build

Shared monorepo (TypeScript workspaces, shared packages):

  • Do NOT set root directory
  • Set custom build/start commands to filter the package:
    • pnpm: pnpm --filter <package> build
    • npm: npm run build --workspace=packages/<package>
    • yarn: yarn workspace <package> build
    • Turborepo: turbo run build --filter=<package>
  • Set watch paths to prevent unnecessary rebuilds

See monorepo.md for detailed patterns.

Project Setup Guidance

Analyze the codebase to ensure Railway compatibility.

Analyze Codebase

Check for existing project files:

  • package.json → Node.js project
  • requirements.txt, pyproject.toml → Python project
  • go.mod → Go project
  • Cargo.toml → Rust project
  • index.html → Static site
  • None → Guide scaffolding

Monorepo detection:

  • pnpm-workspace.yaml → pnpm workspace (shared monorepo)
  • package.json with workspaces field → npm/yarn workspace (shared monorepo)
  • turbo.json → Turborepo (shared monorepo)
  • Multiple subdirs with separate package.json but no workspace config → isolated monorepo
Scaffolding Hints

If no code exists, suggest minimal patterns from railpack.md:

Static site:

Create an index.html file in the root directory.

Vite React:

bash
npm create vite@latest . -- --template react

Astro:

bash
npm create astro@latest

Python FastAPI:

Create main.py with FastAPI app and requirements.txt with dependencies.

Go:

Create main.go with HTTP server listening on PORT env var.

Databases

For adding databases (Postgres, Redis, MySQL, MongoDB), use the railway-railway-database skill.

The railway-railway-database skill handles:

  • Creating database services
  • Connection variable references
  • Wiring services to databases

Composability

  • After service created: Use railway-deploy skill to push code
  • For advanced config: Use railway-environment skill (buildCommand, startCommand)
  • For domains: Use railway-domain skill
  • For status checks: Use railway-status skill
  • For service operations (rename, delete, status): Use railway-service skill

Error Handling

CLI Not Installed
Railway CLI not installed. Install with:
  npm install -g @railway/cli
or
  brew install railway
Not Authenticated
Not logged in to Railway. Run: railway login
No Workspaces
No workspaces found. Create one at railway.com or verify authentication.
Project Name Taken
Project name already exists. Either:
- Link to existing: railway link -p <name>
- Use different name: railway init -n <other-name>
Service Name Taken
Service name already exists in this project. Use a different name:
  railway add --service <other-name>

Examples

Create HTML Static Site
User: "create a simple html site and deploy to railway"

1. Check status → not linked
2. railway init -n my-site
3. Guide: create index.html
4. railway add --service my-site
5. No config needed (index.html in root auto-detected)
6. Use deploy skill: railway up
7. Use domain skill for public URL
Create Vite React Service
User: "create a vite react service"

1. Check status → linked (or init/link first)
2. Scaffold: npm create vite@latest frontend -- --template react
3. railway add --service frontend
4. No config needed (Vite dist output auto-detected)
5. Use deploy skill: railway up
Add Python API to Project
User: "add a python api to my project"

1. Check status → linked
2. Guide: create main.py with FastAPI, requirements.txt
3. railway add --service api
4. No config needed (FastAPI auto-detected)
5. Use deploy skill
User: "connect to my backend project and add a worker service"

1. railway list --json → find "backend"
2. railway link -p backend
3. railway add --service worker
4. Guide setup based on worker type
Deploy to Railway (Ambiguous)
User: "deploy to railway"

1. railway status → not linked
2. railway list → has projects
3. Directory is "my-app", found project "my-app"
4. Ask: "Found existing project 'my-app'. Link to it or create new?"
5. User: "link"
6. railway link -p my-app
7. Ask: "Create a service for this code?"
Add Service to Isolated Monorepo
User: "create a static site in the frontend directory"

1. Check: /frontend has its own package.json, no workspace config
2. This is isolated monorepo → use root directory
3. railway add --service frontend
4. Invoke environment skill to set rootDirectory: /frontend
5. Set watch paths: /frontend/**
Add Service to TypeScript Monorepo
User: "add a new api package to this turborepo"

1. Check: turbo.json exists, pnpm-workspace.yaml exists
2. This is shared monorepo → use custom commands, NOT root directory
3. Guide: create packages/api with package.json
4. railway add --service api
5. Invoke environment skill to set buildCommand and startCommand (do NOT set rootDirectory)
6. Set watch paths: /packages/api/**, /packages/shared/**
Deploy Existing pnpm Workspace Package
User: "deploy the backend package to railway"

1. Check: pnpm-workspace.yaml exists → shared monorepo
2. railway add --service backend
3. Invoke environment skill to set buildCommand and startCommand
4. Set watch paths for backend + any shared deps
Deploy Subdirectory of Linked Project
User: "create a vite app in my-app directory and deploy to railway"
CWD: ~/projects/my-project/my-app (parent already linked to "my-project")

1. Check status in my-app → not linked
2. Check parent: cd .. && railway status → IS linked to "my-project"
3. DON'T init/link the subdirectory
4. Scaffold: bun create vite my-app --template react-ts
5. cd my-app && bun install
6. railway add --service my-app
7. Invoke environment skill to set rootDirectory: /my-app
8. Deploy from root: railway up

© davila7, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in cli-tool/components/skills/railway/new of davila7/claude-code-templates.

  • SKILL.md
  • references/environment-config.md
  • references/monorepo.md
  • references/railpack.md
  • references/variables.md

Open the folder on GitHubat commit c0ca7da

Compare with similar skills

Railway New next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Railway New compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Railway New this skilldavila7/claude-code-templates33k—~3.2kAutomated safety check: PassMIT
Backend Code Reviewnazarli-shabnam/clevis170—~1.5kAutomated safety check: PassGPL-3.0
ReleaseShape-Machine/tusk-macos127—~944Automated safety check: NotesCustom licence
Stash Supply Chain Securitycipherstash/stack157—~5.2kAutomated safety check: WarnMIT
Code Reviewlangchain-ai/langchain-azure147—~2.3kAutomated safety check: PassMIT
DB AI GitHub Paper Weekly Newsdigoal/blog8.6k—~1.2kAutomated safety check: PassGPL-2.0

Similar skills

  • Backend Code Review

    nazarli-shabnam/clevis

    Review backend code for quality, security, maintainability, and best practices based on established checklist rules.

    170 GitHub stars~1.5k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Release

    Shape-Machine/tusk-macos

    Full Tusk release — bump version, build DMG, publish GitHub release, update README

    127 GitHub stars~944 tokensUpdated 4 mo ago
    DevelopmentAuto-check: notes
  • Supply-chain security controls for the @cipherstash/stack monorepo.

    157 GitHub stars~5.2k tokensUpdated yesterday
    DevelopmentAuto-check: warnings
  • Code Review

    langchain-ai/langchain-azure

    Official

    Reviews changes in the langchain-azure monorepo using package-specific knowledge of langchain-azure-ai, langchain-azure-compute, langchain-azure-cosmosdb, langchain-azure-postgresql…

    147 GitHub stars~2.3k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • 抓取并汇总"数据库、AI、GitHub、AI 论文"近 1 周新闻,输出图文并茂(含 mermaid 图)的 markdown 周报到当前项目的 markdown/ 目录。覆盖 10 个数据源:postgresweekly.com/issues(自动解析最新 issue…

    8.6k GitHub stars~1.2k tokensUpdated 2 days ago
    DatabasesAuto-check passed
  • 抓取并分析"数据库、AI、GitHub、AI论文"相关的近1周内最新内容,分类汇总,输出图文并茂(含内置 Mermaid 图)的 Markdown 周报到当前项目的 markdown/ 目录。

    8.6k GitHub stars~2.4k tokensUpdated 2 days ago
    DatabasesAuto-check passed

More from davila7/claude-code-templates

All 479 skills in this repo
  • Perplexity Web Search

    davila7/claude-code-templates

    Runs web-grounded searches through Perplexity's Sonar models over OpenRouter for current events, recent literature and cited facts beyond the model's training cutoff.

    33k GitHub starsUsed in 11 repos~3.5k tokens
    Auto-check: notes
  • Neuropixels Data Analysis

    davila7/claude-code-templates

    Analyzes Neuropixels recordings from SpikeGLX or Open Ephys through preprocessing, drift correction, Kilosort4 spike sorting, quality metrics and curation.

    33k GitHub starsUsed in 9 repos~2.8k tokens
    Auto-check passed
  • Scientific Venue Templates

    davila7/claude-code-templates

    Supplies LaTeX templates and formatting rules for journals, conferences, posters, and grant proposals, then can check a draft against them.

    33k GitHub starsUsed in 9 repos~5.1k tokens
    Auto-check: notes
  • Brand Voice Content Creator

    davila7/claude-code-templates

    Analyzes a brand's existing writing to lock in a consistent voice, then builds SEO blog posts and platform-specific social content around it.

    33k GitHub starsUsed in 3 repos~1.9k tokens
    Auto-check passed
  • CAPA Officer

    davila7/claude-code-templates

    Guides corrective and preventive action (CAPA) work in a quality management system, from initiation and root cause analysis through effectiveness verification.

    33k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Fda Consultant Specialist

    davila7/claude-code-templates

    Senior FDA consultant and specialist for medical device companies including HIPAA compliance and requirement management.

    33k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed

Categories

Questions about Railway New

What does Railway New do?

Create Railway projects, services, and databases with proper configuration. Railway New is an agent skill from davila7/claude-code-templates. Create Railway projects, services, and databases with proper configuration.

When should I use Railway New?

Railway New fits situations like: user says setup; deploy to railway; wants to deploy from GitHub.

How do I install Railway New in Claude Code?

Run `npx skills add davila7/claude-code-templates --skill railway-new -a claude-code`. Or copy the skill folder (cli-tool/components/skills/railway/new in davila7/claude-code-templates) into .claude/skills/railway-new in your project. Claude Code loads it when a task matches its description.

How do I install Railway New in Codex?

Run `npx skills add davila7/claude-code-templates --skill railway-new -a codex`. Or copy the skill folder (cli-tool/components/skills/railway/new in davila7/claude-code-templates) into .agents/skills/railway-new in your project. Codex loads it when a task matches its description.

Can I use Railway New in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davila7/claude-code-templates --skill railway-new -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/railway-new, .gemini/skills/railway-new, .github/skills/railway-new and .opencode/skills/railway-new in your project.

What does Railway New need to run?

Going by SKILL.md and its folder, Railway New needs the command-line tools its instructions call (railway, npm, jq, brew, bun and pnpm). Our summary lists: Python 3; Node.js. Its frontmatter pre-approves these tools: Bash(railway:*), Bash(which:*), Bash(command:*), Bash(npm:*), Bash(npx:*).

Does Railway New access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Railway New safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Railway New use?

Railway New is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Railway New use?

About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5.4k tokens, read only when the agent opens those files.

What are the alternatives to Railway New?

Skills that share tags, products or a category with Railway New: Backend Code Review (nazarli-shabnam/clevis, 170 stars), Release (Shape-Machine/tusk-macos, 127 stars), Stash Supply Chain Security (cipherstash/stack, 157 stars) and Code Review (langchain-ai/langchain-azure, 147 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Railway New?

davila7 (a GitHub user) maintains it in davila7/claude-code-templates, which has 32,512 GitHub stars. The repository holds 479 skills in this directory. The repository was last updated on October 10, 2026.

Source: davila7/claude-code-templates on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.