railway-projects
关于
This Claude Skill manages Railway projects through CLI commands, allowing developers to list, switch between, and configure project settings. It handles tasks like renaming projects, toggling PR deploys, and changing project visibility between public and private. Use it when working with Railway project administration across workspaces.
快速安装
Claude Code
推荐/plugin add https://github.com/davila7/claude-code-templatesgit clone https://github.com/davila7/claude-code-templates.git ~/.claude/skills/railway-projects在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
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.
GitHub 仓库
相关推荐技能
railway-database
元这个Skill用于在Railway平台快速添加官方数据库服务(Postgres、Redis、MySQL、MongoDB)。当开发者需要为应用添加数据库或连接数据库时,可以通过简单的自然语言指令触发。它使用预配置的Railway模板自动设置存储卷、网络和连接变量,简化数据库部署流程。
railway-new
元该Skill用于在Railway平台创建项目和部署服务,支持从零开始初始化项目或在现有项目中添加新服务。它能根据用户指令自动判断执行新项目创建或服务部署,并处理GitHub仓库连接等配置。特别适合需要快速在Railway部署应用或管理多服务项目的开发者。
railway-deployment
元这个Claude Skill用于管理Railway部署的完整生命周期,包括查看日志、重新部署、重启或移除部署。它特别适合部署可见性(列表、状态、历史记录)和故障排除(日志、错误、故障排查)。注意:此技能仅用于部署管理,要完全删除服务需使用railway-environment技能。
railway-status
元该Skill用于检查当前目录下Railway项目的实时状态,包括部署状态、运行情况和可用性。当开发者询问"railway status"、"is it running"或"what's deployed"等部署状态问题时自动触发。它通过railway-cli获取项目信息,但配置查询需使用专门的railway-environment skill处理。
