Token导航 LogoToken导航

Agent Skill · 运维和基础设施

railway-automation(铁路自动化)

railway-automation 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

railway-automation 是运维和基础设施类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证为 MIT,第三方扫描有提醒项,按安装量在运维和基础设施类的 2,449 个 Skill 里排第 1,662。

总安装 445周安装 18GitHub Stars 9下载 140核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:railway-automation(铁路自动化)
来源仓库:https://github.com/adaptationio/skrillz
仓库路径:skills/railway-automation
安装命令:
npx skills add https://github.com/adaptationio/skrillz --skill railway-automation
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/adaptationio/skrillz --skill railway-automation

这个 Skill 是做什么的

运维和基础设施类 Skill 处理部署、监控、日志和云资源,多数需要较高的执行权限。

railway-automation 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。

安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。它属于运维和基础设施类工具,适用于多种宿主环境。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/railway-automation

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/adaptationio/skrillz --skill railway-automatio…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

railway-automation 怎么安装?

在终端执行 npx skills add https://github.com/adaptationio/skrillz --skill railway-automation。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

railway-automation 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

railway-automation 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

railway-automation 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

railway-automation 用的人多吗?

公开数据是累计安装 445 次,近一周安装 18 次,下载 140 次,GitHub 9 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

railway-automation 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理运维和基础设施类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

运维和基础设施类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
brainstorming

头脑风暴 · Codex、Claude

3,148,776173,131操作浏览器MIT通过
copywriting

文案写作 · Codex、Claude

1,996,72425,583需要联网MIT通过
openclaw-secure-linux-cloud

OpenClaw secure linux cloud 命令行 · Codex、Claude

1,853,08840接触敏感数据未明确未通过
xget

xget 命令行 · Codex、Claude

1,799,28040执行命令未明确未通过
requesting-code-review

代码审查请求 · Codex、Claude

1,590,144173,103权限未标注MIT通过
railway-automation

铁路自动化 · 本页

4459接触敏感数据MIT有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Railway CI/CD Automation

Automate Railway deployments with CI/CD pipelines, migration scripts, and event-driven workflows.

Quick Start

GitHub Actions (5 minutes)

# .github/workflows/railway.yml
- uses: railway/deploy@v1
  with:
    railway_token: ${{ secrets.RAILWAY_TOKEN }}
    service: api

GitLab CI (5 minutes)

# .gitlab-ci.yml
deploy:
  script:
    - railway up --service api
  only: [main]

Migration (10 minutes)

./scripts/migrate.sh --from heroku --project myapp

Workflow Overview

1. GitHub Actions Integration

Setup Process

  1. Generate Railway token (railway login && railway token)
  2. Add token to GitHub secrets (RAILWAY_TOKEN)
  3. Create workflow file (.github/workflows/railway.yml)
  4. Configure deployment triggers
  5. Test with PR or push

Use Cases

  • Deploy on push to main/staging
  • PR preview environments
  • Multi-environment promotion
  • Scheduled deployments
  • Manual approval gates

Template: See templates/github-workflow.yml

Reference: references/github-actions.md for complete guide with 5+ workflow examples


2. GitLab CI Integration

Setup Process

  1. Generate Railway token
  2. Add to GitLab CI/CD variables (RAILWAY_TOKEN)
  3. Create .gitlab-ci.yml
  4. Define stages (test → staging → production)
  5. Configure manual gates

Use Cases

  • Multi-stage pipelines
  • Environment-specific deployments
  • Review apps for merge requests
  • Parallel service deployments
  • Artifact-based deployments

Template: See templates/gitlab-ci.yml

Reference: references/gitlab-ci.md for complete guide with pipeline examples


3. Custom CI/CD Integration

Generic Pattern (Any Platform)

# Install Railway CLI
npm i -g @railway/cli

# Login with token
export RAILWAY_TOKEN=$YOUR_TOKEN

# Link project
railway link $PROJECT_ID

# Deploy
railway up --service $SERVICE_NAME --environment $ENVIRONMENT

Environment Variables

  • RAILWAY_TOKEN: Authentication token
  • RAILWAY_PROJECT_ID: Project identifier (optional if linked)
  • RAILWAY_SERVICE: Service name (optional)
  • RAILWAY_ENVIRONMENT: Environment name (optional)

Health Check Pattern

# Deploy and wait for health
railway up --service api
sleep 30

# Verify deployment
DEPLOY_URL=$(railway status --json | jq -r '.url')
curl -f $DEPLOY_URL/health || exit 1

Supported Platforms

  • CircleCI
  • Travis CI
  • Jenkins
  • Bitbucket Pipelines
  • Azure DevOps
  • Any platform with shell access

4. Migration Automation

Interactive Migration Script

# From Heroku
./scripts/migrate.sh --from heroku --project myapp

# From Vercel
./scripts/migrate.sh --from vercel --project myapp --env production

# Dry run (preview changes)
./scripts/migrate.sh --from render --project myapp --dry-run

Script Features

  • Platform detection
  • Environment variable export/import
  • Railway project creation
  • Service configuration
  • Database migration
  • DNS cutover planning
  • Verification checks

Supported Migrations

  • Heroku → Railway
  • Vercel → Railway
  • Render → Railway
  • Docker Compose → Railway
  • Kubernetes → Railway

Reference: references/migration-patterns.md for detailed guides per platform


5. Scheduled Tasks

Cron-Based Deployments

# GitHub Actions - Deploy every night at 2 AM
on:
  schedule:
    - cron: '0 2 * * *'

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: railway/deploy@v1
        with:
          railway_token: ${{ secrets.RAILWAY_TOKEN }}

Database Backups

# Scheduled backup workflow
on:
  schedule:
    - cron: '0 0 * * *'  # Daily at midnight

jobs:
  backup:
    steps:
      - name: Backup database
        run: |
          railway run pg_dump > backup.sql
          aws s3 cp backup.sql s3://backups/$(date +%Y%m%d).sql

Health Check Monitoring

# Hourly health checks
on:
  schedule:
    - cron: '0 * * * *'

jobs:
  health:
    steps:
      - name: Check service health
        run: |
          curl -f ${{ secrets.SERVICE_URL }}/health || \
          curl -X POST ${{ secrets.SLACK_WEBHOOK }} \
            -d '{"text":"Service down!"}'

6. Webhook Integration

GitHub Webhook → Railway Deploy

// Webhook handler
app.post('/webhook/github', async (req, res) => {
  const { ref, repository } = req.body;

  if (ref === 'refs/heads/main') {
    const { exec } = require('child_process');
    exec('railway up --service api', (error, stdout) => {
      console.log(stdout);
    });
  }

  res.json({ status: 'ok' });
});

Railway Webhook Events Railway supports webhooks for:

  • Deployment started
  • Deployment completed
  • Deployment failed
  • Service crashed
  • Build logs

Configure Webhooks

# Via Railway CLI
railway webhooks add \
  --url https://yourapp.com/webhook \
  --events deployment.success,deployment.failure

# Via API
curl -X POST https://backboard.railway.app/graphql \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "query": "mutation { webhookCreate(input: {...}) }"
  }'

Notification Integration

# Slack notification on deploy
railway webhooks add \
  --url $SLACK_WEBHOOK_URL \
  --events deployment.success \
  --transform '{
    "text": "Deployed {{service}} to {{environment}}"
  }'

Common Patterns

Multi-Environment Deployment

# Deploy to staging first, then production
jobs:
  staging:
    environment: staging
    steps:
      - uses: railway/deploy@v1
        with:
          railway_token: ${{ secrets.RAILWAY_TOKEN }}
          environment: staging

  production:
    needs: staging
    environment: production
    steps:
      - uses: railway/deploy@v1
        with:
          railway_token: ${{ secrets.RAILWAY_TOKEN }}
          environment: production

PR Preview Environments

# Create preview for each PR
on:
  pull_request:
    types: [opened, synchronize]

jobs:
  preview:
    steps:
      - uses: railway/deploy@v1
        with:
          railway_token: ${{ secrets.RAILWAY_TOKEN }}
          service: api-pr-${{ github.event.pull_request.number }}

Rollback on Failure

# Automatic rollback if health check fails
jobs:
  deploy:
    steps:
      - name: Deploy
        id: deploy
        run: railway up --service api

      - name: Health check
        run: curl -f $SERVICE_URL/health

      - name: Rollback on failure
        if: failure()
        run: railway rollback --service api

Matrix Deployments

# Deploy multiple services in parallel
strategy:
  matrix:
    service: [api, worker, cron]

steps:
  - uses: railway/deploy@v1
    with:
      railway_token: ${{ secrets.RAILWAY_TOKEN }}
      service: ${{ matrix.service }}

Token Management

Generate Token

# CLI method
railway login
railway token

# Copy token to clipboard
railway token | pbcopy  # macOS
railway token | xclip   # Linux

Add to CI Platform

GitHub

Settings → Secrets and variables → Actions → New repository secret
Name: RAILWAY_TOKEN
Value: [paste token]

GitLab

Settings → CI/CD → Variables → Add variable
Key: RAILWAY_TOKEN
Value: [paste token]
Protected: Yes
Masked: Yes

CircleCI

Project Settings → Environment Variables → Add Variable
Name: RAILWAY_TOKEN
Value: [paste token]

Token Rotation

# Generate new token
NEW_TOKEN=$(railway token)

# Update in CI (platform-specific)
# Then invalidate old token via dashboard

Environment-Specific Configuration

Detect Environment in Code

const env = process.env.RAILWAY_ENVIRONMENT || 'development';

const config = {
  development: { db: 'localhost:5432' },
  staging: { db: process.env.DATABASE_URL },
  production: { db: process.env.DATABASE_URL }
};

export default config[env];

Conditional Deployment

# Only deploy staging on feature branches
jobs:
  deploy-staging:
    if: github.ref != 'refs/heads/main'
    steps:
      - uses: railway/deploy@v1
        with:
          environment: staging

  deploy-production:
    if: github.ref == 'refs/heads/main'
    steps:
      - uses: railway/deploy@v1
        with:
          environment: production

Environment Variable Management

# Export from staging
railway env --environment staging > .env.staging

# Import to production (selective)
cat .env.staging | grep -v SECRET | railway env --environment production

Best Practices

Security

  • Use masked/protected CI variables
  • Rotate tokens quarterly
  • Use service tokens (not personal) for production
  • Never commit tokens to git
  • Limit token scope to specific projects

Performance

  • Cache dependencies in CI
  • Use Railway's built-in caching
  • Deploy only changed services
  • Run tests before deploy
  • Use health checks before traffic

Reliability

  • Always include rollback mechanism
  • Monitor deployment notifications
  • Set deployment timeouts
  • Use staging before production
  • Test migrations in preview environments

Monitoring

  • Log all deployments
  • Track deployment duration
  • Alert on failures
  • Monitor health checks
  • Track rollback frequency

Troubleshooting

Deployment Fails in CI

# Check token validity
railway whoami

# Verify project link
railway status

# Check service exists
railway list

# View deployment logs
railway logs --service api

Token Authentication Errors

# Regenerate token
railway logout
railway login
railway token

# Update in CI secrets
# Test locally first
RAILWAY_TOKEN=$NEW_TOKEN railway status

Environment Not Found

# List available environments
railway environment list

# Verify environment name matches
railway status --environment production

Service Not Deploying

# Check service name
railway list

# Verify service configuration
railway status --service api

# Check for build errors
railway logs --service api --deployment latest

Related Skills

  • railway-auth: Token management and authentication setup
  • railway-api: Programmatic Railway API automation
  • railway-deployment: Deployment patterns and strategies
  • railway-database: Database automation and backups
  • railway-monitoring: Health checks and alerting

References

  • references/github-actions.md: Complete GitHub Actions guide with 5+ workflow examples
  • references/gitlab-ci.md: Complete GitLab CI guide with pipeline examples
  • references/migration-patterns.md: Platform migration guides (Heroku, Vercel, Render, etc.)

Templates

  • templates/github-workflow.yml: Production-ready GitHub Actions template
  • templates/gitlab-ci.yml: Production-ready GitLab CI template

Scripts

  • scripts/migrate.sh: Interactive migration script supporting multiple platforms

平台分布

github-copilot

29.49%
按下载量换算41

Claude Code

21.85%
按下载量换算31

mcpjam

20.42%
按下载量换算29

moltbot

12.56%
按下载量换算18

windsurf

8.76%
按下载量换算12

zencoder

3.34%
按下载量换算5

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills