This skill should be used when the user asks about resource usage, CPU, memory, network, disk, or service performance. Covers questions like "how much memory is my service using" or "is my service slow".
View on GitHubrailwayapp/railway-skills
railway
January 20, 2026
Select agents to install to:
npx add-skill https://github.com/railwayapp/railway-skills/blob/main/plugins/railway/skills/metrics/SKILL.md -a claude-code --skill metricsInstallation paths:
.claude/skills/metrics/# Service Metrics
Query resource usage metrics for Railway services.
## When to Use
- User asks "how much memory is my service using?"
- User asks about CPU usage, network traffic, disk usage
- User wants to debug performance issues
- User asks "is my service healthy?" (combine with `service` skill)
## Prerequisites
Get environmentId and serviceId from linked project:
```bash
railway status --json
```
Extract:
- `environment.id` → environmentId
- `service.id` → serviceId (optional - omit to get all services)
## MetricMeasurement Values
| Measurement | Description |
|-------------|-------------|
| CPU_USAGE | CPU usage (cores) |
| CPU_LIMIT | CPU limit (cores) |
| MEMORY_USAGE_GB | Memory usage in GB |
| MEMORY_LIMIT_GB | Memory limit in GB |
| NETWORK_RX_GB | Network received in GB |
| NETWORK_TX_GB | Network transmitted in GB |
| DISK_USAGE_GB | Disk usage in GB |
| EPHEMERAL_DISK_USAGE_GB | Ephemeral disk usage in GB |
| BACKUP_USAGE_GB | Backup usage in GB |
## MetricTag Values (for groupBy)
| Tag | Description |
|-----|-------------|
| DEPLOYMENT_ID | Group by deployment |
| DEPLOYMENT_INSTANCE_ID | Group by instance |
| REGION | Group by region |
| SERVICE_ID | Group by service |
## Query
```graphql
query metrics(
$environmentId: String!
$serviceId: String
$startDate: DateTime!
$endDate: DateTime
$sampleRateSeconds: Int
$averagingWindowSeconds: Int
$groupBy: [MetricTag!]
$measurements: [MetricMeasurement!]!
) {
metrics(
environmentId: $environmentId
serviceId: $serviceId
startDate: $startDate
endDate: $endDate
sampleRateSeconds: $sampleRateSeconds
averagingWindowSeconds: $averagingWindowSeconds
groupBy: $groupBy
measurements: $measurements
) {
measurement
tags {
deploymentInstanceId
deploymentId
serviceId
region
}
values {
ts
value
}
}
}
```
## Example: Last Hour CPU and Memory
Use heredoc to avoid shell escaping issues:
```bash
bash <<'