kevinbadi/social-agents/provision-railway
Claude Code and agent skill by kevinbadi/social-agents
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install kevinbadi/social-agents/provision-railwaySKILL.md
provision-railway
Build the user's Railway worker environment end to end: project, workspace upload, variables, public domain, health check. The user's only jobs were creating the Railway account and pasting an API token — everything else is yours. Uses the Railway CLI (railway), which uploads the LOCAL workspace directly — no GitHub connection needed.
Upload rule that bites: plain `railway up` silently DROPS gitignored files, and `social-agents/` is gitignored — that deploys a worker with no config, no skills, no automations ("0 automations scheduled"). `.railwayignore` does NOT override `.gitignore`. Every upload must be `railway up --no-gitignore`, which makes `.railwayignore` the only exclusion list.
Before anything
- Token: the CLI reads
RAILWAY_API_TOKEN. It's saved in~/.social-agents/credentials.jsonunderrailwayApiToken(onboarding put it there). Export it for your commands without ever printing it:
export RAILWAY_API_TOKEN=$(node -e "console.log(JSON.parse(require('fs').readFileSync(process.env.HOME+'/.social-agents/credentials.json','utf8')).railwayApiToken??'')") If empty, ask the human for a token from railway.app/account/tokens — an ACCOUNT token; a project-scoped token locks the CLI to that one existing project and provisioning will refuse to run there. NEVER echo, log, or write any token anywhere.
- CLI:
railway --version— if missing,npm install -g @railway/cli(ask first if global installs need sign-off). - AI credential for the cloud worker — check before asking. Onboarding usually already collected it:
~/.social-agents/credentials.json→workerAiKey(the value) +workerAiKind(which env var it belongs in:ANTHROPIC_API_KEYorCLAUDE_CODE_OAUTH_TOKEN). If present, USE IT silently — asking again makes it look like you lost their answer. Only if absent, ask the human for one of:ANTHROPIC_API_KEY, or aclaude setup-tokentoken (their local Claude login does not travel to the cloud). - Read
social-agents/social-agents.jsonfortimezone,worker.token(the generatedSOCIAL_AGENTS_WORKER_TOKEN), andworkspaceId. The CreatorOS key for THIS workspace is in~/.social-agents/credentials.json→workspaces[], the entry whoseworkspaceIdmatches. Never deploy another workspace's key. The workspace's folder name (workspaces/<slug>/) is its slug. Never ask about spend limits or lecture on API billing — the human knows how their credentials work.
Procedure
Run from the REPO ROOT (two folders up from the workspace: cd ../..). That's where the worker's code and Dockerfile.worker live. One worker runs ONE workspace; SOCIAL_AGENTS_WORKSPACE tells it which.
railway unlink(a 'not linked' error is fine), thenrailway init --name social-agents-<slug>— ALWAYS a fresh project; never reuse an existing one.- Set every variable in one shot (values from the sources above — compose the command yourself, never show values in your report):
railway variables --set "CREATOROS_API_KEY=<this workspace's key>" --set "<workerAiKind>=<workerAiKey>" --set "SOCIAL_AGENTS_WORKER_TOKEN=…" --set "TZ=<timezone>" --set "RAILWAY_DOCKERFILE_PATH=Dockerfile.worker" --set "SOCIAL_AGENTS_WORKSPACE=<slug>" The AI variable NAME comes from workerAiKind — a setup-token saved as CLAUDE_CODE_OAUTH_TOKEN must not be deployed as ANTHROPIC_API_KEY. RAILWAY_DOCKERFILE_PATH is what makes Railway build from Dockerfile.worker instead of autodetecting.
- Know what ships before uploading. With
--no-gitignore,.railwayignoreis the ONLY exclusion list — make sure it exists in the workspace root with at least:node_modules,.git,logs,creatoros,deploy,dist,.env(the Docker build runsnpm ciitself; a ~350MB node_modules upload chokes;.envmust never ship). What DOES ship, on purpose:src/+ package files +Dockerfile.worker(the code),workspaces/(config, skills, automations.json — gitignored, which is exactly why--no-gitignoreis required),templates/, andcontent-library/(media the posting automations publish — if it's huge, warn the human that every deploy re-uploads it). railway up --detach --no-gitignore— uploads the repo (with the workspaces) and builds. Watch withrailway logs --builduntil the build succeeds; on failure, read the error, fix, re-up. After the deploy, sanity-check the worker actually got the workspace:/healthshould list the expected automations, not 0.railway domain— generates the public URL. Capture it.railway status --json— capture the service id.- Save to
social-agents/social-agents.json:worker.url(the domain, with https://), andrailway.serviceId.worker.tokenshould already be there — if not, set it to the SOCIAL_AGENTS_WORKER_TOKEN you deployed. - Verify:
curl -s -H "Authorization: Bearer <worker token>" https://<domain>/health— expect"service":"social-agents-worker". Give the container a minute to boot before declaring failure; retry twice.
Judgment rules
- Secrets never appear in output. Mask everything as
…last4. Never write a secret into any repo file — variables live on Railway, tokens in ~/.social-agents. - ALWAYS a brand-new project:
railway unlinkfirst (ignore 'not linked' errors), thenrailway init --name social-agents-<slug>. NEVER link to or deploy onto any existing project — not a stale social-agents-worker from an earlier attempt, not an unrelated app, nothing. If init keeps failing, STOP and report the exact error to the human instead of retrying in a loop or hunting for an existing project to reuse. - If the build fails on the Dockerfile, check
RAILWAY_DOCKERFILE_PATHwas actually set before re-running. - Cost honesty: mention once in the final report that the service runs ~$5/mo on Hobby plus AI usage — nothing more; no billing lectures.
- Any step you cannot complete non-interactively (e.g., account not on a paid plan): stop, tell the human exactly what to click, and resume after.
Verification
/health responding with the schedule is the finish line — then open the loop: automations picked in chat land in social-agents/automations.json, and the deployed worker picks up file changes only at the NEXT deploy unless a volume is mounted — so after changing automations, run railway up --detach --no-gitignore again, or tell the human "redeploy to sync" in your report. Confirm the dashboard's Automations page shows the worker strip as up. Report: project name, domain, variables set (names only), and the verified health line.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingtemplates/skills/provision-railway/SKILL.md
Popularity
- Repository stars
- 55
- Repository forks
- 19
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kevinbadi/social-agents/provision-railway)