django_devops
БесплатноБез исполняемых скриптовНе проверенEnterprise Django 6 DevOps — containerization, CI/CD, environment management, database deployment, monitoring, and production readiness checklist.
от diegosouzapw★ 68 звёзд на GitHubОб этом скилле
Django DevOps Skill
Purpose
Define and enforce DevOps standards for building, deploying, monitoring, and operating enterprise Django 6 systems with Strawberry GraphQL, SSE, Celery, Redis, and PostgreSQL.
Scope
- Containerization (Docker)
- CI/CD pipeline design
- Environment management
- Database migration deployment
- Health checks and readiness probes
- Logging and monitoring
- Secrets management in deployments
- Scaling and resource allocation
- Backup and disaster recovery
Responsibilities
- ENFORCE containerized deployments.
- ENFORCE CI/CD with automated testing and migration validation.
- ENFORCE environment parity across development, staging, and production.
- ENFORCE structured logging and monitoring.
- ENFORCE health check endpoints for orchestrators.
- PREVENT manual deployments without CI/CD.
- PREVENT unreviewed migrations in production.
- PREVENT secret leakage in CI/CD logs or Docker images.
Mandatory Rules
ALWAYS
- ALWAYS containerize the application with a multi-stage Dockerfile:
# Stage 1: Builder FROM python:3.12-slim AS builder WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir --prefix=/install -r requirements.txt # Stage 2: Runtime FROM python:3.12-slim WORKDIR /app COPY --from=builder /install /usr/local COPY . . RUN python manage.py collectstatic --noinput EXPOSE 8000 CMD ["gunicorn", "CMS.asgi:application", "-k", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:8000"] - ALWAYS use ASGI server (Uvicorn/Daphne/Hypercorn) for production. Never use Django's
runserver. - ALWAYS implement health check endpoints:
# urls.py path('health/', HealthCheckView.as_view(), name='health-check'), path('health/ready/', ReadinessCheckView.as_view(), name='readiness-check'),- Liveness (
/health/): Returns 200 if the process is alive. - Readiness (
/health/ready/): Returns 200 if DB, Redis, and Celery are reachable.
- Liveness (
- ALWAYS run migrations as a separate step in deployment, BEFORE starting new application instances:
# CI/CD Pipeline steps: - name: Run migrations run: python manage.py migrate --noinput - name: Deploy new version run: kubectl rollout restart deployment/cms-api - ALWAYS validate migrations in CI before deployment:
python manage.py makemigrations --check --dry-run # Fail if unapplied migrations exist python manage.py migrate --plan # Show migration plan - ALWAYS use environment variables for all configuration. Never bake configuration into Docker images.
- ALWAYS use
.dockerignoreto exclude.git,__pycache__,.env,node_modules, media files. - ALWAYS tag Docker images with the Git commit SHA, not
latest:docker build -t cms-backend:$(git rev-parse --short HEAD) . - ALWAYS use structured JSON logging in production:
LOGGING = { 'version': 1, 'formatters': { 'json': { '()': 'pythonjsonlogger.jsonlogger.JsonFormatter', 'format': '%(asctime)s %(name)s %(levelname)s %(message)s', }, }, 'handlers': { 'console': { 'class': 'logging.StreamHandler', 'formatter': 'json', }, }, 'root': { 'handlers': ['console'], 'level': 'INFO', }, } - ALWAYS monitor these metrics:
- Request latency (p50, p95, p99)
- Error rate (5xx responses)
- Database query count and latency
- Redis connection pool usage
- Celery task queue depth and processing time
- SSE active connection count
- Memory and CPU usage per container
- ALWAYS define resource limits for containers:
resources: requests: memory: "256Mi" cpu: "250m" limits: memory: "512Mi" cpu: "500m" - ALWAYS implement graceful shutdown — handle SIGTERM to finish in-flight requests:
# Uvicorn handles this natively with --timeout-graceful-shutdown CMD ["uvicorn", "CMS.asgi:application", "--host", "0.0.0.0", "--port", "8000", "--timeout-graceful-shutdown", "30"]
NEVER
- NEVER use
runserverin production. - NEVER bake secrets into Docker images.
- NEVER deploy without running the test suite in CI.
- NEVER run migrations and application startup in the same process simultaneously.
- NEVER use
DEBUG=Truein production. - NEVER expose database ports to the public internet.
- NEVER use
latesttag for Docker images in production deployments. - NEVER skip health checks in orchestrator configuration.
- NEVER log request/response bodies in production (PII risk).
- NEVER store persistent data in container filesystems (ephemeral).
CI/CD Pipeline
Pipeline Stages
1. Lint → ruff check, ruff format --check
2. Tes
Установить django_devops в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл django_devops?
Enterprise Django 6 DevOps — containerization, CI/CD, environment management, database deployment, monitoring, and production readiness checklist.
Как установить скилл django_devops?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл django_devops запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub