Back to Skills

railway-templates

davila7
Updated Today
41 views
15,516
1,344
15,516
View on GitHub
MetaRailwayTemplatesMarketplaceDeploymentCMSAutomationInfrastructure

About

This skill enables developers to search for and deploy pre-configured services from Railway's template marketplace, such as Ghost, Strapi, and n8n. Use it when you need to quickly add a templated service or find templates for a specific use case like CMS or monitoring. For core databases, the separate railway-database skill is preferred.

Documentation

Railway Templates

Search and deploy services from Railway's template marketplace.

When to Use

  • User asks to "add Postgres", "add Redis", "add a database"
  • User asks to "add Ghost", "add Strapi", "add n8n", or any other service
  • User wants to find templates for a use case (e.g., "CMS", "storage", "monitoring")
  • User asks "what templates are available?"
  • User wants to deploy a pre-configured service

Common Template Codes

CategoryTemplateCode
DatabasesPostgreSQLpostgres
Redisredis
MySQLmysql
MongoDBmongodb
CMSGhostghost
Strapistrapi
StorageMiniominio
Automationn8nn8n
MonitoringUptime Kumauptime-kuma

For other templates, use the search query below.

Prerequisites

Get project context:

railway status --json

Extract:

  • id - project ID
  • environments.edges[0].node.id - environment ID

Get workspace ID:

bash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
  'query getWorkspace($projectId: String!) {
    project(id: $projectId) { workspaceId }
  }' \
  '{"projectId": "PROJECT_ID"}'
SCRIPT

Search Templates

List available templates with optional filters:

bash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
  'query templates($first: Int, $verified: Boolean) {
    templates(first: $first, verified: $verified) {
      edges {
        node {
          name
          code
          description
          category
        }
      }
    }
  }' \
  '{"first": 20, "verified": true}'
SCRIPT

Arguments

ArgumentTypeDescription
firstIntNumber of results (max ~100)
verifiedBooleanOnly verified templates
recommendedBooleanOnly recommended templates

Rate Limit

10 requests per minute. Don't spam searches.

Get Template Details

Fetch a specific template by code:

bash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
  'query template($code: String!) {
    template(code: $code) {
      id
      name
      description
      serializedConfig
    }
  }' \
  '{"code": "postgres"}'
SCRIPT

Returns:

  • id - template ID (needed for deployment)
  • serializedConfig - service configuration (needed for deployment)

Deploy Template

Step 1: Fetch Template

bash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
  'query template($code: String!) {
    template(code: $code) {
      id
      serializedConfig
    }
  }' \
  '{"code": "postgres"}'
SCRIPT

Step 2: Deploy to Project

bash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
  'mutation deployTemplate($input: TemplateDeployV2Input!) {
    templateDeployV2(input: $input) {
      projectId
      workflowId
    }
  }' \
  '{
    "input": {
      "templateId": "TEMPLATE_ID_FROM_STEP_1",
      "serializedConfig": SERIALIZED_CONFIG_FROM_STEP_1,
      "projectId": "PROJECT_ID",
      "environmentId": "ENVIRONMENT_ID",
      "workspaceId": "WORKSPACE_ID"
    }
  }'
SCRIPT

Important: serializedConfig is the exact JSON object from the template query, not a string.

Composability

  • Connect services: Use railway-environment skill to add variable references
  • View deployed service: Use railway-service skill
  • Check logs: Use railway-deployment skill
  • Add domains: Use railway-domain skill

Quick Install

/plugin add https://github.com/davila7/claude-code-templates/tree/main/templates

Copy and paste this command in Claude Code to install this skill

GitHub 仓库

davila7/claude-code-templates
Path: cli-tool/components/skills/railway/templates
anthropicanthropic-claudeclaudeclaude-code

Related Skills