Install any skill in seconds. Free to start, no credit card required.
Get Started Free →DevOps and CI/CD expert. Use when setting up pipelines, containerizing applications, deploying to Kubernetes, or implementing release strategies. Covers GitHub Actions, Docker, K8s, Terraform, and GitOps.
.claude/skills/majiayu000-devops-excellence/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 242% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 227% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 435% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 113% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 141% | 0% |
> These rules are mandatory. Violating them means the skill is not working correctly.
Never use long-lived static credentials. Always use OIDC or short-lived tokens.
yaml# ❌ FORBIDDEN: Static AWS credentials env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} # ✅ REQUIRED: OIDC-based authentication - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: arn:aws:iam::123456789012:role/GitHubActions aws-region: us-east-1 # No long-lived secrets - uses GitHub OIDC provider
Containers must NEVER run as root. Always specify a non-root user.
dockerfile# ❌ FORBIDDEN: Running as root (default) FROM node:20 WORKDIR /app CMD ["node", "server.js"] # ❌ FORBIDDEN: Explicit root user USER root # ✅ REQUIRED: Non-root user with UID > 1000 FROM node:20-alpine RUN addgroup -g 1001 -S nodejs && \ adduser -S nodejs -u 1001 USER nodejs WORKDIR /app CMD ["node", "server.js"]
Never bake secrets into Docker images. Use runtime injection or secrets managers.
dockerfile# ❌ FORBIDDEN: Secrets in build args or ENV ARG DATABASE_PASSWORD ENV API_KEY=sk-xxx # ❌ FORBIDDEN: Copying secret files COPY .env /app/.env COPY credentials.json /app/ # ✅ REQUIRED: Mount secrets at runtime # docker run -v /secrets:/app/secrets:ro myapp # Or use Kubernetes secrets/configmaps
Production deployments must require approval and be restricted to main branch.
yaml# ❌ FORBIDDEN: Direct production deploy without protection deploy: runs-on: ubuntu-latest steps: - run: deploy-to-prod.sh # ✅ REQUIRED: Environment protection deploy: runs-on: ubuntu-latest environment: name: production url: https://myapp.com # Requires: approval + main branch only
| Scenario | Tool/Pattern | Reason | |----------|--------------|--------| | Public GitHub project | GitHub Actions | Native integration, free for public repos | | Enterprise GitLab | GitLab CI | Unified platform, advanced security scanning | | Multi-cloud IaC | Terraform | Mature ecosystem, wide provider support | | Developer-centric IaC | Pulumi | Real programming languages, better testing | | Kubernetes deployments | ArgoCD + Kustomize | GitOps standard, declarative config | | Zero-downtime releases | Blue-Green or Canary | Instant rollback capability | | Gradual feature rollout | Feature flags (LaunchDarkly) | Progressive delivery with targeting |
| Strategy | Downtime | Cost | Rollback Speed | Complexity | Best For | |----------|----------|------|----------------|------------|----------| | Rolling | Minimal | Low | Medium | Low | Regular updates, cost-conscious | | Blue-Green | Zero | High (2x) | Instant | Medium | Critical systems, easy rollback | | Canary | Zero | Medium | Fast | High | Risk mitigation, data-driven | | Recreate | High | Low | N/A | Very Low | Non-critical, dev/test only |
yaml# Short-lived credentials (not static keys) - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: arn:aws:iam::123456789012:role/GitHubActions aws-region: us-east-1 # OIDC provider - no long-lived secrets! # Protected environments for production environment: name: production # Requires approval + restricts to main branch
yaml# Example: conditional job execution jobs: backend-tests: if: contains(github.event.head_commit.modified, 'backend/') runs-on: ubuntu-latest
/\
/E2E\ <- Few (slow, expensive)
/------\
/Integration\ <- Some (medium speed)
/------------\
/ Unit Tests \ <- Many (fast, cheap)
/----------------\yaml# Multi-layer security scanning jobs: security: runs-on: ubuntu-latest steps: # SAST - Static code analysis - uses: github/codeql-action/init@v3 # SCA - Dependency vulnerabilities - name: Run Trivy uses: aquasecurity/trivy-action@master with: scan-type: 'fs' format: 'sarif' # Secret scanning - name: Gitleaks uses: gitleaks/gitleaks-action@v2 # Container scanning - name: Scan Docker image run: trivy image myapp:${{ github.sha }}
dockerfile# Build stage - includes build tools (900MB+) FROM node:20-alpine AS builder WORKDIR /app COPY package*.json ./ RUN npm ci --only=production # Runtime stage - minimal image (<100MB) FROM node:20-alpine AS runtime RUN addgroup -g 1001 -S nodejs && \ adduser -S nodejs -u 1001 WORKDIR /app COPY --from=builder --chown=nodejs:nodejs /app/node_modules ./node_modules COPY --chown=nodejs:nodejs . . USER nodejs EXPOSE 3000 CMD ["node", "server.js"]
alpine, distroless, or scratchdocker run --read-onlydockerfile# Security best practices example FROM gcr.io/distroless/nodejs20-debian12 COPY --chown=65532:65532 /app /app USER 65532 EXPOSE 8080
# Version control
.git
.gitignore
# Dependencies (install fresh in container)
node_modules
vendor/
*.pyc
__pycache__
# Secrets and configs
.env
.env.local
secrets/
*.key
*.pem
# Development files
README.md
Dockerfile
docker-compose.yml
.vscode/
.idea/
# Testing and CI
tests/
*.test.js
.github/yaml# 99.94% of clusters are over-provisioned! # Average CPU usage: 10%, Memory: 23% resources: requests: memory: "128Mi" # Guaranteed allocation cpu: "100m" # 0.1 CPU cores limits: memory: "256Mi" # Maximum allowed cpu: "200m" # Hard cap # Use tools: Kubecost, Goldilocks, VPA
yaml# Liveness: Is container alive? livenessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 # Readiness: Can it receive traffic? readinessProbe: httpGet: path: /ready port: 8080 initialDelaySeconds: 5 periodSeconds: 5 successThreshold: 1 # Startup: Has initialization completed? startupProbe: httpGet: path: /startup port: 8080 failureThreshold: 30 # 30*10s = 5min for slow starts periodSeconds: 10
yaml# Group related resources in single manifest --- apiVersion: v1 kind: ConfigMap metadata: name: app-config data: APP_ENV: production LOG_LEVEL: info --- apiVersion: v1 kind: Secret metadata: name: app-secrets type: Opaque stringData: DATABASE_URL: postgresql://user:pass@db:5432/mydb --- apiVersion: apps/v1 kind: Deployment metadata: name: myapp spec: template: spec: containers: - name: app envFrom: - configMapRef: name: app-config - secretRef: name: app-secrets
yaml# Pod Security Standards securityContext: runAsNonRoot: true runAsUser: 1000 fsGroup: 1000 seccompProfile: type: RuntimeDefault capabilities: drop: - ALL # Network Policies (deny-by-default) apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: deny-all-ingress spec: podSelector: {} policyTypes: - Ingress
Detailed material starting at ## Infrastructure as Code (Terraform/Pulumi) has been moved to reference/extended.md to keep this skill concise. Load that reference when the task requires the moved examples, command catalogs, checklists, platform details, or implementation templates.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 12,719 | 7,844 | -38% | 1 | 1 | 0% | 1,165 | 3,988 | +242% | 0 | 0 | — |
case-02 | pass→pass | 9,961 | 8,497 | -15% | 1 | 1 | 0% | 1,767 | 4,267 | +141% | 0 | 0 | — |
case-03 | fail→pass | 6,873 | 6,529 | -5% | 1 | 1 | 0% | 1,199 | 3,916 | +227% | 0 | 0 | — |
case-04 | fail→pass | 3,841 | 4,488 | +17% | 1 | 1 | 0% | 662 | 3,543 | +435% | 0 | 0 | — |
case-05 | pass→pass | 9,394 | 7,803 | -17% | 1 | 1 | 0% | 1,417 | 3,924 | +177% | 0 | 0 | — |
case-06 | pass→pass | 8,067 | 6,447 | -20% | 1 | 1 | 0% | 1,349 | 3,821 | +183% | 0 | 0 | — |
case-07 | pass→pass | 15,428 | 9,315 | -40% | 1 | 1 | 0% | 2,476 | 4,198 | +70% | 0 | 0 | — |
case-08 | pass→pass | 17,544 | 12,069 | -31% | 1 | 1 | 0% | 3,121 | 4,917 | +58% | 0 | 0 | — |
case-09 | pass→pass | 11,868 | 9,559 | -19% | 1 | 1 | 0% | 2,214 | 4,429 | +100% | 0 | 0 | — |
case-10 | pass→pass | 12,444 | 7,632 | -39% | 1 | 1 | 0% | 2,155 | 4,155 | +93% | 0 | 0 | — |
case-11 | pass→pass | 10,757 | 10,859 | +1% | 1 | 1 | 0% | 1,846 | 4,713 | +155% | 0 | 0 | — |
case-12 | pass→pass | 4,637 | 4,545 | -2% | 1 | 1 | 0% | 799 | 3,455 | +332% | 0 | 0 | — |
case-13 | pass→pass | 12,165 | 9,853 | -19% | 1 | 1 | 0% | 2,139 | 4,424 | +107% | 0 | 0 | — |
case-14 | pass→pass | 9,531 | 6,376 | -33% | 1 | 1 | 0% | 1,600 | 3,839 | +140% | 0 | 0 | — |
case-15 | pass→pass | 9,048 | 8,532 | -6% | 1 | 1 | 0% | 1,640 | 4,282 | +161% | 0 | 0 | — |
case-16 | fail→pass | 10,476 | 6,776 | -35% | 1 | 1 | 0% | 1,848 | 3,937 | +113% | 0 | 0 | — |
case-17 | pass→pass | 12,280 | 5,646 | -54% | 1 | 1 | 0% | 2,044 | 3,682 | +80% | 0 | 0 | — |
case-18 | pass→pass | 13,505 | 7,331 | -46% | 1 | 1 | 0% | 2,175 | 3,948 | +82% | 0 | 0 | — |
case-19 | pass→pass | 12,335 | 7,102 | -42% | 1 | 1 | 0% | 1,989 | 3,794 | +91% | 0 | 0 | — |
case-20 | pass→pass | 8,942 | 4,574 | -49% | 1 | 1 | 0% | 1,372 | 3,526 | +157% | 0 | 0 | — |
case-21 | pass→pass | 8,979 | 6,968 | -22% | 1 | 1 | 0% | 1,668 | 4,041 | +142% | 0 | 0 | — |
case-22 | pass→pass | 13,907 | 11,206 | -19% | 1 | 1 | 0% | 2,681 | 4,757 | +77% | 0 | 0 | — |
case-23 | pass→pass | 3,753 | 4,180 | +11% | 1 | 1 | 0% | 777 | 3,517 | +353% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +17 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.