agentleFS
alanalvestechalanalvestech/hitank/skills/railway/SKILL.md

railway

Skill38 starsChanged 8 months agoMITView on GitHub

Manage Railway projects, services, deployments, variables, domains and volumes via GraphQL API

10 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use analytics-metrics, aws-account-management and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • hoodiniSkill

    analytics-metrics

    Build data visualization and analytics dashboards. Use when creating charts, KPI displays, metrics dashboards, or data visualization components. Triggers on analytics, dashboard, charts, metrics, KPI, data visualization, Recharts.

    Also in 3 projects that use this

  • hoodiniSkill

    aws-account-management

    Manage AWS accounts, organizations, IAM, and billing. Use when setting up AWS Organizations, managing IAM policies, controlling costs, or implementing multi-account strategies. Triggers on AWS Organizations, AWS IAM, AWS billing, Cost Explorer, SCPs, multi-account, AWS SSO, Identity Center.

    Also in 3 projects that use this

  • LangChainSkill

    langchain

    Build agents with a prebuilt architecture and integrations for any model or tool. Use when creating tool-calling agents, switching model providers, or adding structured output.

    Also in 3 projects that use this

  • +8 more from hoodini

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the output is OK, proceed to the Flow section.

    line 56
  2. Very specific:

    If the output is SETUP_NEEDED, guide the user step by step.

    line 58
  3. Distinctive:

    If the script outputs an error, the token is invalid.

    line 77
  4. Very specific:

    All queries use GraphQL API at https://backboard.railway.com/graphql/v2

    line 244

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/railway

Connect to Railway to manage projects, services, deployments, environment variables, domains, volumes and more. Pure Ruby, zero gems — stdlib only.

Structure

scripts/
├── auth.rb               # Bearer token auth + railway_query helper (required by all scripts)
├── check_setup.rb        # Check if token exists (outputs OK or SETUP_NEEDED)
├── save_token.rb         # Save and validate an API token
├── projects.rb           # List all projects
├── project.rb            # Get project details with services and environments
├── create_project.rb     # Create a project
├── delete_project.rb     # Delete a project
├── services.rb           # List services in a project (via project query)
├── service.rb            # Get service details and config for an environment
├── create_service.rb     # Create a service (GitHub repo, Docker image, or empty)
├── delete_service.rb     # Delete a service
├── deployments.rb        # List deployments for a service
├── deployment.rb         # Get deployment details
├── deploy.rb             # Trigger a deployment
├── redeploy.rb           # Redeploy a deployment
├── rollback.rb           # Rollback a deployment
├── stop_deployment.rb    # Stop a deployment
├── logs.rb               # Get build or runtime logs for a deployment
├── environments.rb       # List environments in a project
├── create_environment.rb # Create an environment
├── delete_environment.rb # Delete an environment
├── variables.rb          # List variables for a service/environment
├── set_variable.rb       # Set or update a variable
├── delete_variable.rb    # Delete a variable
├── domains.rb            # List domains for a service
├── create_domain.rb      # Create a Railway service domain
├── create_custom_domain.rb # Add a custom domain
├── delete_domain.rb      # Delete a domain
├── volumes.rb            # List volumes in a project
├── create_volume.rb      # Create a volume
├── delete_volume.rb      # Delete a volume
└── regions.rb            # List available deployment regions

Setup (check before using)

ruby ~/.claude/skills/railway/scripts/check_setup.rb

If the output is OK, proceed to the Flow section.

If the output is SETUP_NEEDED, guide the user step by step. Present ONE step at a time, wait for the user to confirm before moving to the next.

Step 1 — Ask the user to create an API token:

You need a Railway API token.

  1. Go to https://railway.com/account/tokens
  2. Click Create Token
  3. Give it a name (e.g. "hitank") and choose the scope
  4. Copy the token

Paste the token here.

Step 2 — When the user pastes the token, save it:

ruby ~/.claude/skills/railway/scripts/save_token.rb 'PASTED_TOKEN'

If the script outputs an error, the token is invalid. Ask the user to double-check and try again.

If setup is not complete, DO NOT proceed to the Flow. Complete all steps first.

Flow

The argument $ARGUMENTS may contain a project name or service reference.

Step 1: List projects

ruby ~/.claude/skills/railway/scripts/projects.rb

Present the projects. If $ARGUMENTS matches a project name, use it. Otherwise ask which project to work with.

Step 2: Show project details

ruby ~/.claude/skills/railway/scripts/project.rb PROJECT_ID

Present the project with its services and environments. Ask what the user wants to do.

Step 3: Actions

List services (included in project details):

ruby ~/.claude/skills/railway/scripts/services.rb PROJECT_ID

Get service details:

ruby ~/.claude/skills/railway/scripts/service.rb SERVICE_ID ENVIRONMENT_ID

Create a service (requires user confirmation):

ruby ~/.claude/skills/railway/scripts/create_service.rb PROJECT_ID "Service Name"
ruby ~/.claude/skills/railway/scripts/create_service.rb PROJECT_ID "Service Name" --repo "user/repo" --branch "main"
ruby ~/.claude/skills/railway/scripts/create_service.rb PROJECT_ID "Service Name" --image "redis:latest"

Delete a service (requires user confirmation):

Show the service first, then ask: "Do you want to delete this service and all its deployments?" Only execute after a "yes".

ruby ~/.claude/skills/railway/scripts/delete_service.rb SERVICE_ID

List deployments:

ruby ~/.claude/skills/railway/scripts/deployments.rb PROJECT_ID SERVICE_ID ENVIRONMENT_ID
ruby ~/.claude/skills/railway/scripts/deployments.rb PROJECT_ID SERVICE_ID ENVIRONMENT_ID --limit 10

Get deployment details:

ruby ~/.claude/skills/railway/scripts/deployment.rb DEPLOYMENT_ID

Trigger a deployment (requires user confirmation):

ruby ~/.claude/skills/railway/scripts/deploy.rb SERVICE_ID ENVIRONMENT_ID

Redeploy (requires user confirmation):

ruby ~/.claude/skills/railway/scripts/redeploy.rb DEPLOYMENT_ID

Rollback (requires user confirmation):

ruby ~/.claude/skills/railway/scripts/rollback.rb DEPLOYMENT_ID

Stop a deployment (requires user confirmation):

ruby ~/.claude/skills/railway/scripts/stop_deployment.rb DEPLOYMENT_ID

Get logs:

ruby ~/.claude/skills/railway/scripts/logs.rb DEPLOYMENT_ID
ruby ~/.claude/skills/railway/scripts/logs.rb DEPLOYMENT_ID --type build --limit 200
ruby ~/.claude/skills/railway/scripts/logs.rb DEPLOYMENT_ID --type runtime --limit 100

List environments:

ruby ~/.claude/skills/railway/scripts/environments.rb PROJECT_ID

Create an environment (requires user confirmation):

ruby ~/.claude/skills/railway/scripts/create_environment.rb PROJECT_ID "staging"
ruby ~/.claude/skills/railway/scripts/create_environment.rb PROJECT_ID "preview" --ephemeral

Delete an environment (requires user confirmation):

ruby ~/.claude/skills/railway/scripts/delete_environment.rb ENVIRONMENT_ID

List variables:

ruby ~/.claude/skills/railway/scripts/variables.rb PROJECT_ID ENVIRONMENT_ID SERVICE_ID

Set a variable (requires user confirmation):

ruby ~/.claude/skills/railway/scripts/set_variable.rb PROJECT_ID ENVIRONMENT_ID SERVICE_ID "KEY" "VALUE"

Delete a variable (requires user confirmation):

ruby ~/.claude/skills/railway/scripts/delete_variable.rb PROJECT_ID ENVIRONMENT_ID SERVICE_ID "KEY"

List domains:

ruby ~/.claude/skills/railway/scripts/domains.rb PROJECT_ID ENVIRONMENT_ID SERVICE_ID

Create a Railway domain (requires user confirmation):

ruby ~/.claude/skills/railway/scripts/create_domain.rb SERVICE_ID ENVIRONMENT_ID
ruby ~/.claude/skills/railway/scripts/create_domain.rb SERVICE_ID ENVIRONMENT_ID --port 8080

Add a custom domain (requires user confirmation):

ruby ~/.claude/skills/railway/scripts/create_custom_domain.rb SERVICE_ID ENVIRONMENT_ID "app.example.com"

Delete a domain (requires user confirmation):

ruby ~/.claude/skills/railway/scripts/delete_domain.rb DOMAIN_ID --type service
ruby ~/.claude/skills/railway/scripts/delete_domain.rb DOMAIN_ID --type custom

List volumes:

ruby ~/.claude/skills/railway/scripts/volumes.rb PROJECT_ID

Create a volume (requires user confirmation):

ruby ~/.claude/skills/railway/scripts/create_volume.rb PROJECT_ID SERVICE_ID ENVIRONMENT_ID --path "/data"

Delete a volume (requires user confirmation):

ruby ~/.claude/skills/railway/scripts/delete_volume.rb VOLUME_ID

List available regions:

ruby ~/.claude/skills/railway/scripts/regions.rb

Notes

  • Pure Ruby, zero gems — stdlib only (json, net/http, uri, fileutils)
  • Auth via Bearer token (Authorization: Bearer TOKEN)
  • Token file: ~/.config/railway/token (outside the repo, never commit)
  • All queries use GraphQL API at https://backboard.railway.com/graphql/v2
  • Creating, updating, deleting services/deployments/environments/variables/domains/volumes require explicit user confirmation
  • Rate limits: 1,000/hour (Hobby), 10,000/hour (Pro)
  • Service sources: GitHub repo, Docker image, or empty

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.