用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/firstbatchxyz/kai --skill railway-monitor命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | railway-monitor |
| description | Monitor Railway projects, diagnose deployment failures, and audit infrastructure using read-only MCP tools |
| version | 1.0.0 |
| author | kai-agent |
| metadata | {"kai":{"tags":["kai","railway","monitoring","deployments","infrastructure"],"related_skills":["aws-performance","aws-cost-optimizer"]}} |
Monitor, diagnose, and audit Railway infrastructure. All operations are read-only — no deploys, restarts, or config changes.
RAILWAY_API_TOKEN set in kai-backend envmcp__kai__railway_*Get a full picture of what's running.
List all projects:
railway_list_projects(workspaceId)
For each project, get details:
railway_project_detail(workspaceId, projectId="...")
Returns: services, environments, volumes
Present as:
| Project | Services | Environments | Volumes |
|---|
Check if everything is running correctly.
Quick health overview (best starting point):
railway_project_health(workspaceId, projectId="...")
Returns every service × environment with latest deployment status.
Or per-environment:
railway_deployment_status(workspaceId, projectId="...", environmentId="...")
Shows all services in that environment.
Flag issues:
FAILED or CRASHED → immediate attentionBUILDING for >10 minutes → possibly stuckWhen a service is down, follow this sequence:
Check latest deployment:
railway_latest_deployment(workspaceId, projectId, environmentId, serviceId)
Note the status and deploymentId.
If build failed — read build logs:
railway_build_logs(workspaceId, deploymentId="...", limit=200)
Look for: dependency install errors, compile errors, Dockerfile issues.
If build succeeded but runtime crashed — read runtime logs:
railway_deployment_logs(workspaceId, deploymentId="...", limit=200)
Look for: uncaught exceptions, OOM kills, port binding failures, missing env vars.
Check HTTP errors:
railway_http_logs(workspaceId, deploymentId="...", limit=100)
Look for: 5xx status codes, high response times (>5s), patterns in failing paths.
Check environment variables:
railway_list_variables(workspaceId, projectId, environmentId, serviceId)
Verify expected vars exist (DATABASE_URL, REDIS_URL, API_KEY, etc.).
Check variable references:
railway_variable_references(workspaceId, projectId, environmentId, serviceId)
Verify ${{...}} references resolve to actual services.
List all domains:
railway_list_domains(workspaceId, projectId, environmentId, serviceId)
Check for issues:
certificateStatus != "VALID" → SSL cert problemstatus != "OK" → DNS not configuredList volumes:
railway_list_volumes(workspaceId, projectId)
Check each volume:
railway_volume_detail(workspaceId, volumeInstanceId="...")
state != "READY"currentSizeMB approaching storage limitVerify backups exist:
railway_volume_backups(workspaceId, volumeInstanceId="...")
Verify all services have the expected environment variables.
For each service in the production environment:
railway_list_variables(workspaceId, projectId, environmentId, serviceId)
Common expected variables:
PORT, NODE_ENV, DATABASE_URLAPI_KEY, JWT_SECRET, CORS_ORIGINREDIS_URL, QUEUE_NAMELOG_LEVELCheck references make sense:
railway_variable_references(workspaceId, projectId, environmentId, serviceId)
${{Postgres.DATABASE_URL}} style refs point to real servicesUseful for understanding recent changes.
railway_list_deployments(workspaceId, projectId, environmentId, serviceId, limit=20)
FAILED → SUCCESS → FAILED patterns = flaky deploysProject: {name} Status: Healthy / Warning / Critical
| Service | Environment | Deploy Status | Last Deploy | Issue |
|---|---|---|---|---|
| api | production | SUCCESS | 2h ago | - |
| worker | production | CRASHED | 30m ago | OOM in logs |
| web | staging | BUILDING | 15m ago | Possibly stuck |
Issues Found:
Variable Audit:
REDIS_URL on worker service${{OldDb.URL}} (service deleted)Recommendations: