Memstack Deployment Railway Deploy logo

Memstack Deployment Railway Deploy

Community
cwinvestments
memstack-deployment-railway-deploy

Use this skill when the user says 'deploy to Railway', 'Railway setup', 'railway-deploy', or needs to deploy a Node.js, Python, or Docker application to Railway with environment variables, custom domains, and monitoring. Do NOT use for Netlify, Vercel, or Hetzner deployments.

Overview

Publishercwinvestments
Repositorymemstack
Skill namememstack-deployment-railway-deploy
Stars
425
Forks
45
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by cwinvestments on GitHub. Read the source before you install it.

Installation

Install the Memstack Deployment Railway Deploy AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/cwinvestments/memstack/tree/master/skills/deployment/railway-deploy
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/cwinvestments/memstack.git /tmp/memstack
mkdir -p .claude/skills
cp -r /tmp/memstack/skills/deployment/railway-deploy .claude/skills/memstack-deployment-railway-deploy
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Memstack Deployment Railway Deploy in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Memstack Deployment Railway Deploy on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Memstack Deployment Railway Deploy is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

🚂 Railway Deploy: Pre-flight check and deploy to Railway...

Validates project configuration, environment variables, and deployment readiness before pushing to Railway.

Activation

When this skill activates, output:

🚂 Railway Deploy: Running pre-flight checks...

Then execute the protocol below.

ContextStatus
User says "deploy to railway" or "railway deploy"ACTIVE
User says "ship it" or "deploy backend" with a Railway projectACTIVE
Preparing a backend/fullstack app for productionACTIVE
Deploying to Netlify, Vercel, or other non-Railway platformDORMANT
Discussing Railway pricing or features generallyDORMANT

Anti-patterns

TrapReality Check
"I'll just railway up and see what happens"Pre-flight catches 90% of deploy failures. Check first.
"Environment vars are probably fine"Missing vars are the #1 cause of Railway deploy failures. Verify every one.
"It works locally so it'll work on Railway"localhost URLs, SQLite paths, and file:// references all break in production.
"I'll fix the Dockerfile later"Railway's nixpacks auto-detect fails on monorepos and custom setups. Define build explicitly.
"The database connection works"Railway internal networking uses *.railway.internal hostnames. External URLs add latency and cost.

Protocol

Step 1: Detect Project Type

Identify the project framework and runtime:

bash
# Check for framework indicators
ls package.json pyproject.toml requirements.txt Cargo.toml go.mod 2>/dev/null
IndicatorProject Type
package.json with nextNext.js
package.json with express/fastify/honoNode.js API
pyproject.toml or requirements.txtPython (Django/Flask/FastAPI)
Cargo.tomlRust
go.modGo

Report: Detected: [type] project

Step 2: Check Deployment Files

Verify Railway can build the project:

bash
# Check for explicit build configuration
ls Dockerfile Procfile nixpacks.toml railway.toml 2>/dev/null
FilePurposeRequired?
DockerfileExplicit container buildRecommended for complex projects
ProcfileProcess start commandOptional if start script exists
nixpacks.tomlNixpacks build configOptional: auto-detected
railway.tomlRailway-specific settingsOptional: build/deploy overrides

If none exist, check that nixpacks can auto-detect:

  • Node.js: package.json must have start script or main field
  • Python: Must have requirements.txt or pyproject.toml with dependencies

Flag if missing: No build configuration found. Recommend adding railway.toml or Dockerfile.

Step 3: Verify Environment Variables

Cross-reference what the app needs vs what Railway has:

bash
# Find required env vars
cat .env.example .env.sample 2>/dev/null | grep -v '^#' | grep '=' | cut -d= -f1

Check for these common categories:

CategoryVariables to Verify
DatabaseDATABASE_URL, POSTGRES_URL, REDIS_URL, MONGODB_URI
AuthJWT_SECRET, SESSION_SECRET, NEXTAUTH_SECRET, NEXTAUTH_URL
External APIsSTRIPE_SECRET_KEY, SENDGRID_API_KEY, AWS_ACCESS_KEY_ID
App ConfigNODE_ENV=production, PORT (Railway sets this automatically)
URLsFRONTEND_URL, BACKEND_URL, CORS_ORIGIN

Output: List each variable with status:

  • ✅ Set in .env.example, verify it's configured in Railway dashboard
  • ⚠️ Referenced in code but not in .env.example: add to Railway
  • ❌ Hardcoded value found: extract to environment variable

Remind user: "Set these in Railway dashboard → Variables tab. Never commit actual values."

Step 4: Verify Build and Start Commands

bash
# Node.js
cat package.json | grep -A2 '"scripts"' | grep -E '"(build|start|dev)"'

# Python
cat Procfile 2>/dev/null || cat pyproject.toml 2>/dev/null | grep -A5 '\[tool.poetry.scripts\]'

Verify:

  • Build command exists and produces output (e.g., npm run build → dist/ or .next/)
  • Start command uses production mode (not dev or nodemon)
  • Port reads from process.env.PORT or os.environ["PORT"]: Railway assigns this dynamically

Flag if: Start command uses hardcoded port (e.g., app.listen(3000) without PORT env fallback).

Step 5: Verify Database Connection Strings

If the project uses a database:

bash
# Search for connection patterns
grep -r "localhost:5432\|localhost:3306\|localhost:6379\|127.0.0.1" --include="*.ts" --include="*.js" --include="*.py" --include="*.env*" .

Railway internal networking rules:

  • ✅ ${{Postgres.DATABASE_URL}}: Railway reference variable
  • ✅ *.railway.internal:5432, internal hostname (no egress cost)
  • ❌ localhost:5432, won't resolve in Railway container
  • ❌ Public Railway URL with port, adds latency, uses egress bandwidth

Flag if: Any hardcoded localhost or 127.0.0.1 database URLs found.

Step 6: Check Health Check Endpoint

bash
# Search for common health check patterns
grep -rn "\/health\|\/healthz\|\/api\/health\|\/readyz" --include="*.ts" --include="*.js" --include="*.py" .

If no health endpoint exists, recommend adding one:

typescript
// Express/Fastify pattern
app.get('/health', (req, res) => {
  res.status(200).json({ status: 'ok', timestamp: new Date().toISOString() });
});

Configure in Railway: Settings → Deploy → Health Check Path → /health

Step 7: Pre-Deploy Checklist

Run the build locally to catch errors before deploying:

bash
# Build test
npm run build  # or equivalent

# Search for localhost references
grep -rn "localhost\|127\.0\.0\.1" --include="*.ts" --include="*.js" --include="*.py" . | grep -v node_modules | grep -v .git
CheckCommandPass Criteria
Build passesnpm run buildExit code 0, no errors
No hardcoded URLsgrep for localhostZero matches in source
Production env varsReview .env.exampleAll vars documented
Port configurationgrep for PORTReads from env, not hardcoded
Node versionCheck engines in package.jsonSpecified if needed
Git cleangit statusAll changes committed

Output pre-deploy summary:

🚂 Railway Deploy: Pre-flight Complete

Project: [name] ([type])
Build: ✅ passes
Env vars: ✅ 12 documented, verify in Railway dashboard
Database: ✅ uses Railway internal networking
Health check: ✅ /health endpoint configured
Localhost refs: ✅ none found
Port: ✅ reads from process.env.PORT

Ready to deploy. Run: railway up

Step 8: Post-Deploy Verification

After deployment completes:

  1. Health check: curl https://[app].up.railway.app/health
  2. Logs: Check Railway dashboard → Deployments → View Logs for startup errors
  3. Database: Verify migrations ran (check logs for migration output)
  4. Environment: Confirm NODE_ENV=production is active

Rollback plan:

  • Railway keeps previous deployments. Go to Deployments → click previous successful deploy → Rollback
  • Or via CLI: railway rollback

If deploy fails:

  1. Check build logs first, dependency or build script errors
  2. Check runtime logs, missing env vars show as undefined/null errors
  3. Check health check timeout, app may be starting slowly (increase timeout in Settings)
  4. Verify Railway service is connected to correct GitHub branch

Level History

  • Lv.1: Base: Project detection, env var verification, build validation, database connection checks, health endpoint, pre/post-deploy checklists. Based on AdminStack, DeedStack, AlgoStack, and EpsteinScan Railway deployments. (Origin: MemStack Pro v3.2, Mar 2026)

Frequently asked questions

What does the Memstack Deployment Railway Deploy AI skill do?

Use this skill when the user says 'deploy to Railway', 'Railway setup', 'railway-deploy', or needs to deploy a Node.js, Python, or Docker application to Railway with environment variables, custom domains, and monitoring. Do NOT use for Netlify, Vercel, or Hetzner deployments.

Why use Memstack Deployment Railway Deploy on TypingMind?

Because you install it once and use it with any model. Memstack Deployment Railway Deploy is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Memstack Deployment Railway Deploy in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/cwinvestments/memstack/tree/master/skills/deployment/railway-deploy. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Memstack Deployment Railway Deploy?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Memstack Deployment Railway Deploy?

As many as you like. As long as a model supports skills, you can use Memstack Deployment Railway Deploy with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Memstack Deployment Railway Deploy AI skill free?

Yes. It is published on GitHub by cwinvestments under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇