Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问clear审计异常

railway-apirailway API 文档

Agent Skill

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

总安装

474

周安装

19

GitHub Stars

9

下载量

154
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。

  • 使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。
  • 它属于开发类工具,适用于多种宿主环境。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • railway-api 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Railway API

Comprehensive reference for Railway.com GraphQL API v2 automation including authentication, queries, mutations, and workflow automation.

Overview

The Railway GraphQL API enables programmatic access to all Railway platform features:

  • Project and service management
  • Environment variable configuration
  • Deployment triggering and monitoring
  • Team and resource management
  • Usage and billing queries

API Endpoint: https://backboard.railway.com/graphql/v2

Quick Start

1. Authentication Setup

Railway supports three token types with different scopes:

Token TypeHeaderScopeUse Case
AccountAuthorization: Bearer <token>All user resourcesPersonal automation
TeamTeam-Access-Token: <token>Team-specific resourcesTeam workflows
ProjectProject-Access-Token: <token>Single project onlyCI/CD, project automation

Get tokens: Use the railway-auth skill or Railway dashboard → Account Settings → Tokens

2. Basic Query Example

curl https://backboard.railway.com/graphql/v2 \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"query": "query { me { name email } }"}'

3. Basic Mutation Example

curl https://backboard.railway.com/graphql/v2 \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "mutation($input: VariableUpsertInput!) { variableUpsert(input: $input) }",
    "variables": {
      "input": {
        "projectId": "project-id",
        "environmentId": "env-id",
        "name": "API_KEY",
        "value": "secret-value"
      }
    }
  }'

Common Operations

User & Account Information

query {
  me {
    id
    name
    email
    avatar
    isAdmin
  }
}

List Projects

query {
  projects {
    edges {
      node {
        id
        name
        description
        createdAt
        updatedAt
      }
    }
  }
}

Get Project Details with Services

query GetProject($projectId: String!) {
  project(id: $projectId) {
    id
    name
    description
    services {
      edges {
        node {
          id
          name
          serviceInstances {
            edges {
              node {
                id
                environmentId
                serviceId
              }
            }
          }
        }
      }
    }
    environments {
      edges {
        node {
          id
          name
        }
      }
    }
  }
}

Get Environment Variables

query GetVariables($projectId: String!, $environmentId: String!) {
  variables(projectId: $projectId, environmentId: $environmentId) {
    edges {
      node {
        name
        value
      }
    }
  }
}

Set/Update Variable

mutation SetVariable($input: VariableUpsertInput!) {
  variableUpsert(input: $input)
}

# Variables:
{
  "input": {
    "projectId": "your-project-id",
    "environmentId": "your-env-id",
    "name": "DATABASE_URL",
    "value": "postgresql://..."
  }
}

Trigger Deployment

mutation TriggerDeployment($serviceId: String!, $environmentId: String!) {
  deploymentTrigger(serviceId: $serviceId, environmentId: $environmentId) {
    id
    status
    createdAt
  }
}

Architecture

Progressive Disclosure Structure

  1. SKILL.md (this file): Quick reference and common operations
  2. references/: Detailed documentation

- graphql-endpoint.md - Complete API endpoint documentation - authentication.md - Comprehensive authentication guide - common-queries.md - 15+ query examples with responses - common-mutations.md - 15+ mutation examples with patterns

  1. scripts/: Automation tools

- query-project.py - Python script for querying Railway API - set-variables.ts - TypeScript script for variable management

Error Handling

Railway API returns errors in this format:

{
  "errors": [
    {
      "message": "Error message",
      "extensions": {
        "code": "ERROR_CODE"
      }
    }
  ]
}

Common errors:

  • UNAUTHORIZED - Invalid or expired token
  • FORBIDDEN - Insufficient permissions for resource
  • NOT_FOUND - Resource doesn't exist
  • VALIDATION_ERROR - Invalid input data

Best practices:

  1. Always check for errors field in response
  2. Use appropriate token type for operation scope
  3. Handle rate limiting (429 responses)
  4. Validate input before mutations
  5. Use variables for parameterized queries

Integration Patterns

CI/CD Pipeline

# Get project token from railway-auth
# Set deployment variables
# Trigger deployment
# Monitor deployment status

See scripts/ for complete automation examples.

Infrastructure as Code

// Define Railway resources in code
// Apply changes via GraphQL mutations
// Track state and changes

Monitoring & Alerts

# Query deployment status
# Check resource usage
# Alert on failures

Cross-References

  • railway-auth: Token generation and management
  • railway-deployment: High-level deployment workflows
  • railway-troubleshooting: API error debugging

Learning Path

  1. Start: Read references/graphql-endpoint.md for endpoint details
  2. Authentication: Study references/authentication.md for token setup
  3. Queries: Explore references/common-queries.md for data retrieval
  4. Mutations: Review references/common-mutations.md for operations
  5. Automation: Use scripts in scripts/ for workflow examples
  6. Advanced: Combine patterns for complex automation

Quick Reference

Essential Queries

  • Get user info: query {me {name email}}
  • List projects: query {projects {edges {node {id name}}}}
  • Get variables: Use variables query with projectId and environmentId
  • Deployment status: Query deployments with filters

Essential Mutations

  • Set variable: variableUpsert mutation
  • Trigger deploy: deploymentTrigger mutation
  • Create service: serviceCreate mutation
  • Delete variable: variableDelete mutation

Rate Limits

  • Account tokens: 100 requests/minute
  • Team tokens: 500 requests/minute
  • Project tokens: 1000 requests/minute

Notes

  • All timestamps are in ISO 8601 format (UTC)
  • IDs are opaque strings, don't parse or construct them
  • Pagination uses cursor-based edges/nodes pattern
  • Use GraphQL variables for all dynamic values
  • Production mutations should use Project tokens for security

Known API Limitations

Some GraphQL queries return "Problem processing request" even with valid tokens. This is a Railway API limitation, not a token issue.

Affected queries: deployment(id:), deploymentLogs, buildLogs, me.teams, teams

Workaround: Use Railway CLI for these operations:

railway list --json     # Projects/teams
railway logs            # Deployment/build logs

See api-limitations.md for full details.


References


Resources

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

32.68%
按下载量换算50

github-copilot

23.59%
按下载量换算36

Codex

17.96%
按下载量换算28

neovate

12.63%
按下载量换算19

Antigravity

7.46%
按下载量换算11

kilo

3.57%
按下载量换算5

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills