railway by mshumer/claude-skill-railway
npx skills add https://github.com/mshumer/claude-skill-railway --skill railway包含 Shell 命令
此技能包含可能执行系统命令的 shell 命令指令(!command``)。安装前请仔细审查。
使用 Railway CLI 管理 Railway 部署和基础设施。
当前状态:!railway status 2>&1 || echo "NOT_LINKED"
在运行任何命令之前,请检查上面的预检状态:
npm install -g @railway/clirailway login(需要浏览器)railway list 以显示可用项目railway link -p <project-id> 进行链接广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
根据 $ARGUMENTS,执行相应的工作流:
railway status
railway domain
railway deployment list --limit 1
报告:项目信息、URL 以及上次部署状态/时间。
解析自然语言选项:
--filter "@level:error"--since 1h--build--lines 100默认:railway logs --lines 30
总结输出 - 高亮错误、警告或有趣的模式。
railway up
然后等待并检查:
railway deployment list --limit 1 获取状态curl -s -o /dev/null -w "%{http_code}" <domain>railway logs --build --lines 50railway redeploy
重新部署但不重建。适用于环境变量更改。
railway restart
重启服务,无需重建或重新部署。
railway variables
重要提示:显示变量时,对敏感值进行脱敏处理:
设置:railway variables set KEY=value
删除:railway variables delete KEY(首先请求确认!)
railway deployment list --limit 10
格式化为表格,包含:ID(简短)、状态、时间前、提交信息(截断)
railway domain
显示公共 URL。如果不存在,则提供创建一个。
railway domain
然后 curl 域名以检查 HTTP 状态:
curl -s -o /dev/null -w "%{http_code}" -m 10 <domain-url>
报告是否健康(2xx)、不健康或无法访问。
railway open
在浏览器中打开 Railway 仪表板。
通过名称(模糊匹配)切换到不同的 Railway 项目。
# 列出所有项目
railway list
查找与名称匹配的项目 ID,然后:
railway link -p <project-id>
使用 railway status 确认切换。
连接到项目的数据库 shell(Postgres、MongoDB、Redis 等)
railway connect
如果存在多个数据库,Railway 将提示选择一个。
列出可用项目并链接一个:
railway list
以编号列表形式显示项目。询问用户要链接哪个,然后:
railway link -p <project-id>
在执行破坏性操作之前,请求确认:
railway down - 移除部署railway variables delete - 移除环境变量railway unlink - 取消链接项目格式:"这将执行 [操作]。确定吗?(y/n)"
始终提供:
状态检查:
✓ MyApp 已部署且运行正常
| 项目 | MyApp |
| 环境 | production |
| 服务 | MyApp |
| URL | https://myapp-production.up.railway.app |
| 上次部署 | 2 小时前 (SUCCESS) |
部署后:
✓ 部署成功
构建在 45 秒内完成
URL: https://myapp-production.up.railway.app
健康检查: 200 OK
出错时:
✗ 部署失败
第 23 行构建错误:未找到模块 'xyz'
建议修复:运行 `npm install xyz` 并重新部署
每周安装次数
108
仓库
GitHub 星标数
25
首次出现
2026 年 1 月 22 日
安全审计
安装于
claude-code93
opencode89
codex88
gemini-cli81
cursor79
github-copilot63
Contains Shell Commands
This skill contains shell command directives (!command``) that may execute system commands. Review carefully before installing.
Manage Railway deployments and infrastructure using the Railway CLI.
Current status: !railway status 2>&1 || echo "NOT_LINKED"
Before running any command, check the pre-flight status above:
npm install -g @railway/clirailway login manually (requires browser)railway list to show available projectsrailway link -p <project-id>Based on $ARGUMENTS, execute the appropriate workflow:
railway status
railway domain
railway deployment list --limit 1
Report: project info, URL, and last deployment status/time.
Parse natural language options:
--filter "@level:error"--since 1h--build--lines 100Default: railway logs --lines 30
Summarize output - highlight errors, warnings, or interesting patterns.
railway up
Then wait and check:
railway deployment list --limit 1 to get statuscurl -s -o /dev/null -w "%{http_code}" <domain>railway logs --build --lines 50railway redeploy
Redeploys without rebuilding. Useful for env var changes.
railway restart
Restarts the service without rebuild or redeploy.
railway variables
IMPORTANT : When displaying variables, redact sensitive values:
For setting: railway variables set KEY=value For deleting: railway variables delete KEY (ask for confirmation first!)
railway deployment list --limit 10
Format as a table with: ID (short), Status, Time ago, Commit message (truncated)
railway domain
Show the public URL. If none exists, offer to create one.
railway domain
Then curl the domain to check HTTP status:
curl -s -o /dev/null -w "%{http_code}" -m 10 <domain-url>
Report if healthy (2xx), unhealthy, or unreachable.
railway open
Opens the Railway dashboard in browser.
Switch to a different Railway project by name (fuzzy match).
# List all projects
railway list
Find the project ID that matches the name, then:
railway link -p <project-id>
Confirm the switch with railway status.
Connect to the project's database shell (Postgres, MongoDB, Redis, etc.)
railway connect
If multiple databases exist, Railway will prompt to select one.
List available projects and link one:
railway list
Show projects in a numbered list. Ask user which to link, then:
railway link -p <project-id>
Before destructive operations, ask for confirmation:
railway down - removes deploymentrailway variables delete - removes env varrailway unlink - unlinks projectFormat: "This will [action]. Are you sure? (y/n)"
Always provide:
Status check:
✓ MyApp is deployed and healthy
| Project | MyApp |
| Environment | production |
| Service | MyApp |
| URL | https://myapp-production.up.railway.app |
| Last deploy | 2 hours ago (SUCCESS) |
After deploy:
✓ Deployment successful
Build completed in 45s
URL: https://myapp-production.up.railway.app
Health check: 200 OK
On error:
✗ Deployment failed
Build error at line 23: Module not found 'xyz'
Suggested fix: Run `npm install xyz` and redeploy
Weekly Installs
108
Repository
GitHub Stars
25
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykWarn
Installed on
claude-code93
opencode89
codex88
gemini-cli81
cursor79
github-copilot63
Axiom 成本控制技能:优化云日志成本,识别浪费并设置监控仪表板
202 周安装
Skill Judge:AI Agent Skill评估工具,官方规范与17+示例提炼,优化知识增量与思维模式
205 周安装
Modal 无服务器平台:Python 云函数、GPU 加速计算和 AI/ML 部署指南
205 周安装
GRPO/RL训练实战指南:使用TRL库进行组相对策略优化,高效微调语言模型
204 周安装
Conductor TDD工作流模式指南:红绿重构循环、Git提交与质量验证
89 周安装
创业点子验证框架:9维度评分卡与RAT测试,系统性验证创业想法可行性
202 周安装