[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72H2QCNJXHREV17PH04S7SR":3,"skill-same:01M72H2QCNJXHREV17PH04S7SR":58},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":14,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":6,"ownerDescription":42,"updatedAt":43,"install":44,"resources":57},"01M72H2QCNJXHREV17PH04S7SR","railway-environment",null,"Query, stage, and apply configuration changes for Railway environments. Use for ANY variable or env var operations, service configuration (source, build settings, deploy settings), lifecycle (delete service), and applying changes. Prefer over railway-status skill for any configuration or variable queries.","cocyuhao\u002Fai-dev-tooling-research-archive","cocyuhao","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F269083740?v=4","01M72F908ET5R76KP9NXS6Y2GJ","Hao Yu","01M72F909376KCNJVKG8MEPY2Q",0,"MIT","https:\u002F\u002Fgithub.com\u002Fcocyuhao\u002Fai-dev-tooling-research-archive\u002Fblob\u002Fmain\u002Fclaude-code-templates\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Frailway\u002Fenvironment\u002FSKILL.md",[],[],"2026-11-10 22:39:42",false,"---\nname: railway-environment\ndescription: Query, stage, and apply configuration changes for Railway environments. Use for ANY variable or env var operations, service configuration (source, build settings, deploy settings), lifecycle (delete service), and applying changes. Prefer over railway-status skill for any configuration or variable queries.\nversion: 1.0.0\nauthor: Railway\nlicense: MIT\ntags: [Railway, Environment, Configuration, Variables, Build, Deploy, Infrastructure, Settings]\ndependencies: [railway-cli]\nallowed-tools: Bash(railway:*)\n---\n\n# Environment Configuration\n\nQuery, stage, and apply configuration changes for Railway environments.\n\n## Shell Escaping\n\n**CRITICAL:** When running GraphQL queries via bash, you MUST wrap in heredoc to prevent shell escaping issues:\n\n```bash\nbash \u003C\u003C'SCRIPT'\n${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Flib\u002Frailway-api.sh 'query ...' '{\"var\": \"value\"}'\nSCRIPT\n```\n\nWithout the heredoc wrapper, multi-line commands break and exclamation marks in GraphQL non-null types get escaped, causing query failures.\n\n## When to Use\n\n- User wants to create a new environment\n- User wants to duplicate an environment (e.g., \"copy production to staging\")\n- User wants to switch to a different environment\n- User asks about current build\u002Fdeploy settings, variables, replicas, health checks, domains\n- User asks to change service source (Docker image, branch, commit, root directory)\n- User wants to connect a service to a GitHub repo\n- User wants to deploy from a GitHub repo (create empty service first via railway-new skill, then use this)\n- User asks to change build or start command\n- User wants to add\u002Fupdate\u002Fdelete environment variables\n- User wants to change replica count or configure health checks\n- User asks to delete a service, volume, or bucket\n- User says \"apply changes\", \"commit changes\", \"deploy changes\"\n- Auto-fixing build errors detected in logs\n\n## Create Environment\n\nCreate a new environment in the linked project:\n\n```bash\nrailway environment new \u003Cname>\n```\n\nDuplicate an existing environment:\n\n```bash\nrailway environment new staging --duplicate production\n```\n\nWith service-specific variables:\n\n```bash\nrailway environment new staging --duplicate production --service-variable api PORT=3001\n```\n\n## Switch Environment\n\nLink a different environment to the current directory:\n\n```bash\nrailway environment \u003Cname>\n```\n\nOr by ID:\n\n```bash\nrailway environment \u003Cenvironment-id>\n```\n\n## Get Context\n\n```bash\nrailway status --json\n```\n\nExtract:\n\n- `project.id` - for service lookup\n- `environment.id` - for the mutations\n- `service.id` - default service if user doesn't specify one\n\n### Resolve Service ID\n\nIf user specifies a service by name, query project services:\n\n```graphql\nquery projectServices($projectId: String!) {\n  project(id: $projectId) {\n    services {\n      edges {\n        node {\n          id\n          name\n        }\n      }\n    }\n  }\n}\n```\n\nMatch the service name (case-insensitive) to get the service ID.\n\n## Query Configuration\n\nFetch current environment configuration and staged changes.\n\n```graphql\nquery environmentConfig($environmentId: String!) {\n  environment(id: $environmentId) {\n    id\n    config(decryptVariables: false)\n    serviceInstances {\n      edges {\n        node {\n          id\n          serviceId\n        }\n      }\n    }\n  }\n  environmentStagedChanges(environmentId: $environmentId) {\n    id\n    patch(decryptVariables: false)\n  }\n}\n```\n\nExample:\n\n```bash\nbash \u003C\u003C'SCRIPT'\n${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Flib\u002Frailway-api.sh \\\n  'query envConfig($envId: String!) {\n    environment(id: $envId) { id config(decryptVariables: false) }\n    environmentStagedChanges(environmentId: $envId) { id patch(decryptVariables: false) }\n  }' \\\n  '{\"envId\": \"ENV_ID\"}'\nSCRIPT\n```\n\n### Response Structure\n\nThe `config` field contains current configuration:\n\n```json\n{\n  \"services\": {\n    \"\u003CserviceId>\": {\n      \"source\": { \"repo\": \"...\", \"branch\": \"main\" },\n      \"build\": { \"buildCommand\": \"npm run build\", \"builder\": \"NIXPACKS\" },\n      \"deploy\": {\n        \"startCommand\": \"npm start\",\n        \"multiRegionConfig\": { \"us-west2\": { \"numReplicas\": 1 } }\n      },\n      \"variables\": { \"NODE_ENV\": { \"value\": \"production\" } },\n      \"networking\": { \"serviceDomains\": {}, \"customDomains\": {} }\n    }\n  },\n  \"sharedVariables\": { \"DATABASE_URL\": { \"value\": \"...\" } }\n}\n```\n\nThe `patch` field in `environmentStagedChanges` contains pending changes. The effective configuration is the base `config` merged with the staged `patch`.\n\nFor complete field reference, see [reference\u002Fenvironment-config.md](..\u002Freference\u002Fenvironment-config.md).\n\nFor variable syntax and service wiring patterns, see [reference\u002Fvariables.md](..\u002Freference\u002Fvariables.md).\n\n## Get Rendered Variables\n\nThe GraphQL queries above return **unrendered** variables - template syntax like `${{shared.DOMAIN}}` is preserved. This is correct for management\u002Fediting.\n\nTo see **rendered** (resolved) values as they appear at runtime:\n\n```bash\n# Current linked service\nrailway variables --json\n\n# Specific service\nrailway variables --service \u003Cservice-name> --json\n```\n\n**When to use:**\n- Debugging connection issues (see actual URLs\u002Fports)\n- Verifying variable resolution is correct\n- Viewing Railway-injected values (RAILWAY_*)\n\n## Stage Changes\n\nStage configuration changes via the `environmentStageChanges` mutation. Use `merge: true` to automatically merge with existing staged changes.\n\n```graphql\nmutation stageEnvironmentChanges(\n  $environmentId: String!\n  $input: EnvironmentConfig!\n  $merge: Boolean\n) {\n  environmentStageChanges(\n    environmentId: $environmentId\n    input: $input\n    merge: $merge\n  ) {\n    id\n  }\n}\n```\n\n**Important:** Always use variables (not inline input) because service IDs are UUIDs which can't be used as unquoted GraphQL object keys.\n\nExample:\n\n```bash\nbash \u003C\u003C'SCRIPT'\n${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Flib\u002Frailway-api.sh \\\n  'mutation stageChanges($environmentId: String!, $input: EnvironmentConfig!, $merge: Boolean) {\n    environmentStageChanges(environmentId: $environmentId, input: $input, merge: $merge) { id }\n  }' \\\n  '{\"environmentId\": \"ENV_ID\", \"input\": {\"services\": {\"SERVICE_ID\": {\"build\": {\"buildCommand\": \"npm run build\"}}}}, \"merge\": true}'\nSCRIPT\n```\n\n### Delete Service\n\nUse `isDeleted: true`:\n\n```bash\nbash \u003C\u003C'SCRIPT'\n${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Flib\u002Frailway-api.sh \\\n  'mutation stageChanges($environmentId: String!, $input: EnvironmentConfig!, $merge: Boolean) {\n    environmentStageChanges(environmentId: $environmentId, input: $input, merge: $merge) { id }\n  }' \\\n  '{\"environmentId\": \"ENV_ID\", \"input\": {\"services\": {\"SERVICE_ID\": {\"isDeleted\": true}}}, \"merge\": true}'\nSCRIPT\n```\n\n## Stage and Apply Immediately\n\nFor single changes that should deploy right away, use `environmentPatchCommit` to stage and apply in one call.\n\n```graphql\nmutation environmentPatchCommit(\n  $environmentId: String!\n  $patch: EnvironmentConfig\n  $commitMessage: String\n) {\n  environmentPatchCommit(\n    environmentId: $environmentId\n    patch: $patch\n    commitMessage: $commitMessage\n  )\n}\n```\n\nExample:\n\n```bash\nbash \u003C\u003C'SCRIPT'\n${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Flib\u002Frailway-api.sh \\\n  'mutation patchCommit($environmentId: String!, $patch: EnvironmentConfig, $commitMessage: String) {\n    environmentPatchCommit(environmentId: $environmentId, patch: $patch, commitMessage: $commitMessage)\n  }' \\\n  '{\"environmentId\": \"ENV_ID\", \"patch\": {\"services\": {\"SERVICE_ID\": {\"variables\": {\"API_KEY\": {\"value\": \"secret\"}}}}}, \"commitMessage\": \"add API_KEY\"}'\nSCRIPT\n```\n\n**When to use:** Single change, no need to batch, user wants immediate deployment.\n\n**When NOT to use:** Multiple related changes to batch, or user says \"stage only\" \u002F \"don't deploy yet\".\n\n## Apply Staged Changes\n\nCommit staged changes and trigger deployments.\n\n**Note:** There is no `railway apply` CLI command. Use the mutation below or direct users to the web UI.\n\n### Apply Mutation\n\n**Mutation name: `environmentPatchCommitStaged`**\n\n```graphql\nmutation environmentPatchCommitStaged(\n  $environmentId: String!\n  $message: String\n  $skipDeploys: Boolean\n) {\n  environmentPatchCommitStaged(\n    environmentId: $environmentId\n    commitMessage: $message\n    skipDeploys: $skipDeploys\n  )\n}\n```\n\nExample:\n\n```bash\nbash \u003C\u003C'SCRIPT'\n${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Flib\u002Frailway-api.sh \\\n  'mutation commitStaged($environmentId: String!, $message: String) {\n    environmentPatchCommitStaged(environmentId: $environmentId, commitMessage: $message)\n  }' \\\n  '{\"environmentId\": \"ENV_ID\", \"message\": \"add API_KEY variable\"}'\nSCRIPT\n```\n\n### Parameters\n\n| Field           | Type    | Default | Description                                 |\n| --------------- | ------- | ------- | ------------------------------------------- |\n| `environmentId` | String! | -       | Environment ID from status                  |\n| `message`       | String  | null    | Short description of changes                |\n| `skipDeploys`   | Boolean | false   | Skip deploys (only if user explicitly asks) |\n\n### Commit Message\n\nKeep very short - one sentence max. Examples:\n\n- \"set build command to fix npm error\"\n- \"add API_KEY variable\"\n- \"increase replicas to 3\"\n\nLeave empty if no meaningful description.\n\n### Default Behavior\n\n**Always deploy** unless user explicitly asks to skip. Only set `skipDeploys: true` if user says \"apply without deploying\", \"commit but don't deploy\", or \"skip deploys\".\n\nReturns a workflow ID (string) on success.\n\n## Auto-Apply Behavior\n\nBy default, **apply changes immediately**.\n\n### Flow\n\n**Single change:** Use `environmentPatchCommit` to stage and apply in one call.\n\n**Multiple changes or batching:** Use `environmentStageChanges` with `merge: true` for each change, then `environmentPatchCommitStaged` to apply.\n\n### When NOT to Auto-Apply\n\n- User explicitly says \"stage only\", \"don't deploy yet\", or similar\n- User is making multiple related changes that should deploy together\n\n**When you don't auto-apply, tell the user:**\n\n> Changes staged. Apply them at: https:\u002F\u002Frailway.com\u002Fproject\u002F{projectId}\n> Or ask me to apply them.\n\nGet `projectId` from `railway status --json` → `project.id`\n\n## Error Handling\n\n### Service Not Found\n\n```\nService \"foo\" not found in project. Available services: api, web, worker\n```\n\n### No Staged Changes\n\n```\nNo patch to apply\n```\n\nThere are no staged changes to commit. Stage changes first.\n\n### Invalid Configuration\n\nCommon issues:\n\n- `buildCommand` and `startCommand` cannot be identical\n- `buildCommand` only valid with NIXPACKS builder\n- `dockerfilePath` only valid with DOCKERFILE builder\n\n### No Permission\n\n```\nYou don't have permission to modify this environment. Check your Railway role.\n```\n\n### No Linked Project\n\n```\nNo project linked. Run `railway link` to link a project.\n```\n\n## Composability\n\n- **Create service**: Use railway-service skill\n- **View logs**: Use railway-deployment skill\n- **Add domains**: Use railway-domain skill\n- **Deploy local code**: Use railway-deploy skill\n","# Environment Configuration\n\nQuery, stage, and apply configuration changes for Railway environments.\n\n## Shell Escaping\n\n**CRITICAL:** When running GraphQL queries via bash, you MUST wrap in heredoc to prevent shell escaping issues:\n\n```bash\nbash \u003C\u003C'SCRIPT'\n${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Flib\u002Frailway-api.sh 'query ...' '{\"var\": \"value\"}'\nSCRIPT\n```\n\nWithout the heredoc wrapper, multi-line commands break and exclamation marks in GraphQL non-null types get escaped, causing query failures.\n\n## When to Use\n\n- User wants to create a new environment\n- User wants to duplicate an environment (e.g., \"copy production to staging\")\n- User wants to switch to a different environment\n- User asks about current build\u002Fdeploy settings, variables, replicas, health checks, domains\n- User asks to change service source (Docker image, branch, commit, root directory)\n- User wants to connect a service to a GitHub repo\n- User wants to deploy from a GitHub repo (create empty service first via railway-new skill, then use this)\n- User asks to change build or start command\n- User wants to add\u002Fupdate\u002Fdelete environment variables\n- User wants to change replica count or configure health checks\n- User asks to delete a service, volume, or bucket\n- User says \"apply changes\", \"commit changes\", \"deploy changes\"\n- Auto-fixing build errors detected in logs\n\n## Create Environment\n\nCreate a new environment in the linked project:\n\n```bash\nrailway environment new \u003Cname>\n```\n\nDuplicate an existing environment:\n\n```bash\nrailway environment new staging --duplicate production\n```\n\nWith service-specific variables:\n\n```bash\nrailway environment new staging --duplicate production --service-variable api PORT=3001\n```\n\n## Switch Environment\n\nLink a different environment to the current directory:\n\n```bash\nrailway environment \u003Cname>\n```\n\nOr by ID:\n\n```bash\nrailway environment \u003Cenvironment-id>\n```\n\n## Get Context\n\n```bash\nrailway status --json\n```\n\nExtract:\n\n- `project.id` - for service lookup\n- `environment.id` - for the mutations\n- `service.id` - default service if user doesn't specify one\n\n### Resolve Service ID\n\nIf user specifies a service by name, query project services:\n\n```graphql\nquery projectServices($projectId: String!) {\n  project(id: $projectId) {\n    services {\n      edges {\n        node {\n          id\n          name\n        }\n      }\n    }\n  }\n}\n```\n\nMatch the service name (case-insensitive) to get the service ID.\n\n## Query Configuration\n\nFetch current environment configuration and staged changes.\n\n```graphql\nquery environmentConfig($environmentId: String!) {\n  environment(id: $environmentId) {\n    id\n    config(decryptVariables: false)\n    serviceInstances {\n      edges {\n        node {\n          id\n          serviceId\n        }\n      }\n    }\n  }\n  environmentStagedChanges(environmentId: $environmentId) {\n    id\n    patch(decryptVariables: false)\n  }\n}\n```\n\nExample:\n\n```bash\nbash \u003C\u003C'SCRIPT'\n${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Flib\u002Frailway-api.sh \\\n  'query envConfig($envId: String!) {\n    environment(id: $envId) { id config(decryptVariables: false) }\n    environmentStagedChanges(environmentId: $envId) { id patch(decryptVariables: false) }\n  }' \\\n  '{\"envId\": \"ENV_ID\"}'\nSCRIPT\n```\n\n### Response Structure\n\nThe `config` field contains current configuration:\n\n```json\n{\n  \"services\": {\n    \"\u003CserviceId>\": {\n      \"source\": { \"repo\": \"...\", \"branch\": \"main\" },\n      \"build\": { \"buildCommand\": \"npm run build\", \"builder\": \"NIXPACKS\" },\n      \"deploy\": {\n        \"startCommand\": \"npm start\",\n        \"multiRegionConfig\": { \"us-west2\": { \"numReplicas\": 1 } }\n      },\n      \"variables\": { \"NODE_ENV\": { \"value\": \"production\" } },\n      \"networking\": { \"serviceDomains\": {}, \"customDomains\": {} }\n    }\n  },\n  \"sharedVariables\": { \"DATABASE_URL\": { \"value\": \"...\" } }\n}\n```\n\nThe `patch` field in `environmentStagedChanges` contains pending changes. The effective configuration is the base `config` merged with the staged `patch`.\n\nFor complete field reference, see [reference\u002Fenvironment-config.md](..\u002Freference\u002Fenvironment-config.md).\n\nFor variable syntax and service wiring patterns, see [reference\u002Fvariables.md](..\u002Freference\u002Fvariables.md).\n\n## Get Rendered Variables\n\nThe GraphQL queries above return **unrendered** variables - template syntax like `${{shared.DOMAIN}}` is preserved. This is correct for management\u002Fediting.\n\nTo see **rendered** (resolved) values as they appear at runtime:\n\n```bash\n# Current linked service\nrailway variables --json\n\n# Specific service\nrailway variables --service \u003Cservice-name> --json\n```\n\n**When to use:**\n- Debugging connection issues (see actual URLs\u002Fports)\n- Verifying variable resolution is correct\n- Viewing Railway-injected values (RAILWAY_*)\n\n## Stage Changes\n\nStage configuration changes via the `environmentStageChanges` mutation. Use `merge: true` to automatically merge with existing staged changes.\n\n```graphql\nmutation stageEnvironmentChanges(\n  $environmentId: String!\n  $input: EnvironmentConfig!\n  $merge: Boolean\n) {\n  environmentStageChanges(\n    environmentId: $environmentId\n    input: $input\n    merge: $merge\n  ) {\n    id\n  }\n}\n```\n\n**Important:** Always use variables (not inline input) because service IDs are UUIDs which can't be used as unquoted GraphQL object keys.\n\nExample:\n\n```bash\nbash \u003C\u003C'SCRIPT'\n${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Flib\u002Frailway-api.sh \\\n  'mutation stageChanges($environmentId: String!, $input: EnvironmentConfig!, $merge: Boolean) {\n    environmentStageChanges(environmentId: $environmentId, input: $input, merge: $merge) { id }\n  }' \\\n  '{\"environmentId\": \"ENV_ID\", \"input\": {\"services\": {\"SERVICE_ID\": {\"build\": {\"buildCommand\": \"npm run build\"}}}}, \"merge\": true}'\nSCRIPT\n```\n\n### Delete Service\n\nUse `isDeleted: true`:\n\n```bash\nbash \u003C\u003C'SCRIPT'\n${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Flib\u002Frailway-api.sh \\\n  'mutation stageChanges($environmentId: String!, $input: EnvironmentConfig!, $merge: Boolean) {\n    environmentStageChanges(environmentId: $environmentId, input: $input, merge: $merge) { id }\n  }' \\\n  '{\"environmentId\": \"ENV_ID\", \"input\": {\"services\": {\"SERVICE_ID\": {\"isDeleted\": true}}}, \"merge\": true}'\nSCRIPT\n```\n\n## Stage and Apply Immediately\n\nFor single changes that should deploy right away, use `environmentPatchCommit` to stage and apply in one call.\n\n```graphql\nmutation environmentPatchCommit(\n  $environmentId: String!\n  $patch: EnvironmentConfig\n  $commitMessage: String\n) {\n  environmentPatchCommit(\n    environmentId: $environmentId\n    patch: $patch\n    commitMessage: $commitMessage\n  )\n}\n```\n\nExample:\n\n```bash\nbash \u003C\u003C'SCRIPT'\n${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Flib\u002Frailway-api.sh \\\n  'mutation patchCommit($environmentId: String!, $patch: EnvironmentConfig, $commitMessage: String) {\n    environmentPatchCommit(environmentId: $environmentId, patch: $patch, commitMessage: $commitMessage)\n  }' \\\n  '{\"environmentId\": \"ENV_ID\", \"patch\": {\"services\": {\"SERVICE_ID\": {\"variables\": {\"API_KEY\": {\"value\": \"secret\"}}}}}, \"commitMessage\": \"add API_KEY\"}'\nSCRIPT\n```\n\n**When to use:** Single change, no need to batch, user wants immediate deployment.\n\n**When NOT to use:** Multiple related changes to batch, or user says \"stage only\" \u002F \"don't deploy yet\".\n\n## Apply Staged Changes\n\nCommit staged changes and trigger deployments.\n\n**Note:** There is no `railway apply` CLI command. Use the mutation below or direct users to the web UI.\n\n### Apply Mutation\n\n**Mutation name: `environmentPatchCommitStaged`**\n\n```graphql\nmutation environmentPatchCommitStaged(\n  $environmentId: String!\n  $message: String\n  $skipDeploys: Boolean\n) {\n  environmentPatchCommitStaged(\n    environmentId: $environmentId\n    commitMessage: $message\n    skipDeploys: $skipDeploys\n  )\n}\n```\n\nExample:\n\n```bash\nbash \u003C\u003C'SCRIPT'\n${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Flib\u002Frailway-api.sh \\\n  'mutation commitStaged($environmentId: String!, $message: String) {\n    environmentPatchCommitStaged(environmentId: $environmentId, commitMessage: $message)\n  }' \\\n  '{\"environmentId\": \"ENV_ID\", \"message\": \"add API_KEY variable\"}'\nSCRIPT\n```\n\n### Parameters\n\n| Field           | Type    | Default | Description                                 |\n| --------------- | ------- | ------- | ------------------------------------------- |\n| `environmentId` | String! | -       | Environment ID from status                  |\n| `message`       | String  | null    | Short description of changes                |\n| `skipDeploys`   | Boolean | false   | Skip deploys (only if user explicitly asks) |\n\n### Commit Message\n\nKeep very short - one sentence max. Examples:\n\n- \"set build command to fix npm error\"\n- \"add API_KEY variable\"\n- \"increase replicas to 3\"\n\nLeave empty if no meaningful description.\n\n### Default Behavior\n\n**Always deploy** unless user explicitly asks to skip. Only set `skipDeploys: true` if user says \"apply without deploying\", \"commit but don't deploy\", or \"skip deploys\".\n\nReturns a workflow ID (string) on success.\n\n## Auto-Apply Behavior\n\nBy default, **apply changes immediately**.\n\n### Flow\n\n**Single change:** Use `environmentPatchCommit` to stage and apply in one call.\n\n**Multiple changes or batching:** Use `environmentStageChanges` with `merge: true` for each change, then `environmentPatchCommitStaged` to apply.\n\n### When NOT to Auto-Apply\n\n- User explicitly says \"stage only\", \"don't deploy yet\", or similar\n- User is making multiple related changes that should deploy together\n\n**When you don't auto-apply, tell the user:**\n\n> Changes staged. Apply them at: https:\u002F\u002Frailway.com\u002Fproject\u002F{projectId}\n> Or ask me to apply them.\n\nGet `projectId` from `railway status --json` → `project.id`\n\n## Error Handling\n\n### Service Not Found\n\n```\nService \"foo\" not found in project. Available services: api, web, worker\n```\n\n### No Staged Changes\n\n```\nNo patch to apply\n```\n\nThere are no staged changes to commit. Stage changes first.\n\n### Invalid Configuration\n\nCommon issues:\n\n- `buildCommand` and `startCommand` cannot be identical\n- `buildCommand` only valid with NIXPACKS builder\n- `dockerfilePath` only valid with DOCKERFILE builder\n\n### No Permission\n\n```\nYou don't have permission to modify this environment. Check your Railway role.\n```\n\n### No Linked Project\n\n```\nNo project linked. Run `railway link` to link a project.\n```\n\n## Composability\n\n- **Create service**: Use railway-service skill\n- **View logs**: Use railway-deployment skill\n- **Add domains**: Use railway-domain skill\n- **Deploy local code**: Use railway-deploy skill\n",{"name":5,"tags":24,"author":25,"license":15,"version":33,"description":7,"dependencies":34,"allowed-tools":36},[25,26,27,28,29,30,31,32],"Railway","Environment","Configuration","Variables","Build","Deploy","Infrastructure","Settings","1.0.0",[35],"railway-cli","Bash(railway:*)","main","f4a24bd1ab047411d4ae57ee9a96701a7706e779","claude-code-templates\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Frailway\u002Fenvironment","https:\u002F\u002Fgithub.com\u002Fcocyuhao\u002Fai-dev-tooling-research-archive","https:\u002F\u002Fgithub.com\u002Fcocyuhao","Beijing Wuzi University","2026-05-12 10:57:02",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add cocyuhao\u002Fai-dev-tooling-research-archive --skill railway-environment",{"tool":50,"command":51},"bunx","bunx skills add cocyuhao\u002Fai-dev-tooling-research-archive --skill railway-environment",{"tool":53,"command":54},"pnpm","pnpm dlx skills add cocyuhao\u002Fai-dev-tooling-research-archive --skill railway-environment","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcocyuhao\u002Fai-dev-tooling-research-archive\u002Fblob\u002Fmain\u002Fclaude-code-templates\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Frailway\u002Fenvironment\u002FSKILL.md",true,[],[59,66,74,81,88,95],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M72JQ593HE3SRJD3446CCKA8","web-access","所有联网操作必须通过此 skill 处理，包括：搜索、网页抓取、登录后操作、网络交互等。 触发场景：用户要求搜索信息、查看网页内容、访问需要登录的网站、操作网页界面、抓取社交媒体内容（小红书、微博、推特等）、读取动态渲染页面、以及任何需要真实浏览器环境的网络任务。","https:\u002F\u002Fgithub.com\u002Fcocyuhao\u002Fai-dev-tooling-research-archive\u002Fblob\u002Fmain\u002Fweb-access\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":70,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M72JKXJYFT2RBJ2HP5ZRA853","last30days","Multi-query social research across Reddit, X, YouTube, TikTok, Instagram, Hacker News, Polymarket, and the web. Intelligent query planning with Gemini\u002FOpenAI fallback.","https:\u002F\u002Fgithub.com\u002Fcocyuhao\u002Fai-dev-tooling-research-archive\u002Fblob\u002Fmain\u002Flast30days-skill\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fcocyuhao\u002Fai-dev-tooling-research-archive\u002Fblob\u002Fmain\u002Flast30days-skill\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M72JKMRQSD0ZY66KQ863HVY5","writing-plans","Use when you have a spec or requirements for a multi-step task. Creates comprehensive implementation plans with bite-sized tasks, exact file paths, and complete code examples.","https:\u002F\u002Fgithub.com\u002Fcocyuhao\u002Fai-dev-tooling-research-archive\u002Fblob\u002Fmain\u002Fhermes-agent\u002Fskills\u002Fsoftware-development\u002Fwriting-plans\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M72JKHCV8DT6VWSD4KS5YWT9","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code. Enforces RED-GREEN-REFACTOR cycle with test-first approach.","https:\u002F\u002Fgithub.com\u002Fcocyuhao\u002Fai-dev-tooling-research-archive\u002Fblob\u002Fmain\u002Fhermes-agent\u002Fskills\u002Fsoftware-development\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M72JKD7VX7EQM38R704F3KT1","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior. 4-phase root cause investigation — NO fixes without understanding the problem first.","https:\u002F\u002Fgithub.com\u002Fcocyuhao\u002Fai-dev-tooling-research-archive\u002Fblob\u002Fmain\u002Fhermes-agent\u002Fskills\u002Fsoftware-development\u002Fsystematic-debugging\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M72JKA9XXB92FS8JHPCYW8CM","subagent-driven-development","Use when executing implementation plans with independent tasks. Dispatches fresh delegate_task per task with two-stage review (spec compliance then code quality).","https:\u002F\u002Fgithub.com\u002Fcocyuhao\u002Fai-dev-tooling-research-archive\u002Fblob\u002Fmain\u002Fhermes-agent\u002Fskills\u002Fsoftware-development\u002Fsubagent-driven-development\u002FSKILL.md",[],[]]