From devops
Write a CI/CD pipeline configuration — build, test, lint, deploy stages.
npx claudepluginhub hpsgd/turtlestack --plugin devopsThis skill is limited to using the following tools:
Write a CI/CD pipeline for $ARGUMENTS.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides implementation of event-driven hooks in Claude Code plugins using prompt-based validation and bash commands for PreToolUse, Stop, and session events.
Write a CI/CD pipeline for $ARGUMENTS.
Before writing any pipeline configuration:
.github/workflows/, .gitlab-ci.yml, Jenkinsfile, azure-pipelines.ymlpackage.json scripts, Makefile, Taskfile, scripts/ directoryEvery pipeline follows this ordering principle: fail fast — cheapest checks first.
Lint/Format → Build → Unit Tests → Integration Tests → Security Scan → Deploy
If any stage fails, subsequent stages do not run. Total pipeline time budget: under 10 minutes for the fast path (lint + build + unit tests).
# Purpose: catch style and type errors in <30 seconds
- name: Lint
run: |
npm run lint
npm run typecheck
npm run format:check # --check flag, never auto-fix in CI
Rules:
# Purpose: compile/bundle and verify the artifact is producible
- name: Build
run: npm run build
Rules:
- name: Unit Tests
run: CI=true npm test -- --coverage
Rules:
CI=true or explicit --run flag)- name: Integration Tests
run: CI=true npm run test:integration
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_PASSWORD: test
Rules:
- name: Security Scan
run: |
npm audit --audit-level=high
# or: trivy fs . --severity HIGH,CRITICAL
Rules:
- name: Deploy
if: github.ref == 'refs/heads/main' && success()
run: ./scripts/deploy.sh
Rules:
Cache aggressively to reduce pipeline time:
# Node.js
- uses: actions/cache@v4
with:
path: node_modules
key: node-${{ hashFiles('package-lock.json') }}
# .NET
- uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: nuget-${{ hashFiles('**/*.csproj') }}
# Python
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-${{ hashFiles('requirements*.txt') }}
# Docker layers
- uses: docker/build-push-action@v5
with:
cache-from: type=gha
cache-to: type=gha,mode=max
Rules:
Use matrix builds for multi-version or multi-project testing:
# Multi-version testing
strategy:
matrix:
node-version: [20, 22]
fail-fast: true # Stop all jobs if one fails
# Monorepo auto-discovery
strategy:
matrix:
project: ${{ fromJson(needs.detect-changes.outputs.projects) }}
Rules:
fail-fast: true — no point running other versions if one failsFor monorepo projects:
git diff# GitHub Actions path filter
on:
push:
paths:
- 'services/api/**'
- 'packages/shared/**' # shared dependency
# Pin action versions to full SHA (not tags)
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# Pin tool versions
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc' # or package.json engines
Rules:
.nvmrc, global.json, .python-version)CI=true or --runPipeline design affects all four DORA metrics: deployment frequency (how often the pipeline runs), lead time for changes (pipeline duration), change failure rate (test/gate effectiveness), and time to restore service (rollback speed).
Deliver:
.github/workflows/*.yml or equivalent).dockerignore or equivalent if building containers/devops:write-dockerfile — pipelines that build containers need a Dockerfile. Ensure the pipeline's build stage matches the Dockerfile's target.