跳到正文
Skillpedia
部署与云(DevOps)33k · #8910

railway-projects

它能做什么

这项技能管理你的 Railway 项目,例如列出各个工作区中的项目或修改它们的设置。适合需要整理多个 Railway 项目的开发者。

适用场景

  • ✓当你想查看所有 Railway 项目和工作区时。
  • ✓当你想把这个文件夹切换到另一个 Railway 项目时。
  • ✓当你想重命名项目,或更改项目是否公开以及 PR 部署是否开启的时候。

技能链接

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/railway/projects/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/railway/projects/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请列出我所有的 Railway 项目,并把这个文件夹切换到 staging 项目。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会从你的账户中列出项目和工作区,把文件夹关联到你选择的项目,并在你要求时通过 Railway 的 API 更新项目设置。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Railway Project Management

List, switch, and configure Railway projects.

When to Use

  • User asks "show me all my projects" or "what projects do I have"
  • User asks about projects across workspaces
  • User asks "what workspaces do I have"
  • User wants to switch to a different project
  • User asks to rename a project
  • User wants to enable/disable PR deploys
  • User wants to make a project public or private
  • User asks about project settings

List Projects

The railway list --json output can be very large. Run in a subagent and return only essential fields:

  • Project: id, name
  • Workspace: id, name
  • Services: name (optional, if user needs service context)
railway list --json

Extract and return a simplified summary, not the full JSON.

List Workspaces

railway whoami --json

Returns user info including all workspaces the user belongs to.

Switch Project

Link a different project to the current directory:

railway link -p <project-id-or-name>

Or interactively:

railway link

After switching, use railway-status skill to see project details.

Update Project

Modify project settings via GraphQL API.

Get Project ID

railway status --json

Extract project.id from the response.

Update Mutation

bash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
  'mutation updateProject($id: String!, $input: ProjectUpdateInput!) {
    projectUpdate(id: $id, input: $input) { name prDeploys isPublic botPrEnvironments }
  }' \
  '{"id": "PROJECT_ID", "input": {"name": "new-name"}}'
SCRIPT

ProjectUpdateInput Fields

Field Type Description
name String Project name
description String Project description
isPublic Boolean Make project public/private
prDeploys Boolean Enable/disable PR deploys
botPrEnvironments Boolean Enable Dependabot/Renovate PR environments

Examples

Rename project:

${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh '<mutation>' '{"id": "uuid", "input": {"name": "new-name"}}'

Enable PR deploys:

${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh '<mutation>' '{"id": "uuid", "input": {"prDeploys": true}}'

Make project public:

${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh '<mutation>' '{"id": "uuid", "input": {"isPublic": true}}'

Multiple fields:

${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh '<mutation>' '{"id": "uuid", "input": {"name": "new-name", "prDeploys": true}}'

Composability

  • View project details: Use railway-status skill
  • Create new project: Use railway-new skill
  • Manage environments: Use railway-environment skill

Error Handling

Not Authenticated

Not authenticated. Run `railway login` first.

No Projects

No projects found. Create one with `railway init`.

Permission Denied

You don't have permission to modify this project. Check your Railway role.

Project Not Found

Project "foo" not found. Run `railway list` to see available projects.
常见问题

它能显示跨工作区的项目吗?

可以。它会列出项目以及你所属的工作区。

它能修改哪些设置?

项目名称、PR 部署,以及项目是公开还是私有。

列表会不会太长不好阅读?

这项技能建议只返回关键字段,因为完整输出可能非常长。

详情

作者的原始描述

List, switch, and configure Railway projects. Use when user wants to list all projects, switch projects, rename a project, enable/disable PR deploys, make a project public/private, or modify project settings.

repo: davila7/claude-code-templates

热度

GitHub 星标
33k
排名
#8910
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能