Skip to content
OpenSmartRoute
Skillv1.0.0

railway-domain

Add, view, or remove domains for Railway services. Use when user wants to add a domain, generate a railway domain, check current domains, get the URL for a service, or remove a domain.

by davila7(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from davila7/claude-code-templates (cli-tool/components/skills/railway/domain/SKILL.md). Install upstream with npx skills add davila7/claude-code-templates --skill domain. Copyright stays with the author (MIT).

Railway Domain Management

Add, view, or remove domains for Railway services.

When to Use

  • User asks to "add a domain", "generate a domain", "get a URL"
  • User wants to add a custom domain
  • User asks "what's the URL for my service"
  • User wants to remove a domain

Add Railway Domain

Generate a railway-provided domain (max 1 per service):

railway domain --json

For a specific service:

railway domain --json --service backend

Response

Returns the generated domain URL. Service must have a deployment.

Add Custom Domain

railway domain example.com --json

Response

Returns required DNS records:

{
  "domain": "example.com",
  "dnsRecords": [
    { "type": "CNAME", "host": "@", "value": "..." }
  ]
}

Tell user to add these records to their DNS provider.

Read Current Domains

Use railway-environment skill to see configured domains, or query directly:

query domains($envId: String!) {
  environment(id: $envId) {
    config(decryptVariables: false)
  }
}

Domains are in config.services.<serviceId>.networking:

  • serviceDomains - Railway-provided domains
  • customDomains - User-provided domains

Remove Domain

Use railway-environment skill to remove domains:

Remove custom domain

{
  "services": {
    "<serviceId>": {
      "networking": {
        "customDomains": { "<domainId>": null }
      }
    }
  }
}

Remove railway domain

{
  "services": {
    "<serviceId>": {
      "networking": {
        "serviceDomains": { "<domainId>": null }
      }
    }
  }
}

Then use railway-environment skill to apply and commit the change.

CLI Options

Flag Description
[DOMAIN] Custom domain to add (omit for railway domain)
-p, --port <PORT> Port to connect
-s, --service <NAME> Target service (defaults to linked)
--json JSON output

Composability

  • Read domains: Use railway-environment skill
  • Remove domains: Use railway-environment skill
  • Apply removal: Use railway-environment skill
  • Check service: Use railway-service skill

Error Handling

No Service Linked

No service linked. Use --service flag or run `railway service` to select one.

Domain Already Exists

Service already has a railway-provided domain. Maximum 1 per service.

No Deployment

Service has no deployment. Deploy first with `railway up`.

Invalid Domain

Invalid domain format. Use a valid domain like "example.com" or "api.example.com".

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/davila7-claude-code-templates-domain/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

davila7-claude-code-templates-domain.ocm.jsonjson
{
  "ocm": "1",
  "id": "davila7-claude-code-templates-domain",
  "kind": "skill",
  "name": "railway-domain",
  "description": "Add, view, or remove domains for Railway services. Use when user wants to add a domain, generate a railway domain, check current domains, get the URL for a service, or remove a domain.",
  "publisher": "davila7",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "railway",
      "domain",
      "dns",
      "url",
      "custom-domain",
      "infrastructure",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Add, view, or remove domains for Railway services. Use when user wants to add a domain, generate a railway domain, check current domains, get the URL for a service, or remove a domain."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/davila7/claude-code-templates",
      "path": "cli-tool/components/skills/railway/domain/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/davila7/claude-code-templates/blob/HEAD/cli-tool/components/skills/railway/domain/SKILL.md",
      "key": "davila7/claude-code-templates/cli-tool/components/skills/railway/domain/SKILL.md"
    },
    "allowed_tools": [
      "Bash(railway:*)"
    ],
    "license": "MIT"
  },
  "instructions": "# Railway Domain Management\n\nAdd, view, or remove domains for Railway services.\n\n## When to Use\n\n- User asks to \"add a domain\", \"generate a domain\", \"get a URL\"\n- User wants to add a custom domain\n- User asks \"what's the URL for my service\"\n- User wants to remove a domain\n\n## Add Railway Domain\n\nGenerate a railway-provided domain (max 1 per service):\n\n```bash\nrailway domain --json\n```\n\nFor a specific service:\n```bash\nrailway domain --json --service backend\n```\n\n### Response\nReturns the generated domain URL. Service must have a deployment.\n\n## Add Custom Domain\n\n```bash\nrailway domain example.c",
  "cost": {
    "context_tokens": 644
  }
}

Fetch it by URL: GET /api/v1/registry/davila7-claude-code-templates-domain/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.