jthomas27/beyondtomorrow/service-auth
Claude Code and agent skill by jthomas27/beyondtomorrow
- community
Checking that the SKILL.md file is still in the repository.
Authenticate and verify access to Railway, Ghost, Hostinger (IMAP/SMTP), GitHub, and LinkedIn before running scripts or pipeline operations. Use when: accessing Railway variables, publishing to Ghost, checking email credentials, calling GitHub Models API, refreshing LinkedIn tokens, setting up a new environment, or debugging a 401/403/connection error on any of these services.
Install
npx vskill@latest install jthomas27/beyondtomorrow/service-authSKILL.md
The same SKILL.md was published earlier as jthomas27/beyondtomorrow/service-auth.
Service Authentication
Establishes and verifies credentials for all four external services used by the BeyondTomorrow.World pipeline. Always run this skill before executing scripts that touch any of these services.
Credential Sources (Priority Order)
Credentials are NEVER hardcoded. They are read in this order:
- `.env` at the project root (gitignored) — primary source for local development
- `~/.railway/config.json` — Railway CLI session token (fallback for Railway only)
- Environment variables already exported in the shell
All sensitive values live in .env. The file is gitignored and never committed.
Required .env Variables
Procedure
Step 1 — Load and verify credentials
Run the auth check script:
Where [service] is optional: railway, ghost, hostinger, or github. Omit to check all.
The script will:
- Load credentials from
.env(never from hardcoded values) - Test a live connection to each service
- Report ✓ / ✗ with a clear message for each
- Exit non-zero if any check fails
Step 2 — Fix failures
| Error | Fix | |
|---|---|---|
RAILWAY_API_TOKEN not set | Go to railway.app/account/tokens → Create Token (personal) → paste into .env as RAILWAY_API_TOKEN | |
Railway: Unauthorized / Project Token not found | The token is in the wrong variable (personal tokens go in RAILWAY_API_TOKEN, not RAILWAY_TOKEN) or is expired — create a new personal token at railway.app/account/tokens | |
Ghost: 401 Unauthorized | GHOST_ADMIN_KEY wrong or expired — copy fresh key from Ghost Admin → Settings → Integrations | |
Ghost: 403 Forbidden | Using urllib — always use httpx for Ghost calls | |
Ghost settings API: 501 Not Implemented | Custom integration keys cannot edit settings — use session auth via node scripts/inject-code.js. Requires GHOST_ADMIN_EMAIL + GHOST_ADMIN_PASSWORD in .env (owner account credentials, same as Ghost Admin login). | |
Ghost: HTTP 530 / 521 / timeout | Railway Ghost service is down — restart it at railway.app → caring-alignment → ghost service → Deployments → Restart. The auth check retries 3× automatically. | |
Hostinger IMAP: auth failed | EMAIL_PASS wrong — verify in Hostinger webmail settings | |
Hostinger SMTP: auth failed | Set SMTP_USER and SMTP_PASS explicitly in .env if they differ from IMAP credentials | |
GitHub: 401 | GITHUB_TOKEN expired or missing models:read scope — regenerate at github.com/settings/tokens, then follow Rotating the GitHub PAT below | |
LinkedIn: 401 | LINKEDIN_ACCESS_TOKEN expired (60-day TTL) — re-run scripts/linkedin_auth.py to refresh | |
LinkedIn: 403 | Missing OAuth scope — re-run scripts/linkedin_auth.py; approve w_member_social | |
LinkedIn: pipeline warns token expires soon | Token expires within 7 days — re-run scripts/linkedin_auth.py before expiry to avoid downtime |
Step 3 — Proceed
Only proceed with the original task once all required services report ✓.
Rotating the GitHub PAT
The GITHUB_TOKEN must be kept in sync across three locations. Update all three every time the PAT is regenerated.
1. Generate a new PAT
Go to github.com/settings/tokens → Fine-grained tokens → Generate new token. Required scope: models:read. Set an expiry that suits your rotation schedule. Copy the full token — it is only shown once.
2. Update .env (local)
Open .env and replace the GITHUB_TOKEN value:
3. Update Railway — ghost service
Updating a Railway variable triggers an automatic redeploy of that service. Ghost will be briefly unavailable (~30–60s) while it restarts. Monitor with:```bashcurl -s -o /dev/null -w "%{http_code}\n" https://beyondtomorrow.world```Wait for200before proceeding.
4. Update Railway — email-worker service
5. Verify all three are in sync
All three should show the same token prefix.
6. Run auth check
Expect: ✓ GitHub Models 43 models available
Railway Project Reference
| Item | Value | |
|---|---|---|
| Project | caring-alignment | |
| Project ID | 752fdaea-fd96-4521-bec6-b7d5ef451270 | |
| Environment | production (c9dfebe4-097a-4151-be37-2b1fcd414e74) | |
| Ghost service ID | 0daf496c-e14f-41d4-b89b-3624a778c99d | |
| email-worker service ID | 15b13afb-8515-49e9-ab38-7e138069064f (Python pipeline daemon — the service to redeploy for code/deps changes) | |
| Other services | pgvector, MySQL (managed; IDs via railway status --json) | |
| Database proxy | caboose.proxy.rlwy.net:21688 — always use this; never overwrite with the Railway internal URL |
CLI auth: export the personal token asRAILWAY_API_TOKEN(notRAILWAY_TOKEN). Link once withrailway link --project 752fdaea-fd96-4521-bec6-b7d5ef451270 --environment production, thenrailway status,railway redeploy --service <id>, etc. work.
The Railway GraphQL API returns 403 on this project — use the CLI for all variable reads/writes.
Security Rules
- Never hardcode credentials in scripts, notebooks, or source files
- Never commit `.env` — verify it is in
.gitignorebefore anygit add - Never log full credential values — mask after first 8 chars:
val[:8] + "..." - Never use `urllib` for Ghost — Cloudflare blocks it with 403; always use
httpx - Railway token type: use a personal token (railway.app/account/tokens) in `RAILWAY_API_TOKEN`. Do not use a project token (
RAILWAY_TOKEN) — project tokens cannot read variables across services and failwhoami - Rotate tokens if they are accidentally logged, pasted in chat, or pushed to git
Service Reference
| Service | Auth method | Key variable | Notes | |
|---|---|---|---|---|
| Railway | Personal token via CLI | RAILWAY_API_TOKEN | Personal/account token from railway.app/account/tokens. Must be `RAILWAY_API_TOKEN`, not `RAILWAY_TOKEN` (the latter is for project tokens). GraphQL API returns 403 — always use the Railway CLI instead | |
| Ghost | HMAC-SHA256 JWT (5-min expiry) | GHOST_ADMIN_KEY | Generate fresh per request; use httpx | |
| Hostinger IMAP | Plain login over IMAP4_SSL | EMAIL_USER + EMAIL_PASS | Port 993, imap.hostinger.com | |
| Hostinger SMTP | STARTTLS login | SMTP_USER + SMTP_PASS | Port 587, smtp.hostinger.com; defaults to IMAP creds | |
| GitHub Models | Bearer token | GITHUB_TOKEN | Fine-grained PAT with models:read scope; base URL: https://models.github.ai/inference | |
| OAuth 2.0 Bearer token (60-day expiry) | LINKEDIN_ACCESS_TOKEN | Also requires LINKEDIN_PERSON_URN; refresh via scripts/linkedin_auth.py |
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingarchive/reference/copilot/2026-10-25/skills/service-auth/SKILL.md
Popularity
- 7-day trend score
- 0
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/jthomas27/beyondtomorrow/service-auth)