Agent skill

CI/CD Pipeline Principles

by irahardianto in irahardianto/awesome-agv

Rules for designing CI/CD pipelines in layers: universal lint, test and scan stages, container builds with SBOM attestation, and GitOps for orchestrated deployments.

MITAuto-check: notesDevOps & Cloud

Install CI/CD Pipeline Principles

skills CLI
$ npx skills add irahardianto/awesome-agv --skill ci-cd -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install irahardianto/awesome-agv ci-cd --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/irahardianto/awesome-agv.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/ci-cd .claude/skills/ci-cd && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ci-cd
GitHub stars
157
Token cost
~2.7k tokens
SKILL.md length
843 words
Files
2 (incl. references)
Skills in repo
34
Repo updated
First seen
Licence
MIT

At a glance

Rules for designing CI/CD pipelines in layers: universal lint, test and scan stages, container builds with SBOM attestation, and GitOps for orchestrated deployments.

  • Works in 6 steps: Lint — static analysis, formatting checks → Build — compile, bundle, generate… → Unit Test — fast tests with mocked… → …
  • Designing a CI pipeline for a new repository
  • Calls docker, gcloud and vercel; needs POSTGRES_PASSWORD and DB_PASSWORD
  • Writing a multi-stage Dockerfile with image scanning

What it does

The skill scales its rules to deployment complexity. Level 0 applies to every project and fixes the stage order: lint, build, unit test, integration test, security scan and deploy, with rules such as failing fast, keeping pipelines deterministic and under 15 minutes, never skipping a failing step and building once so the same artifact moves through every environment. Level 1 adds multi-stage builds, image scanning and SBOM attestation for container artifacts, and Level 2 adds deployment strategies and GitOps for Kubernetes.

Deploy-target snippets show Docker Compose, Cloud Run, Vercel and Kubernetes through GitOps. The GitHub Actions manifest rules say to pin action versions, order stages with needs, cache dependencies, read versions from version files and keep secrets out of workflow files. The Level 2 material sits in references/gitops-kubernetes.md and is loaded only when a project reaches that level.

When your agent uses it

  • Designing a CI pipeline for a new repository
  • Writing a multi-stage Dockerfile with image scanning
  • Debugging a slow or flaky GitHub Actions or GitLab CI pipeline
  • Setting up promotion of one build artifact across environments

Example prompts

  • “Create a GitHub Actions workflow that lints, builds, tests and scans our Go service in that order.”
  • “Rewrite our Dockerfile as a multi-stage build and add an image scan step to CI.”
  • “Our pipeline takes too long. Find the slow stages and bring it under 15 minutes.”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Lint — static analysis, formatting checks
  2. Build — compile, bundle, generate artifacts
  3. Unit Test — fast tests with mocked dependencies
  4. Integration Test — tests against real dependencies (Testcontainers)
  5. Security Scan — dependency audit, SAST, secrets detection
  6. Deploy — push to target environment

What it can do on your machine

Read from SKILL.md and the folder at commit 9e997ba. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • docker
    • gcloud
    • vercel
    • npm
    • yarn
    • kubectl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use docker, gcloud, vercel, npm, yarn and kubectl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • POSTGRES_PASSWORD
    • DB_PASSWORD
    • COSIGN_PASSWORD

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

CI/CD Pipeline Principles loads about 2.7k tokens when it runs, and up to ~4.1k if it reads all its reference files. Until then it costs about 62 tokens; SKILL.md has 843 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:158
    - Never copy `.env`, secrets, or `.git` into images
  • NoteMentions a .env fileSKILL.md:169
    env_file: .env                  # Environment config

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from irahardianto/awesome-agv at commit 9e997ba, republished under its MIT licence (© irahardianto). 843 words, ~2,716 tokens.

Download SKILL.mdSave it as .claude/skills/ci-cd/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
ci-cd
description
CI/CD pipeline architecture: GitHub Actions, GitLab CI, multi-stage Dockerfiles, vulnerability scanning, SBOM attestation, and deployment promotion. Use when designing, creating, or debugging pipelines, container builds, or release workflows.

CI/CD Principles

Agent scope: This rule applies when writing CI/CD manifests (Dockerfile, docker-compose, GitHub Actions, GitLab CI, etc.). It is layered by deployment complexity — apply only the levels relevant to the project.


Deployment Complexity Levels
LevelApplies WhenKey Additions
0 — All projectsAlwaysLint, test, security scan, secrets management
1 — ContainerizedDocker image is the artifactMulti-stage build, image scan, SBOM attestation
2 — OrchestratedKubernetes or managed container platformDeployment strategies, GitOps

Load supplementary rules when reaching Level 2:

  • Deployment strategies + GitOps → references/gitops-kubernetes.md

Level 0 — Universal Pipeline Design

Pipeline Stages (in order):

  1. Lint — static analysis, formatting checks
  2. Build — compile, bundle, generate artifacts
  3. Unit Test — fast tests with mocked dependencies
  4. Integration Test — tests against real dependencies (Testcontainers)
  5. Security Scan — dependency audit, SAST, secrets detection
  6. Deploy — push to target environment

Rules:

  • Fail fast — run cheapest checks first (lint before build, build before test)
  • Pipeline must be deterministic — same input = same output, every time
  • Keep pipelines under 15 minutes — optimize slow stages
  • Never skip failing steps — fix the pipeline, don't bypass it
  • Build once, deploy many — same artifact promotes through all environments

Level 0 — Deploy Target Examples

The deploy stage varies by target. The pipeline stages before it are identical.

Docker Compose (local / staging):

bash
docker compose up --build

Cloud Run:

bash
gcloud run deploy myapp \
  --image gcr.io/project/myapp:$GIT_SHA \
  --region us-central1

Vercel (frontend SPA):

bash
vercel deploy --prod

Kubernetes: Use GitOps — see references/gitops-kubernetes.md.


Level 0 — Manifest Patterns
GitHub Actions
yaml
name: CI
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-go@v5
        with:
          go-version-file: go.mod   # Pin via go.mod
          cache: true               # Cache dependencies
      - run: gofumpt -l -e -d .
      - run: go vet ./...
      - run: staticcheck ./...

  test:
    needs: lint                     # Fail fast: lint before test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-go@v5
        with:
          go-version-file: go.mod
          cache: true
      - run: go test -race -cover ./...

  security:
    needs: test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Scan for secrets
        uses: trufflesecurity/trufflehog@v3   # Pin to release tag
      - name: Audit dependencies
        run: go run golang.org/x/vuln/cmd/govulncheck@latest ./...

Rules:

  • Pin action versions (@v4, not @latest or @main)
  • Use needs: to enforce stage ordering
  • Cache dependencies (cache: true in setup actions)
  • Use go-version-file / node-version-file instead of hardcoding versions
  • Never put secrets in workflow files — use ${{ secrets.NAME }}

Level 1 — Containerized Projects
Dockerfile (Multi-Stage Build)
dockerfile
# Stage 1: Build
FROM golang:1.22-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download               # Cache dependencies
COPY . .
RUN CGO_ENABLED=0 go build -o /bin/api ./cmd/api

# Stage 2: Runtime (minimal image)
FROM gcr.io/distroless/static-debian12
COPY --from=builder /bin/api /bin/api
EXPOSE 8080
CMD ["/bin/api"]

Rules:

  • Always use multi-stage builds (build → runtime)
  • Pin base image versions (never use :latest)
  • Copy dependency files first, then source (layer caching)
  • Use minimal runtime images (distroless, alpine, scratch)
  • Never copy .env, secrets, or .git into images
Docker Compose (Local Development)
yaml
services:
  backend:
    build:
      context: ./apps/backend      # Path per project-structure.md
    ports:
      - "8080:8080"
    env_file: .env                  # Environment config
    depends_on:
      postgres:
        condition: service_healthy

  postgres:
    image: postgres:16-alpine      # Pin versions
    environment:
      POSTGRES_DB: ${DB_NAME}
      POSTGRES_USER: ${DB_USER}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ${DB_USER}"]
      interval: 5s
      timeout: 5s
      retries: 5
    volumes:
      - pgdata:/var/lib/postgresql/data

volumes:
  pgdata:

Rules:

  • Always define health checks for dependencies
  • Use depends_on with condition: service_healthy
  • Pin all image versions
  • Use volumes for persistent data
  • Never hardcode credentials — use env_file or environment variables
Image Scan + SBOM Attestation

After building and pushing a container image, scan it and attach a signed SBOM attestation.

Preferred approach: Cosign keyless signing (no key management required)

Cosign integrates with your CI provider's OIDC token (GitHub Actions, GitLab CI) to sign images and attestations without storing or rotating cryptographic keys. The signature is anchored to a transparency log (Rekor), making it auditable and policy-enforceable.

yaml
  build:
    needs: security
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write
      id-token: write              # Required for Cosign keyless signing

    steps:
      - uses: actions/checkout@v4

      - name: Install Cosign
        uses: sigstore/cosign-installer@v3

      - name: Build and push image
        id: build
        run: |
          docker build -t ghcr.io/${{ github.repository }}:${{ github.sha }} .
          docker push ghcr.io/${{ github.repository }}:${{ github.sha }}

      - name: Scan container image
        run: |
          trivy image \
            --severity HIGH,CRITICAL \
            --exit-code 1 \
            ghcr.io/${{ github.repository }}:${{ github.sha }}

      - name: Generate SBOM
        run: |
          syft ghcr.io/${{ github.repository }}:${{ github.sha }} \
            -o cyclonedx-json > sbom.json

      - name: Attest SBOM to image (keyless, OIDC-backed)
        run: |
          cosign attest \
            --predicate sbom.json \
            --type cyclonedx \
            ghcr.io/${{ github.repository }}:${{ github.sha }}
        # Cosign uses the GitHub Actions OIDC token automatically.
        # No COSIGN_PASSWORD or secret keys required.

How the SBOM travels with the image:

The SBOM attestation is stored as an OCI reference in the same container registry alongside the image digest. It requires no additional infrastructure — any registry that supports OCI artifacts (ghcr.io, Google Artifact Registry, AWS ECR, Docker Hub) works out of the box.

To verify the attestation at any time:

bash
cosign verify-attestation \
  --type cyclonedx \
  ghcr.io/org/app@sha256:<digest>

Use ORAS instead of Cosign when:

  • You need to attach arbitrary supply chain artifacts (scan reports, provenance JSON, build logs) that go beyond what Cosign's attestation model covers.
  • oras attach ghcr.io/org/app@sha256:<digest> scan-report.json

Rules:

  • Prefer Cosign keyless signing — eliminates secret key management overhead
  • SBOM is attached to the image in the OCI registry — not stored as a CI artifact
  • Scan BEFORE attesting — the SBOM reflects the scanned image
  • For non-containerized apps (Vercel, Netlify frontend), use npm audit/yarn audit instead; no SBOM attachment applies

Show full SKILL.md (302 more words)Show less
Deployment vs Release (Feature Flags)

Code deployment and feature release are separate concerns. When the PRD or technical architecture explicitly requires gradual rollout, A/B testing, or kill switches, feature flags can decouple them.

Agent rule: Do NOT implement feature flags unless explicitly required by the PRD or technical architecture document. See @.agents/skills/feature-flags/SKILL.md for implementation guidance when they are required.


Environment Promotion
dev → staging → production
  • Dev: Deployed on every push to feature branch
  • Staging: Deployed on merge to main/develop
  • Production: Deployed via manual approval or automated release

Rules:

  • Same artifacts promote through environments (build once, deploy many)
  • Environment-specific config via environment variables, not build flags
  • Never deploy directly to production without staging validation

CI/CD Checklist

Always (all projects):

  • Pipeline stages run in correct order (lint → build → test → security → deploy)?
  • All versions pinned (base images, CI actions, tool versions)?
  • Dependency caching enabled?
  • No secrets in config files (use env vars or secrets manager)?
  • Secret scanning in CI?
  • Health checks defined for all service dependencies?
  • Pipeline completes in under 15 minutes?

If building container images (Level 1):

  • Multi-stage Docker builds used?
  • Container image scanned for HIGH/CRITICAL CVEs?
  • SBOM generated and attested to image via Cosign (keyless)?

If deploying to Kubernetes (Level 2):

  • Deployment strategy defined (blue-green, canary, or rolling)?
  • GitOps in place — no direct kubectl apply in production?
  • Secrets reference external store, not plaintext in git?
  • See references/gitops-kubernetes.md for full checklist

If feature flags are required by PRD/architecture:

  • Flag infrastructure specified in tech architecture document?
  • Every flag has an owner and expiry date?
  • See @.agents/skills/feature-flags/SKILL.md for full checklist

  • Code Idioms and Conventions @code-idioms-and-conventions.md (validation before ship)
  • Security Mandate @security-mandate.md (secrets management)
  • Security Principles @security-principles.md (image scanning, SBOM)
  • Git Workflow Principles @git-workflow-principles.md (branch strategy)
  • Project Structure @project-structure.md (service paths)
  • Testing Strategy @testing-strategy.md (unit and integration test stages)
  • GitOps + Kubernetes Deployment references/gitops-kubernetes.md
  • Feature Flags @.agents/skills/feature-flags/SKILL.md
  • Rule Priority @.agents/rules/rule-priority.md

© irahardianto, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .agents/skills/ci-cd of irahardianto/awesome-agv.

  • SKILL.md
  • references/gitops-kubernetes.md

Open the folder on GitHubat commit 9e997ba

Compare with similar skills

CI/CD Pipeline Principles next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

CI/CD Pipeline Principles compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
CI/CD Pipeline Principles this skillirahardianto/awesome-agv157—~2.7kAutomated safety check: NotesMIT
Devops Excellencemajiayu000/spellbook287—~2.4kAutomated safety check: NotesMIT
Deployment Automationaiskillstore/marketplace4301 repos~3kAutomated safety check: NotesNone
Devops EngineerYikai-Liao/symusic1891 repos~1.5kAutomated safety check: PassMIT
Senior DevOps Toolkitmaslennikov-ig/claude-code-orchestrator-kit2606 repos~1.1kAutomated safety check: NotesCustom licence
CI CDEliasOulkadi/shokunin114—~3.4kAutomated safety check: NotesMIT

Similar skills

  • Devops Excellence

    majiayu000/spellbook

    DevOps and CI/CD expert. An agent skill from majiayu000/spellbook.

    287 GitHub stars~2.4k tokensUpdated yesterday
    DevOps & CloudAuto-check: notes
  • Deployment Automation

    aiskillstore/marketplace

    Automate application deployment to cloud platforms and servers.

    430 GitHub starsUsed in 1 repo~3k tokens
    DevOps & CloudAuto-check: notes
  • Devops Engineer

    Yikai-Liao/symusic

    Creates Dockerfiles, configures CI/CD pipelines, writes Kubernetes manifests, and generates Terraform/Pulumi infrastructure templates.

    189 GitHub starsUsed in 1 repo~1.5k tokens
    DevOps & CloudAuto-check passed
  • Senior DevOps Toolkit

    maslennikov-ig/claude-code-orchestrator-kit

    Comprehensive DevOps skill for CI/CD, infrastructure automation, containerization, and cloud platforms (AWS, GCP, Azure). Includes pipeline setup…

    260 GitHub starsUsed in 6 repos~1.1k tokens
    DevOps & CloudAuto-check: notes
  • CI CD

    EliasOulkadi/shokunin

    Design CI/CD pipelines for GitHub Actions, GitLab CI, and CircleCI with matrix builds, test sharding, caching, Docker layer caching, OIDC auth, deployment strategies (rolling, blue-green, canary)…

    114 GitHub stars~3.4k tokensUpdated 4 days ago
    DevOps & CloudAuto-check: notes
  • Devops Automation

    rohitg00/awesome-claude-code-toolkit

    CI/CD pipeline design with GitHub Actions, Docker, Kubernetes, Helm, and GitOps patterns

    2.7k GitHub stars~1.6k tokensUpdated 5 mo ago
    DevOps & CloudAuto-check passed

More from irahardianto/awesome-agv

All 34 skills in this repo
  • Distinctive Frontend Design Builder

    irahardianto/awesome-agv

    Commits to one bold aesthetic direction, sets up a CSS token system for it, then builds the interface in Vue or plain HTML using those tokens.

    157 GitHub stars~2.4k tokensUpdated 4 days ago
    Auto-check passed
  • Perf Optimization

    irahardianto/awesome-agv

    Profile-driven performance optimization protocol. An agent skill from irahardianto/awesome-agv.

    157 GitHub stars~4.3k tokensUpdated 4 days ago
    Auto-check passed
  • Angular Idioms and Patterns

    irahardianto/awesome-agv

    Coding conventions for Angular 19 and later: standalone components, signals, OnPush change detection, lazy routes and where RxJS still belongs.

    157 GitHub stars~3.8k tokensUpdated 4 days ago
    Auto-check passed
  • Hono Idioms

    irahardianto/awesome-agv

    Hono lightweight web framework patterns: type-safe route handlers, middleware composition, Zod validation, and RPC clients for Cloudflare Workers, Node, or Bun.

    157 GitHub stars~3k tokensUpdated 4 days ago
    Auto-check passed
  • Mobile Testing

    irahardianto/awesome-agv

    Mobile E2E testing patterns — Flutter integrationtest, Patrol, Maestro, golden testing, device matrix, and test data management.

    157 GitHub stars~1.8k tokensUpdated 4 days ago
    Auto-check: notes
  • Nextjs Idioms

    irahardianto/awesome-agv

    Next.js App Router architecture: React Server Components (RSC), Server Actions, nested layouts, route handlers, and streaming.

    157 GitHub stars~4.2k tokensUpdated 4 days ago
    Auto-check: notes

Questions about CI/CD Pipeline Principles

What does CI/CD Pipeline Principles do?

Rules for designing CI/CD pipelines in layers: universal lint, test and scan stages, container builds with SBOM attestation, and GitOps for orchestrated deployments. The skill scales its rules to deployment complexity. Level 0 applies to every project and fixes the stage order: lint, build, unit test, integration test, security scan and deploy, with rules such as failing fast, keeping pipelines deterministic and under 15 minutes, never skipping a failing step and building once so the same artifact moves through every environment.

When should I use CI/CD Pipeline Principles?

CI/CD Pipeline Principles fits situations like: designing a CI pipeline for a new repository; writing a multi-stage Dockerfile with image scanning; debugging a slow or flaky GitHub Actions or GitLab CI pipeline; setting up promotion of one build artifact across environments.

How do I install CI/CD Pipeline Principles in Claude Code?

Run `npx skills add irahardianto/awesome-agv --skill ci-cd -a claude-code`. Or copy the skill folder (.agents/skills/ci-cd in irahardianto/awesome-agv) into .claude/skills/ci-cd in your project. Claude Code loads it when a task matches its description.

How do I install CI/CD Pipeline Principles in Codex?

Run `npx skills add irahardianto/awesome-agv --skill ci-cd -a codex`. Or copy the skill folder (.agents/skills/ci-cd in irahardianto/awesome-agv) into .agents/skills/ci-cd in your project. Codex loads it when a task matches its description.

Can I use CI/CD Pipeline Principles in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add irahardianto/awesome-agv --skill ci-cd -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ci-cd, .gemini/skills/ci-cd, .github/skills/ci-cd and .opencode/skills/ci-cd in your project.

What does CI/CD Pipeline Principles need to run?

Going by SKILL.md and its folder, CI/CD Pipeline Principles needs the command-line tools its instructions call (docker, gcloud, vercel, npm, yarn and kubectl) and credentials named POSTGRES_PASSWORD, DB_PASSWORD and COSIGN_PASSWORD.

Does CI/CD Pipeline Principles access the network?

SKILL.md contains no URLs. Its commands use docker and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is CI/CD Pipeline Principles safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does CI/CD Pipeline Principles use?

CI/CD Pipeline Principles is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does CI/CD Pipeline Principles use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.4k tokens, read only when the agent opens those files.

What are the alternatives to CI/CD Pipeline Principles?

Skills that share tags, products or a category with CI/CD Pipeline Principles: Devops Excellence (majiayu000/spellbook, 287 stars), Deployment Automation (aiskillstore/marketplace, 430 stars), Devops Engineer (Yikai-Liao/symusic, 189 stars) and Senior DevOps Toolkit (maslennikov-ig/claude-code-orchestrator-kit, 260 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains CI/CD Pipeline Principles?

irahardianto (a GitHub user) maintains it in irahardianto/awesome-agv, which has 157 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on October 5, 2026.

Source: irahardianto/awesome-agv on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.