deployment

deployment is a command for Claude Code from swesmith/davila7__claude-code-templates.734b8a50. It costs 0 tokens per session (789 once invoked), scanned A, a copy of deployment, MIT.

A basic production deployment setup for FastAPI, a Python framework for web APIs. It covers running the service with Uvicorn and packaging it in Docker, a tool for running applications in isolated containers.

In plain words
What is it for?
Use it to configure production settings, worker processes, Docker images, environment variables, a database connection, and Redis.
Why use it?
It provides the configuration and files needed to move a FastAPI application from local development toward a production server.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/swesmith/davila7__claude-code-templates.734b8a50/deployment
Clone the repo
git clone --depth 1 https://github.com/swesmith/davila7__claude-code-templates.734b8a50

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for deployment

README.md
[![agentmods](https://agentmods.dev/badge/commands/swesmith/davila7__claude-code-templates.734b8a50/deployment.svg)](https://agentmods.dev/commands/swesmith/davila7__claude-code-templates.734b8a50/deployment)
Your own site
<a href="https://agentmods.dev/commands/swesmith/davila7__claude-code-templates.734b8a50/deployment"><img src="https://agentmods.dev/badge/commands/swesmith/davila7__claude-code-templates.734b8a50/deployment.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 789 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00789
Opus 5 $0.00000 $0.00394
Sonnet 5 $0.00000 $0.00158
Haiku 4.5 $0.00000 $0.00079

Measured 3d ago against content hash 7c53b0039362, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

deployment scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

HEALTHCHECK CMD curl -f http://localhost:8000/health || exit 1
Origin

This is a copy

100% identical to deployment — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

cli-tool/templates/python/examples/fastapi-app/.claude/commands/deployment.md · 161 lines

How it starts

The opening of the file, as written. The whole thing — 161 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FastAPI Deployment

Basic production deployment setup for FastAPI applications.

Usage

# Run with Uvicorn
uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 4

# Docker deployment
docker build -t fastapi-app .
docker run -p 8000:8000 fastapi-app

Production Configuration

# app/core/config.py
from pydantic import BaseSettings
import os

class Settings(BaseSettings):
    """Production settings."""
    
    # App
    PROJECT_NAME: str = "FastAPI App"
    VERSION: str = "1.0.0"
    SECRET_KEY: str = os.getenv("SECRET_KEY", "dev-key")
    
    # Server
    HOST: str = "0.0.0.0"
    PORT: int = 8000
    WORKERS: int = 4
    
    # Database
    DATABASE_URL: str = os.getenv("DATABASE_URL", "sqlite:///./app.db")
    
    # Redis
    REDIS_URL: str = os.getenv("REDIS_URL", "redis://localhost:6379")
    
    class Config:
        env_file = ".env"

settings = Settings()

Docker Setup

# Dockerfile
FROM python:3.11-slim

WORKDIR /app

# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy app
COPY . .

# Create non-root user
RUN useradd -m appuser && chown -R appuser:appuser /app
USER appuser

EXPOSE 8000

# Health check
HEALTHCHECK CMD curl -f http://localhost:8000/health || exit 1

CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]

Docker Compose

# docker-compose.yml
version: '3.8'

services:
  app:
    build: .
    ports:
      - "8000:8000"
    environment:
      - DATABASE_URL=postgresql://user:pass@db:5432/fastapi_db
      - REDIS_URL=redis://redis:6379
    depends_on:
      - db
      - redis

  db:
    image: postgres:15
    environment:
      POSTGRES_DB: fastapi_db
      POSTGRES_USER: user
      POSTGRES_PASSWORD: password
    volumes:
      - postgres_data:/var/lib/postgresql/data

  redis:
    image: redis:7-alpine
    volumes:
      - redis_data:/data

volumes:
  postgres_data:
  redis_data:

Environment Variables

Read the full file on GitHub · 161 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 161 lines · 0 tokens per session scan A 7c53b0039362

Subscribe to this mod's changes

deployment is a command published in the GitHub repository swesmith/davila7__claude-code-templates.734b8a50 (2 stars, last pushed 8mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 789 tokens. A static security scan graded it A with 1 finding (makes network calls). It is 100% identical to deployment, differing in 0 lines, and is treated as a copy.