.claude/skills/railway-auth/SKILL.md
Railway authentication and token management. Use when logging into Railway, creating API tokens, setting up CI/CD authentication, or verifying Railway credentials.
npx skillsauth add adaptationio/skrillz railway-authInstall 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.
Manage Railway authentication for CLI, API, and CI/CD workflows.
Railway supports multiple authentication methods for different use cases:
Standard browser-based authentication for local development.
Command:
railway login
Process:
~/.railway/config.jsonVerification:
railway whoami
# Output: Logged in as: [email protected]
Use When: Local development, first-time setup
Device code authentication for headless environments.
Command:
railway login --browserless
Process:
Example Output:
To authenticate, visit: https://railway.app/cli-auth
Enter code: ABCD-1234
Waiting for authentication...
Use When:
Use API tokens for programmatic access and CI/CD.
Token Types:
| Type | Scope | Header | Use Case |
|------|-------|--------|----------|
| Account Token | All personal + team resources | Authorization: Bearer <TOKEN> | Full API access |
| Team Token | Team resources only | Team-Access-Token: <TOKEN> | Team automation |
| Project Token | Single environment | Project-Access-Token: <TOKEN> | Scoped deployments |
Creating Tokens:
CLI Authentication with Token:
# For Project Tokens
export RAILWAY_TOKEN=<your-project-token>
# For Account/Team Tokens
export RAILWAY_API_TOKEN=<your-account-or-team-token>
# Verify
railway whoami
API Authentication:
# Account Token
curl -H "Authorization: Bearer $RAILWAY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"query":"query { me { name email } }"}' \
https://backboard.railway.com/graphql/v2
# Project Token
curl -H "Project-Access-Token: $RAILWAY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"query":"query { projectToken { projectId } }"}' \
https://backboard.railway.com/graphql/v2
Use When: CI/CD pipelines, automation scripts, API integrations
Check current authentication status.
Commands:
# Check who you're logged in as
railway whoami
# Check current project context
railway status
# Verify token via API
curl -s -H "Authorization: Bearer $RAILWAY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"query":"query { me { name } }"}' \
https://backboard.railway.com/graphql/v2
Troubleshooting Auth Issues:
| Issue | Solution |
|-------|----------|
| "Not logged in" | Run railway login |
| "Not Authorized" (API) | Check token type matches header |
| Token expired | Create new token at railway.com/account/tokens |
| Wrong project context | Run railway link to re-link project |
name: Deploy to Railway
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Railway CLI
run: npm install -g @railway/cli
- name: Deploy
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
run: railway up --ci
Setup:
RAILWAY_TOKEN secret in GitHub repo settings--ci flag for non-interactive deploymentdeploy:
stage: deploy
image: node:20
script:
- npm install -g @railway/cli
- railway up --ci
variables:
RAILWAY_TOKEN: $RAILWAY_PROJECT_TOKEN
only:
- main
| Task | Command |
|------|---------|
| Login (browser) | railway login |
| Login (headless) | railway login --browserless |
| Check auth | railway whoami |
| Logout | railway logout |
| Set token (CLI) | export RAILWAY_TOKEN=xxx |
| API auth header | Authorization: Bearer <token> |
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.