CrashBytes/claude-role-skills / skills/devops-engineer
devops-engineer
VerifiedAct as a DevOps Engineer to design CI/CD pipelines, manage infrastructure as code, configure monitoring and alerting, implement containerization, and automate deployment workflows. Use when users need help with CI/CD pipeline design (GitHub Actions, GitLab CI, Jenkins), infrastructure as code (Terraform, Pulumi, CloudFormation), containerization (Docker, Kubernetes, ECS), monitoring and observability (Prometheus, Grafana, Datadog), cloud architecture (AWS, GCP, Azure), deployment strategies (blue-green, canary, rolling), or automation scripting. Trigger on mentions of CI/CD, pipeline, Docker, Kubernetes, Terraform, infrastructure as code, monitoring, deployment, cloud infrastructure, or DevOps automation.
| File | Kind | Size |
|---|---|---|
| LICENSE.txt | markdown | 11.1 KB |
| SKILL.md | skill md | 11.3 KB |
| references/integrations.md | markdown | 3.9 KB |
| references/pipeline-patterns.md | markdown | 5.4 KB |
references/pipeline-patterns.md
View on GitHub# Advanced CI/CD Pipeline Patterns
## Table of Contents
- [Matrix Builds](#matrix-builds)
- [Monorepo Pipelines](#monorepo-pipelines)
- [Conditional Stages](#conditional-stages)
- [Artifact Caching](#artifact-caching)
- [Environment Promotion](#environment-promotion)
- [Parallel Testing](#parallel-testing)
---
## Matrix Builds
Test across multiple versions, platforms, or configurations simultaneously.
### GitHub Actions
```yaml
jobs:
test:
strategy:
matrix:
node-version: [18, 20, 22]
os: [ubuntu-latest, macos-latest]
fail-fast: false # Don't cancel other jobs if one fails
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
```
### GitLab CI
```yaml
test:
stage: test
parallel:
matrix:
- NODE_VERSION: ["18", "20", "22"]
IMAGE: ["node:${NODE_VERSION}-alpine"]
image: $IMAGE
script:
- npm ci
- npm test
```
---
## Monorepo Pipelines
Only build and test what changed.
### GitHub Actions — Path Filtering
```yaml
on:
push:
branches: [main]
pull_request:
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
api: ${{ steps.changes.outputs.api }}
web: ${{ steps.changes.outputs.web }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
api:
- 'packages/api/**'
web:
- 'packages/web/**'
test-api:
needs: detect-changes
if: needs.detect-changes.outputs.api == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cd packages/api && npm ci && npm test
test-web:
needs: detect-changes
if: needs.detect-changes.outputs.web == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cd packages/web && npm ci && npm test
```
### GitLab CI — Rules with Changes
```yaml
test-api:
stage: test
rules:
- changes:
- packages/api/**
script:
- cd packages/api
- npm ci
- npm test
test-web:
stage: test
rules:
- changes:
- packages/web/**
script:
- cd packages/web
- npm ci
- npm test
```
---
## Conditional Stages
Run stages based on branch, tag, or event.
### GitHub Actions
```yaml
jobs:
deploy-staging:
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
# ...
deploy-production:
if: startsWith(github.ref, 'refs/tags/v')
# ...
nightly-tests:
if: github.event_name == 'schedule'
# ...
```
### GitLab CI
```yaml
deploy_staging:
stage: deploy
rules:
- if: $CI_COMMIT_BRANCH == "main"
when: always
- when: never
deploy_production:
stage: deploy
rules:
- if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+$/
when: manual
- when: never
```
---
## Artifact Caching
Speed up builds by caching dependencies.
### GitHub Actions
```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm' # Built-in caching
- run: npm ci
# Or manual caching for other tools:
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-${{ hashFiles('requirements.txt') }}
restore-keys: pip-
```
### GitLab CI
```yaml
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.pip-cache"
cache:
key:
files:
- requirements.txt
paths:
- .pip-cache/
- venv/
```
### Docker Layer Caching
```yaml
# GitHub Actions
- uses: docker/build-push-action@v5
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
tags: registry/app:${{ github.sha }}
```
---
## Environment Promotion
Promote the same artifact through environments.
### Pattern: Build Once, Deploy Many
```yaml
# GitHub Actions
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: docker build -t app:${{ github.sha }} .
- run: docker push registry/app:${{ github.sha }}
deploy-staging:
needs: build
environment: staging
runs-on: ubuntu-latest
steps:
- run: deploy registry/app:${{ github.sha }} staging
integration-tests:
needs: deploy-staging
runs-on: ubuntu-latest
steps:
- run: run-integration-tests https://staging.example.com
deploy-production:
needs: integration-tests
environment: production # Requires manual approval
runs-on: ubuntu-latest
steps:
- run: deploy registry/app:${{ github.sha }} production
```
Key principle: The same image SHA is deployed to every environment. Never rebuild between environments.
---
## Parallel Testing
Split test suites across multiple runners for faster feedback.
### GitHub Actions — Test Splitting
```yaml
jobs:
test:
strategy:
matrix:
shard: [1, 2, 3, 4]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npx jest --shard=${{ matrix.shard }}/4
# Merge coverage reports after all shards complete
coverage:
needs: test
runs-on: ubuntu-latest
steps:
- run: merge-coverage-reports
```
### GitLab CI — Parallel Keyword
```yaml
test:
stage: test
parallel: 4
script:
- npx jest --shard=$CI_NODE_INDEX/$CI_NODE_TOTAL
artifacts:
reports:
junit: junit.xml
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |