Deploys applications on Railway with zero-config detection, databases, and automatic CI/CD. Use when deploying Node.js apps, setting up databases, or needing simple PaaS deployment.
Deploys applications to Railway with zero-config detection for Node.js, Python, Go, and Docker. Use when setting up databases, deploying to PaaS, or needing automatic CI/CD pipelines.
/plugin marketplace add mgd34msu/goodvibes-plugin/plugin install goodvibes@goodvibes-marketThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/configuration.mdModern deployment platform with zero-config builds, instant databases, and automatic CI/CD.
# Install CLI
npm install -g @railway/cli
# Login
railway login
# Initialize project
railway init
# Deploy
railway up
# Get deployment URL
railway domain
# Link to existing project
railway link
# Deploy current directory
railway up
# Deploy with logs
railway up --detach
Use Railway's template gallery for pre-configured stacks.
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"buildCommand": "npm run build"
},
"deploy": {
"startCommand": "npm start",
"healthcheckPath": "/health",
"healthcheckTimeout": 300,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 3
}
}
Railway automatically detects:
# Set variable
railway variables set API_KEY=secret
# Set multiple
railway variables set API_KEY=secret DB_URL=postgres://...
# List variables
railway variables
# Delete variable
railway variables delete API_KEY
# Reference other services
DATABASE_URL=${{Postgres.DATABASE_URL}}
REDIS_URL=${{Redis.REDIS_URL}}
# Add PostgreSQL
railway add postgresql
# Add MySQL
railway add mysql
# Add Redis
railway add redis
# Add MongoDB
railway add mongodb
Automatically available as environment variables:
| Service | Variable |
|---|---|
| PostgreSQL | DATABASE_URL, PGHOST, PGPORT, etc. |
| MySQL | MYSQL_URL, MYSQLHOST, etc. |
| Redis | REDIS_URL, REDISHOST, etc. |
| MongoDB | MONGO_URL |
# Connect to database shell
railway connect
# Run database migrations
railway run npm run migrate
{
"scripts": {
"build": "tsc",
"start": "node dist/index.js"
},
"engines": {
"node": "20"
}
}
// Use PORT from environment
const port = process.env.PORT || 3000;
app.listen(port, '0.0.0.0', () => {
console.log(`Server running on port ${port}`);
});
{
"scripts": {
"build": "next build",
"start": "next start -p $PORT"
}
}
Railway automatically:
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./
EXPOSE 3000
CMD ["node", "dist/index.js"]
railway domain
# Returns: your-app.up.railway.app
# Or add custom domain in dashboard
# 1. Service settings > Domains
# 2. Add custom domain
# 3. Configure DNS (CNAME to railway.app)
CNAME your-app.up.railway.app
Configure in dashboard:
Railway Pro plans support auto-scaling based on:
{
"deploy": {
"healthcheckPath": "/health",
"healthcheckTimeout": 300
}
}
app.get('/health', (req, res) => {
res.status(200).json({ status: 'healthy' });
});
# Stream logs
railway logs
# Follow logs
railway logs -f
# Specific service
railway logs --service my-service
Real-time logs, metrics, and deployment history in the Railway dashboard.
Enable in project settings:
# Production
railway variables set --environment production API_URL=https://api.example.com
# Staging
railway variables set --environment staging API_URL=https://staging-api.example.com
# Project management
railway init # Initialize new project
railway link # Link to existing project
railway unlink # Unlink project
# Deployment
railway up # Deploy current directory
railway up --detach # Deploy without logs
# Variables
railway variables # List variables
railway variables set KEY=value
# Database
railway add postgresql # Add database
railway connect # Connect to database
# Logs & shell
railway logs # View logs
railway run <cmd> # Run command in Railway env
railway shell # Interactive shell
# Domains
railway domain # Get/create domain
{
"build": {
"rootDirectory": "apps/api"
}
}
Deploy each app as separate Railway service, all in same project.
See references/configuration.md for complete configuration options.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.