.claude/skills/railway-api/SKILL.md
Railway.com GraphQL API automation for projects, services, deployments, and environment variables. Use when automating Railway operations, querying project data, managing deployments, setting variables via API, or integrating Railway into workflows.
npx skillsauth add adaptationio/skrillz railway-apiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Comprehensive reference for Railway.com GraphQL API v2 automation including authentication, queries, mutations, and workflow automation.
The Railway GraphQL API enables programmatic access to all Railway platform features:
API Endpoint: https://backboard.railway.com/graphql/v2
Railway supports three token types with different scopes:
| Token Type | Header | Scope | Use Case |
|------------|--------|-------|----------|
| Account | Authorization: Bearer <token> | All user resources | Personal automation |
| Team | Team-Access-Token: <token> | Team-specific resources | Team workflows |
| Project | Project-Access-Token: <token> | Single project only | CI/CD, project automation |
Get tokens: Use the railway-auth skill or Railway dashboard → Account Settings → Tokens
curl https://backboard.railway.com/graphql/v2 \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"query": "query { me { name email } }"}'
curl https://backboard.railway.com/graphql/v2 \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"query": "mutation($input: VariableUpsertInput!) { variableUpsert(input: $input) }",
"variables": {
"input": {
"projectId": "project-id",
"environmentId": "env-id",
"name": "API_KEY",
"value": "secret-value"
}
}
}'
query {
me {
id
name
email
avatar
isAdmin
}
}
query {
projects {
edges {
node {
id
name
description
createdAt
updatedAt
}
}
}
}
query GetProject($projectId: String!) {
project(id: $projectId) {
id
name
description
services {
edges {
node {
id
name
serviceInstances {
edges {
node {
id
environmentId
serviceId
}
}
}
}
}
}
environments {
edges {
node {
id
name
}
}
}
}
}
query GetVariables($projectId: String!, $environmentId: String!) {
variables(projectId: $projectId, environmentId: $environmentId) {
edges {
node {
name
value
}
}
}
}
mutation SetVariable($input: VariableUpsertInput!) {
variableUpsert(input: $input)
}
# Variables:
{
"input": {
"projectId": "your-project-id",
"environmentId": "your-env-id",
"name": "DATABASE_URL",
"value": "postgresql://..."
}
}
mutation TriggerDeployment($serviceId: String!, $environmentId: String!) {
deploymentTrigger(serviceId: $serviceId, environmentId: $environmentId) {
id
status
createdAt
}
}
graphql-endpoint.md - Complete API endpoint documentationauthentication.md - Comprehensive authentication guidecommon-queries.md - 15+ query examples with responsescommon-mutations.md - 15+ mutation examples with patternsquery-project.py - Python script for querying Railway APIset-variables.ts - TypeScript script for variable managementRailway API returns errors in this format:
{
"errors": [
{
"message": "Error message",
"extensions": {
"code": "ERROR_CODE"
}
}
]
}
Common errors:
UNAUTHORIZED - Invalid or expired tokenFORBIDDEN - Insufficient permissions for resourceNOT_FOUND - Resource doesn't existVALIDATION_ERROR - Invalid input dataBest practices:
errors field in response# Get project token from railway-auth
# Set deployment variables
# Trigger deployment
# Monitor deployment status
See scripts/ for complete automation examples.
// Define Railway resources in code
// Apply changes via GraphQL mutations
// Track state and changes
# Query deployment status
# Check resource usage
# Alert on failures
references/graphql-endpoint.md for endpoint detailsreferences/authentication.md for token setupreferences/common-queries.md for data retrievalreferences/common-mutations.md for operationsscripts/ for workflow examplesquery { me { name email } }query { projects { edges { node { id name } } } }variables query with projectId and environmentIddeployments with filtersvariableUpsert mutationdeploymentTrigger mutationserviceCreate mutationvariableDelete mutationSome GraphQL queries return "Problem processing request" even with valid tokens. This is a Railway API limitation, not a token issue.
Affected queries: deployment(id:), deploymentLogs, buildLogs, me.teams, teams
Workaround: Use Railway CLI for these operations:
railway list --json # Projects/teams
railway logs # Deployment/build logs
See api-limitations.md for full details.
development
Setup secure web-based terminal access to WSL2 from mobile/tablet via ttyd + ngrok/Cloudflare/Tailscale. One-command install, start, stop, status. Use when you need remote terminal access, web terminal, browser-based shell, or mobile access to WSL2 environment.
development
Complete development workflows where Claude writes the code while Gemini and Codex provide research, planning, reviews, and different perspectives. Claude remains the main developer. Use for complex projects requiring expert planning and multi-perspective reviews.
development
Systematic progress tracking for skill development. Manages task states (pending/in_progress/completed), updates in real-time, reports progress, identifies blockers, and maintains momentum. Use when tracking skill development, coordinating work, or reporting progress.
testing
Comprehensive testing workflow orchestrating functional testing, example validation, integration testing, and usability assessment. Sequential workflow for complete skill testing from examples through scenarios to integration validation. Use when conducting thorough testing, pre-deployment validation, ensuring skill functionality, or comprehensive quality checks.