analyzing-projects
Analyzes codebases to understand structure, tech stack, patterns, and conventions. Use when onboarding to a new project,…
Guides Docker, CI/CD pipelines, deployment strategies, infrastructure as code, and observability setup. Use when writing Dockerfiles, configuring GitHub Actions, planning deployments, setting up monitoring, or when asked about containers, pipelines, Terraform, or production
Claude Code
$ npx -y skills add CloudAI-X/claude-workflow-v2 --skill devops-infrastructure --agent claude-code
Codex
$ npx skills add CloudAI-X/claude-workflow-v2 --skill devops-infrastructure -a codex -y
Cursor
$ npx skills add CloudAI-X/claude-workflow-v2 --skill devops-infrastructure -a cursor -y
Gemini CLI
$ npx skills add CloudAI-X/claude-workflow-v2 --skill devops-infrastructure -a gemini-cli -y
GitHub Copilot
$ npx skills add CloudAI-X/claude-workflow-v2 --skill devops-infrastructure -a github-copilot -y
OpenCode
$ npx skills add CloudAI-X/claude-workflow-v2 --skill devops-infrastructure -a opencode -y
Windsurf
$ npx skills add CloudAI-X/claude-workflow-v2 --skill devops-infrastructure -a windsurf -y
name: devops-infrastructure description: Guides Docker, CI/CD pipelines, deployment strategies, infrastructure as code, and observability setup. Use when writing Dockerfiles, configuring GitHub Actions, planning deployments, setting up monitoring, or when asked about containers, pipelines, Terraform, or production infrastructure.
Copy this checklist and track progress:
DevOps Setup Progress: - [ ] Step 1: Containerize application (Dockerfile) - [ ] Step 2: Set up CI/CD pipeline - [ ] Step 3: Define deployment strategy - [ ] Step 4: Configure monitoring & alerting - [ ] Step 5: Set up environment management - [ ] Step 6: Document runbooks - [ ] Step 7: Validate against anti-patterns checklist
# WRONG: Single stage, bloated image FROM node:22 WORKDIR /app COPY . . RUN npm install RUN npm run build CMD ["node", "dist/index.js"] # Result: 1.2GB image with devDependencies and source code # CORRECT: Multi-stage build FROM node:22-alpine AS builder WORKDIR /app COPY package*.json ./ RUN npm ci COPY . . RUN npm run build RUN npm prune --omit=dev FROM node:22-alpine AS runner WORKDIR /app ENV NODE_ENV=production RUN addgroup -g 1001 appgroup && adduser -u 1001 -G appgroup -s /bin/sh -D appuser COPY --from=builder /app/dist ./dist COPY --from=builder /app/node_modules ./node_modules COPY --from=builder /app/package.json ./ USER appuser EXPOSE 3000 CMD ["node", "dist/index.js"] # Result: ~150MB image, no devDependencies, non-root user
FROM python:3.12-slim AS builder WORKDIR /app RUN pip install uv COPY pyproject.toml uv.lock ./ RUN uv sync --frozen --no-dev --no-install-project COPY . . RUN uv sync --frozen --no-dev FROM python:3.12-slim AS runner WORKDIR /app RUN useradd -r -s /bin/false appuser COPY --from=builder /app/.venv /app/.venv COPY --from=builder /app/src ./src ENV PATH="/app/.venv/bin:$PATH" USER appuser CMD ["python", "-m", "src.main"]
# WRONG: Cache busted on every code change COPY . . RUN npm ci # CORRECT: Dependencies cached separately COPY package*.json ./ RUN npm ci # cached unless package.json changes COPY . . # only source code changes bust this layer
node_modules .git .env *.md .vscode coverage dist __pycache__ .pytest_cache *.pyc
# Always pin versions FROM node:22-alpine # NOT node:latest # Don't run as root USER appuser # Read-only filesystem where possible # docker run --read-only --tmpfs /tmp myapp # Scan images # docker scout cves myimage:latest # trivy image myimage:latest
name: CI/CD
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"
- run: npm ci
- run: npm run lint
test:
runs-on: ubuntu-latest
needs: lint
services:
postgres:
image: postgres:16
env:
POSTGRES_DB: testdb
POSTGRES_PASSWORD: postgres
ports: ["5432:5432"]
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"
- run: npm ci
- run: npm test
build:
runs-on: ubuntu-latest
needs: test
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: type=sha
- uses: docker/build-push-action@v5
with:
push: ${{ github.event_name == 'push' }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
environment: production
steps:
- run: echo "Deploy to production"# Node modules
- uses: actions/setup-node@v4
with:
cache: "npm"
# Python with uv
- name: Cache uv
uses: actions/cache@v4
with:
path: ~/.cache/uv
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
# Docker layer caching
- uses: docker/build-push-action@v5
with:
cache-from: type=gha
cache-to: type=gha,mode=max1. Run two identical environments: Blue (live) and Green (idle) 2. Deploy new version to Green 3. Run smoke tests on Green 4. Switch load balancer to Green 5. Green is now live, Blue is idle 6. Rollback: switch back to Blue Pros: Instant rollback, zero downtime Cons: 2x infrastructure cost during deploy
1. Deploy new version to small subset (5% of traffic) 2. Monitor error rates and latency 3. Gradually increase: 5% -> 25% -> 50% -> 100% 4. Rollback: route all traffic back to old version Pros: Limited blast radius, real-world testing Cons: More complex routing, longer rollout
1. Replace instances one at a time 2. Each new instance passes health checks before next starts 3. Continue un
A universal Claude Code workflow plugin with specialized agents, skills, hooks, and mode commands for any software project. Compatible with skills.sh — works with Claude Code, Cursor, Codex, and 35+ AI agents.
Analyzes codebases to understand structure, tech stack, patterns, and conventions. Use when onboarding to a new project,…
Convex backend development guidelines. Use when writing Convex functions, schemas, queries, mutations, actions, or any backend…
Designs database schemas, indexing strategies, query optimization, and migration patterns for SQL and NoSQL databases. Use when…
Designs REST and GraphQL APIs including endpoints, error handling, versioning, and documentation. Use when creating new APIs,…
Designs software architecture and selects appropriate patterns for projects. Use when designing systems, choosing architecture…
Designs and implements testing strategies for any codebase. Use when adding tests, improving coverage, setting up testing…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.