skills/deployment-patterns/SKILL.md
Deploy projects to Vercel, Railway, or Docker with platform-specific best practices. Use when deploying applications, configuring deployment settings, debugging deployment failures, or setting up CI/CD pipelines. Triggers on "deploy to vercel", "railway deployment", "docker build", "deployment failed", "configure vercel.json".
npx skillsauth add scientiacapital/scientia-superpowers deployment-patternsInstall 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.
Deploy to Vercel, Railway, or Docker following proven patterns from 98+ projects.
Choose based on project type:
| Project Type | Platform | Reason | |--------------|----------|--------| | Next.js frontend | Vercel | Native support, edge functions | | Python backend | Railway | Nixpacks, health checks | | ML/GPU workloads | RunPod | GPU access, vLLM | | Local development | Docker | Consistent environment |
{
"framework": "nextjs",
"installCommand": "cd frontend && npm install",
"buildCommand": "cd frontend && npm run build",
"outputDirectory": "frontend/.next"
}
Set in Vercel Dashboard or CLI:
vercel env add VITE_SUPABASE_URL production
vercel env add VITE_SUPABASE_ANON_KEY production
For preview deployments, use preview scope.
Add to frontend/vercel.json:
{
"rewrites": [
{ "source": "/(.*)", "destination": "/" }
]
}
# Production
vercel --prod
# Preview
vercel
{
"$schema": "https://railway.com/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"buildCommand": "poetry install --no-dev"
},
"deploy": {
"startCommand": "poetry run python -m src.vozlux.main",
"healthcheckPath": "/health",
"healthcheckTimeout": 300,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 3
}
}
Railway requires manual dashboard configuration for sensitive vars:
Common variables for Python backends:
SUPABASE_URL
SUPABASE_SERVICE_KEY
ANTHROPIC_API_KEY
GOOGLE_API_KEY
DEEPSEEK_API_KEY
TWILIO_ACCOUNT_SID
TWILIO_AUTH_TOKEN
Always implement /health:
@app.get("/health")
async def health():
return {"status": "healthy", "timestamp": datetime.utcnow().isoformat()}
# Build stage
FROM python:3.11-slim as builder
WORKDIR /app
COPY pyproject.toml poetry.lock ./
RUN pip install poetry && poetry export -f requirements.txt > requirements.txt
# Runtime stage
FROM python:3.11-slim
WORKDIR /app
COPY --from=builder /app/requirements.txt .
RUN pip install -r requirements.txt
COPY src/ ./src/
CMD ["python", "-m", "src.main"]
version: '3.8'
services:
app:
build: .
ports:
- "8000:8000"
env_file:
- .env
volumes:
- ./src:/app/src
Before any deployment:
npm test or pytest).env.examplenpm run build or poetry build)vercel logshealthcheckTimeoutdocker build -t test .docker run -it testFor GitHub Actions, use:
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-args: '--prod'
development
Master Supabase patterns for migrations, RLS policies, pgvector, and authentication. Use when creating database schemas, writing migrations, implementing row-level security, setting up auth, or debugging Supabase issues. Triggers on "supabase migration", "RLS policy", "row level security", "pgvector", "supabase auth", "magic link".
testing
GTM workflows for revenue acceleration across Scientia projects. Use for demo preparation, sales outreach, battle cards, pricing strategy, and revenue tracking. Triggers on "revenue focus", "prepare demo", "sales outreach", "battle card", "GTM strategy", "pricing", "tier-1 projects".
testing
Implement cost-optimized LLM routing with NO OpenAI. Use tiered model selection (DeepSeek, Haiku, Sonnet) to achieve 70-90% cost savings. Triggers on "LLM costs", "model selection", "cost optimization", "which model", "DeepSeek", "Claude pricing", "reduce AI costs".
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.