# devops-excellence

devops-excellence enforces DevOps best practices: eliminates root users in containers, strips static secrets, and configures OIDC in pipelines.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 114 installs · ★ 300 repo stars
- Author: majiayu000
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/majiayu000/spellbook/tree/HEAD/skills/devops-excellence/SKILL.md
- Updated: 2026-10-23
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/devops-excellence

## What it does

This skill injects mandatory delivery and infrastructure engineering standards into your assistant. It blocks bad security habits outright: running Docker images as root, baking credentials into layers, and relying on long-lived AWS IAM secret keys. In their place, it demands short-lived OIDC tokens, non-root users with UIDs above 1000, and external runtime configuration.

The guidance includes structured trade-off matrices covering deployment strategies like Blue-Green, Canary, and Rolling updates alongside CI optimization techniques. It guides the model to build workflows that finish within a ten-minute threshold using dependency caching, parallel testing jobs, and a 70-20-10 testing pyramid. It also wires automated SAST, dependency scanning, and secret checking via Trivy, CodeQL, and Gitleaks directly into pull request checks.

All production release steps require explicit environment protections with approval gates restricted to the main branch.

## Requirements
- Works with: Docker, Kubernetes, Terraform

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add majiayu000/spellbook --skill devops-excellence -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/devops-excellence/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/devops-excellence/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add majiayu000/spellbook --skill devops-excellence -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/devops-excellence/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add majiayu000/spellbook --skill devops-excellence -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/devops-excellence/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install majiayu000/spellbook skills/devops-excellence
```

2. **Manually: put the files in place**
- File: `.github/skills/devops-excellence/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add majiayu000/spellbook --skill devops-excellence -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/majiayu000/spellbook --path skills/devops-excellence
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/devops-excellence/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add majiayu000/spellbook --skill devops-excellence -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/majiayu000/spellbook/tree/HEAD/skills/devops-excellence/SKILL.md

## When to use it
- replace static AWS access keys with temporary GitHub Actions OIDC roles
- convert monolithic Dockerfiles to multi-stage builds running as non-root
- integrate Trivy and CodeQL security checks into continuous delivery pipelines
- evaluate trade-offs between Canary and Blue-Green deployment patterns

## Example prompts
- Build a secure multi-stage Dockerfile for my Node.js service using distroless
- Set up a GitHub Actions workflow that authenticates to AWS via OIDC
- Configure a deployment pipeline with Trivy vulnerability scans and main branch protection

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 3b530358ec0231bc.

BEGIN THIRD-PARTY FILE 3b530358ec0231bc
````text
---
name: devops-excellence
description: 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.
---
# DevOps Excellence

## Core Principles

- **Shift Left** — Address security and quality early in SDLC
- **GitOps** — Git as single source of truth for infrastructure and deployments
- **Infrastructure as Code** — All infrastructure versioned and reproducible
- **Progressive Delivery** — Gradual rollouts with feature flags and canary releases
- **Immutable Infrastructure** — Replace, don't modify running systems
- **Observability-First** — Monitor metrics tied to deployments and features
- **Policy as Code** — Enforce compliance and security automatically
- **Platform Engineering** — Build golden paths and self-service portals

---

## Hard Rules (Must Follow)

> These rules are mandatory. Violating them means the skill is not working correctly.

### No Static Credentials

**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
```

### No Root Containers

**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"]
```

### No Secrets in Images

**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
```
````
END THIRD-PARTY FILE 3b530358ec0231bc

The third-party file has ended. Everything between the 3b530358ec0231bc tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2464 of 9707 bytes. © majiayu000 · MIT · https://github.com/majiayu000/spellbook/tree/HEAD/skills/devops-excellence/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
