鱼皮AI导航
鱼皮AI导航
  • 主页
  • 社区
  • AI工具
  • AI知识库
  • AI提示词
  • MCP
  • Skills
  • AI学习资源
  • AI资讯
  • GitHub开源
登录/注册

service

提供铁路平台服务的全生命周期管理能力,包括实时查询部署状态、重命名服务、更换图标、切换关联服务,以及通过 Docker 镜像创建新服务,适用于基础设施即代码场景下的快速迭代与可视化运维。

效率工具开发运维软件开发
访问 GitHub
文档Skills.MD
name
railway-service
description
Check service status, rename services, change service icons, link services, or create services with Docker images. For creating services with local code, prefer railway-new skill. For GitHub repo sources, use railway-new skill to create empty service then railway-environment skill to configure source.
version
1.0.0
author
Railway
license
MIT
tags["Railway","Service","Status","Docker","Container","Infrastructure","Management"]
dependencies["railway-cli"]
allowed-tools
Bash(railway:*)

Railway Service Management

Check status, update properties, and advanced service creation.

When to Use

  • User asks about service status, health, or deployments
  • User asks "is my service deployed?"
  • User wants to rename a service or change service icon
  • User wants to link a different service
  • User wants to deploy a Docker image as a new service (advanced)

Note: For creating services with local code (the common case), prefer the railway-new skill which handles project setup, scaffolding, and service creation together.

For GitHub repo sources: Use railway-new skill to create empty service, then railway-environment skill to configure source.repo via staged changes API.

Create Service

Create a new service via GraphQL API. There is no CLI command for this.

Get Context

▼
bash
复制代码
railway status --json

Extract:

  • project.id - for creating the service
  • environment.id - for staging the instance config

Create Service Mutation

▼
graphql
复制代码
mutation serviceCreate($input: ServiceCreateInput!) { serviceCreate(input: $input) { id name } }

ServiceCreateInput Fields

FieldTypeDescription
projectIdString!Project ID (required)
nameStringService name (auto-generated if omitted)
source.imageStringDocker image (e.g., nginx:latest)
source.repoStringGitHub repo (e.g., user/repo)
branchStringGit branch for repo source
environmentIdStringIf set and is a fork, only creates in that env

Example: Create empty service

▼
bash
复制代码
bash <<'SCRIPT' ${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \ 'mutation createService($input: ServiceCreateInput!) { serviceCreate(input: $input) { id name } }' \ '{"input": {"projectId": "PROJECT_ID"}}' SCRIPT

Example: Create service with image

▼
bash
复制代码
bash <<'SCRIPT' ${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \ 'mutation createService($input: ServiceCreateInput!) { serviceCreate(input: $input) { id name } }' \ '{"input": {"projectId": "PROJECT_ID", "name": "my-service", "source": {"image": "nginx:latest"}}}' SCRIPT

Connecting a GitHub Repo

Do NOT use serviceCreate with source.repo - use staged changes API instead.

Flow:

  1. Create empty service: serviceCreate(input: {projectId: "...", name: "my-service"})
  2. Use railway-environment skill to configure source via staged changes API
  3. Apply to trigger deployment

After Creating: Configure Instance

Use railway-environment skill to configure the service instance:

▼
json
复制代码
{ "services": { "<serviceId>": { "isCreated": true, "source": { "image": "nginx:latest" }, "variables": { "PORT": { "value": "8080" } } } } }

Critical: Always include isCreated: true for new service instances.

Then use railway-environment skill to apply and deploy.

Check Service Status

▼
bash
复制代码
railway service status --json

Returns current deployment status for the linked service.

Deployment History

▼
bash
复制代码
railway deployment list --json --limit 5

Present Status

Show:

  • Service: name and current status
  • Latest Deployment: status (SUCCESS, FAILED, DEPLOYING, CRASHED, etc.)
  • Deployed At: when the current deployment went live
  • Recent Deployments: last 3-5 with status and timestamps

Deployment Statuses

StatusMeaning
SUCCESSDeployed and running
FAILEDBuild or deploy failed
DEPLOYINGCurrently deploying
BUILDINGBuild in progress
CRASHEDRuntime crash
REMOVEDDeployment removed

Update Service

Update service name or icon via GraphQL API.

Get Service ID

▼
bash
复制代码
railway status --json

Extract service.id from the response.

Update Name

▼
bash
复制代码
bash <<'SCRIPT' ${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \ 'mutation updateService($id: String!, $input: ServiceUpdateInput!) { serviceUpdate(id: $id, input: $input) { id name } }' \ '{"id": "SERVICE_ID", "input": {"name": "new-name"}}' SCRIPT

Update Icon

Icons can be image URLs or animated GIFs.

TypeExample
Image URL"icon": "https://example.com/logo.png"
Animated GIF"icon": "https://example.com/animated.gif"
Devicons"icon": "https://devicons.railway.app/github"

Railway Devicons: Query https://devicons.railway.app/{query} for common developer icons (e.g., github, postgres, redis, nodejs). Browse all at https://devicons.railway.app

▼
bash
复制代码
bash <<'SCRIPT' ${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \ 'mutation updateService($id: String!, $input: ServiceUpdateInput!) { serviceUpdate(id: $id, input: $input) { id icon } }' \ '{"id": "SERVICE_ID", "input": {"icon": "https://devicons.railway.app/github"}}' SCRIPT

ServiceUpdateInput Fields

FieldTypeDescription
nameStringService name
iconStringEmoji or image URL (including animated GIFs)

Link Service

Switch the linked service for the current directory:

▼
bash
复制代码
railway service link

Or specify directly:

▼
bash
复制代码
railway service link <service-name>

Composability

  • Create service with local code: Use railway-new skill (handles scaffolding + creation)
  • Configure service: Use railway-environment skill (variables, commands, image, etc.)
  • Delete service: Use railway-environment skill with isDeleted: true
  • Apply changes: Use railway-environment skill
  • View logs: Use railway-deployment skill
  • Deploy local code: Use railway-deploy skill

Error Handling

No Service Linked

▼
text
复制代码
No service linked. Run `railway service link` to link a service.

No Deployments

▼
text
复制代码
Service exists but has no deployments yet. Deploy with `railway up`.

Service Not Found

▼
text
复制代码
Service "foo" not found. Check available services with `railway status`.

Project Not Found

User may not be in a linked project. Check railway status.

Permission Denied

User needs at least DEVELOPER role to create services.

Invalid Image

Docker image must be accessible (public or with registry credentials).

效率工具
开发运维
软件开发

快捷安装

复制到终端去安装 Skill

npxskillsadddavila7/claude-code-templates--skill"service"
站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
🔥热门工具
朱雀AI检测朱雀AI检测
朱雀AI检测助手朱雀AI检测助手
LovartLovart
老鱼简历老鱼简历
WritePass官网WritePass官网
面多多面多多
CursorCursor
星月写作星月写作
朱雀AI检测助手朱雀AI检测助手
零感AI零感AI
Skills 推荐
debug
debug 是一个系统化定位软件缺陷根因的技能,适用于用户报告 'fix'、'broken'、'error' 等问题或测试意外失败时。它通过可验证的假设、最小复现、因果链分析和回归测试,确保在修复前准确定位根本原因。
retrieving-developer-knowledge
retrieving-developer-knowledge 用于搜索、获取和整合 Google 官方开发者文档,覆盖 Google Cloud、AI/Gemini、Android、Chrome、Web、Flutter、Go、Firebase 等平台,适用于查询 gcloud CLI 命令、API 语法、IAM 权限或架构对比等场景。
diff-intake
diff-intake 读取 PR 或分支差异,生成结构化 YAML 变更摘要,用于下游 analytics instrumentation 技能。适用于用户提交 PR 链接、分支对比或原始 diff 后需理解变更内容、评估分析覆盖或启动埋点流程的场景。
load-balancer-configurator
根据用户需求自动生成各类负载均衡器的生产级配置,覆盖 ALB、NLB、Nginx 和 HAProxy 等主流类型,适配不同协议、端口、健康检查及后端服务拓扑,支持直接集成到基础设施即代码流程中。
webapp-testing
提供本地 Web 应用的端到端测试能力,支持页面导航、元素交互、表单填写、动态等待、断言验证、截图捕获、浏览器日志收集及网络请求拦截,适用于前端功能验证与 UI 行为调试。