Langsung ke konten
Skillpedia
Deploy & cloud (DevOps)33k Β· #8909

railway-new

Fungsinya

Skill ini membuat proyek, layanan, dan database Railway, lalu menautkan kode lokal Anda ke sana. Skill ini ditujukan bagi pengembang yang memulai aplikasi baru di Railway atau menambahkan layanan ke proyek yang sudah ada.

Kapan dipakai

  • βœ“Saat Anda ingin men-deploy proyek ini ke Railway untuk pertama kalinya.
  • βœ“Ketika Anda ingin menambahkan layanan backend atau API baru ke proyek Railway yang sudah ada.
  • βœ“Ketika Anda ingin membuat layanan dari repo GitHub.

Link skill

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/railway/new/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/railway/new/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œSiapkan proyek saya di Railway sebagai layanan baru, dan deploy dari repo GitHub saya.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent memeriksa apakah folder sudah tertaut, membuat proyek atau layanan sesuai kebutuhan, menyiapkan sumber kode, dan menyerahkan langkah deployment atau database ke skill yang tepat.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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/cli

or

brew install railway

Check authenticated:

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

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:

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

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";
Pertanyaan umum

Bagaimana jika folder saya sudah tertaut?

Skill ini menambahkan layanan ke proyek yang tertaut, bukan membuat proyek baru.

Bisakah juga menambahkan database?

Skill ini mengarahkan pekerjaan database ke skill railway-database.

Apakah perlu Railway CLI?

Ya. Skill ini memeriksa alat baris perintah Railway dan meminta Anda masuk jika diperlukan.

Detail

Deskripsi asli dari pembuat

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.

repo: davila7/claude-code-templates

Popularitas

Bintang GitHub
33k
Peringkat
#8909
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa