agentleFS
SwastikPandey1024SwastikPandey1024/agentic-engineering-os/.agents/skills/deployment/SKILL.md

deployment

Skill1 starsChanged 3 months agoMITView on GitHub

Production deployment to Render, Vercel, Streamlit Community Cloud, pre-flight environment checks, and post-deployment smoke testing.

  • Reads credentials
  • Installs packages

33 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use database, architecture and 6 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • mijunriSkill

    database

    数据库脚本与操作规范。脚本放在 db_scripts 目录,遵循查询优化、事务、安全等实践。

    Also in 3 projects that use this

  • AnthropicSkill

    architecture

    Create or evaluate an architecture decision record (ADR). Use when choosing between technologies (e.g., Kafka vs SQS), documenting a design decision with trade-offs and consequences, reviewing a system design proposal, or designing a new component from requirements and constraints.

    Also in 5 projects that use this

  • pproencaSkill

    refactoring

    Code refactoring best practices based on Martin Fowler's catalog and Clean Code principles. This skill should be used when refactoring existing code, improving code structure, reducing complexity, eliminating code smells, or reviewing code for maintainability. Triggers on tasks involving extract method, rename, decompose conditional, reduce coupling, or improve readability.

    Also in 3 projects that use this

  • 0xSeroSkill

    security

    Also in 3 projects that use this

  • NVIDIASkill

    testing

    Run Python and Rust tests for physicsnemo-curator using uv + pytest with coverage reporting via pytest-cov, and cargo-nextest for Rust tests. Includes benchmark workflows with pytest-benchmark and criterion.

    Also in 4 projects that use this

  • Microsoft AzureSkill

    git-workflow

    Squad branching model: dev-first workflow with insiders preview channel

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 3 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 29 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Use this skill when:

    line 10
  2. Very specific:

    Look for render.yaml, vercel.json, Procfile, .streamlit/config.toml.

    line 25
  3. Distinctive:

    Database Migration State: Ensure migrations are automated or run prior to serving live traffic.

    line 27
  4. Very specific:

    Create .streamlit/config.toml for theme and headless server configuration:

    line 115
  5. Very specific:

    Keep lightweight requirements.txt specifically for Streamlit Cloud (avoid bloated CUDA/torch libraries unless GPU instance is allocated).

    line 122
  6. Very specific:

    NEVER deploy without checking CORS configuration: Ensure backend allow_origins includes the production frontend domain (e.g.

    line 139
  7. Very specific:

    NEVER run destructive database syncs in production: Use non-destructive migration commands (alembic upgrade head or prisma migrate deploy), …

    line 141
  8. Distinctive:

    Run post-deployment smoke verification:

    line 148

“Common” is measured: kept by at least 6 in 10 of the 29 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Deployment Skill

1. When Should I Use This?

Use this skill when:

  • Deploying applications or services to cloud hosting platforms (Render, Vercel, Streamlit Community Cloud, Docker VPS).
  • Creating or updating deployment configuration files (render.yaml, vercel.json, deploy.sh).
  • Performing pre-flight deployment audits (environment variables, database migrations, CORS, build scripts).
  • Executing post-deployment smoke tests to verify real endpoint availability.

2. What Should I Inspect First?

  1. Target Platform & Service Type:
    • Render Web Service / Background Worker / Managed PostgreSQL.
    • Vercel Frontend SPA / Serverless API.
    • Streamlit Community Cloud Dashboard.
  2. Configuration Manifests:
    • Look for render.yaml, vercel.json, Procfile, .streamlit/config.toml.
  3. Environment Variable Parity: Cross-reference .env.example with platform dashboard secrets to ensure zero missing variables.
  4. Database Migration State: Ensure migrations are automated or run prior to serving live traffic.

3. What Workflow Should I Follow?

Local Test & Build Verification (Ensure clean build & test pass)
                   ↓
Environment Variable Audit (Compare .env.example with Target Env)
                   ↓
Generate / Validate Platform Manifest (render.yaml / vercel.json)
                   ↓
Database Migration Execution Strategy
                   ↓
Deploy Artifact / Trigger Git-based Cloud Build
                   ↓
Post-Deployment Smoke Test (Live Health Check & Endpoint Verification)

Render Blueprint Configuration (render.yaml)

# render.yaml
services:
  # FastAPI Backend Service
  - type: web
    name: app-backend
    env: python
    region: singapore
    plan: free
    buildCommand: pip install --upgrade pip && pip install -r requirements.txt
    startCommand: uvicorn app.main:app --host 0.0.0.0 --port $PORT
    healthCheckPath: /api/v1/health
    envVars:
      - key: PYTHON_VERSION
        value: 3.12.0
      - key: ENVIRONMENT
        value: production
      - key: DATABASE_URL
        fromDatabase:
          name: app-postgres
          property: connectionString

  # React Frontend SPA (or static site)
  - type: web
    name: app-frontend
    env: static
    region: singapore
    plan: free
    buildCommand: cd frontend && npm ci && npm run build
    staticPublishPath: ./frontend/dist
    routes:
      - type: rewrite
        source: /*
        destination: /index.html
    envVars:
      - key: VITE_API_BASE_URL
        value: https://app-backend.onrender.com

databases:
  - name: app-postgres
    plan: free
    region: singapore

Vercel SPA Routing Configuration (vercel.json)

{
  "rewrites": [
    { "source": "/api/(.*)", "destination": "https://your-backend.onrender.com/api/$1" },
    { "source": "/(.*)", "destination": "/index.html" }
  ],
  "headers": [
    {
      "source": "/(.*)",
      "headers": [
        { "key": "X-Content-Type-Options", "value": "nosniff" },
        { "key": "X-Frame-Options", "value": "DENY" }
      ]
    }
  ]
}

Streamlit Deployment Checklist

  1. Create .streamlit/config.toml for theme and headless server configuration:
    [server]
    headless = true
    enableCORS = false
    enableXsrfProtection = true
  2. Keep lightweight requirements.txt specifically for Streamlit Cloud (avoid bloated CUDA/torch libraries unless GPU instance is allocated).

4. What Decisions Should I Make?

Platform ChoiceIdeal Use-Case
RenderFullstack web apps (Dockerized FastAPI backend, PostgreSQL database, background workers).
VercelHigh-performance React/Vite SPAs and Next.js frontends with global edge CDN.
Streamlit CloudInteractive ML prototypes, data forecasting dashboards, internal analytical tools.
Docker VPSSelf-hosted multi-container systems needing custom GPU/CPU allocation (Ollama + OCR + FAISS).

5. What Should I Avoid?

  • NEVER deploy without checking CORS configuration: Ensure backend allow_origins includes the production frontend domain (e.g. https://myapp.vercel.app).
  • NEVER claim deployment succeeded without testing live URLs: You must ping the live production URL and verify 200 OK.
  • NEVER run destructive database syncs in production: Use non-destructive migration commands (alembic upgrade head or prisma migrate deploy), never db push --force-reset.
  • NEVER rely on ephemeral filesystem for persistent files: Deployments on Render/Vercel have ephemeral disks; use S3, Supabase Storage, or mounted Docker volumes for persistent uploads.

6. How Should I Verify Success?

Run post-deployment smoke verification:

# 1. Health check probe & payload assertion (Cross-Platform Python)
python -c "
import urllib.request, json
url = 'https://app-backend.onrender.com/api/v1/health'
try:
    with urllib.request.urlopen(url, timeout=10) as res:
        assert res.status == 200, f'Status {res.status}'
        data = json.loads(res.read().decode('utf-8'))
        assert data.get('status') == 'ok', f'Unexpected: {data}'
        print('Deployment Live Smoke Test: PASSED (200 OK)')
except Exception as e:
    print(f'Deployment Smoke Test FAILED: {e}')
"

# 2. Check frontend SPA response headers
curl -I https://myapp.vercel.app/

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.