home / skills / railwayapp / railway-skills / projects

This skill helps you manage Railway projects by listing, switching, renaming, and configuring settings for visibility and deployment options.

npx playbooks add skill railwayapp/railway-skills --skill projects

Review the files below or copy the command above to add this skill to your agents.

Files (6)
SKILL.md
3.2 KB
---
name: projects
description: This skill should be used when the user wants to list all projects, switch projects, rename a project, enable/disable PR deploys, make a project public/private, or modify project settings.
allowed-tools: Bash(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)

```bash
railway list --json
```

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

## List Workspaces

```bash
railway whoami --json
```

Returns user info including all workspaces the user belongs to.

## Switch Project

Link a different project to the current directory:

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

Or interactively:

```bash
railway link
```

After switching, use `status` skill to see project details.

## Update Project

Modify project settings via GraphQL API.

### Get Project ID

```bash
railway status --json
```

Extract `project.id` from the response.

### Update Mutation

```bash
bash <<'SCRIPT'
scripts/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:**
```bash
scripts/railway-api.sh '<mutation>' '{"id": "uuid", "input": {"name": "new-name"}}'
```

**Enable PR deploys:**
```bash
scripts/railway-api.sh '<mutation>' '{"id": "uuid", "input": {"prDeploys": true}}'
```

**Make project public:**
```bash
scripts/railway-api.sh '<mutation>' '{"id": "uuid", "input": {"isPublic": true}}'
```

**Multiple fields:**
```bash
scripts/railway-api.sh '<mutation>' '{"id": "uuid", "input": {"name": "new-name", "prDeploys": true}}'
```

## Composability

- **View project details**: Use `status` skill
- **Create new project**: Use `new` skill
- **Manage environments**: Use `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.
```

Overview

This skill manages Railway projects: listing projects and workspaces, switching or linking a project to the current directory, renaming projects, toggling PR deploys, and changing public/private visibility. Use it to inspect and modify project settings safely via the Railway CLI and GraphQL API.

How this skill works

The skill runs concise Railway CLI commands (railway list --json, railway whoami --json, railway link, railway status --json) to collect essential project and workspace fields. For updates it calls the Railway GraphQL API via a helper script (scripts/railway-api.sh) using the projectUpdate mutation and ProjectUpdateInput fields like name, prDeploys, and isPublic. It returns simplified summaries and actionable commands rather than full JSON dumps.

When to use it

  • When you want a concise list of projects or workspaces you belong to
  • When you need to switch or link a different project to the current directory
  • When renaming a project or updating description and visibility
  • When enabling or disabling PR deploys or bot PR environments
  • When checking project settings before running status or environment commands

Best practices

  • Run railway list --json in a subagent and return only id and name fields to avoid huge JSON payloads
  • Get the current project id with railway status --json before making updates
  • Use scripts/railway-api.sh with the projectUpdate mutation to change settings atomically
  • Confirm authentication (railway login) before any CLI/API operation
  • After switching projects, run the status skill to verify the linked project and services

Example use cases

  • Show all projects across workspaces and return a short list of project id and name
  • Link the repository to a different project with railway link -p <project-id-or-name>
  • Rename a project using scripts/railway-api.sh with mutation and {"name": "new-name"}
  • Enable PR deploys by setting prDeploys:true in the ProjectUpdateInput mutation
  • Make a project public or private by setting isPublic:true/false via the update mutation

FAQ

What if the CLI returns 'Not authenticated'?

Run railway login to authenticate, then retry the requested command.

How do I find the project ID to update?

Run railway status --json and extract project.id from the response.

What if I get 'Project not found'?

Run railway list to confirm available projects and use the exact id or name to link or update.

What if I lack permissions to modify a project?

Check your Railway role for that project and request appropriate permissions from a workspace admin.