ci-cd
Skill157 starsChanged 3 months agoMITView on GitHub
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.
- Reads credentials
25 other projects use a version of this.
Adopted by
Most recently taken up by
- AsiaOstrich/universal-dev-standardstheir own version, first seen Sep 30, 2026
- iuliandita/skillstheir own version, first seen Sep 24, 2026
- nahid-sparktales/agent-dispatchertheir own version, first seen Sep 21, 2026
- KalarisLabs/Skill-Doctortheir own version, first seen Sep 13, 2026
- nafeeur/MaskShifttheir own version, first seen Sep 12, 2026
- celestialdust/achilles-skillstheir own version, first seen Sep 10, 2026
Used with
Projects with it also use caching, shell-scripting and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
zebbernSkillcaching
Caching strategies — invalidation, TTL guidelines, cache keys, cache layers, and when not to cache. Use when implementing or reviewing caching logic.
Also in 3 projects that use this
mylee04Skillshell-scripting
Shell scripting best practices for cross-platform CLI tools
Also in 3 projects that use this
OpenAISkillobservability
Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.
Also in 8 projects that use this
MicrosoftSkillerror-handling
统一错误处理系统。在添加 API 端点、修改错误处理、添加前端 API 调用、编写错误相关测试时使用。
Also in 5 projects that use this
diego-tobalinaSkilllogging
Logging best practices for Java (SLF4J/Logback) and Node.js (Winston/Pino). Use for structured logging, log levels, and avoiding sensitive data exposure.
Also in 3 projects that use this
pproencaSkillrefactoring
Code refactoring best practices based on Martin Fowler's catalog and Clean Code principles. This skill should be used when refactoring existing code, improving code structure, reducing complexity, eliminating code smells, or reviewing code for maintainability. Triggers on tasks involving extract method, rename, decompose conditional, reduce coupling, or improve readability.
Also in 4 projects that use this
Other versions25 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 25
- codewithmukesh/dotnet-claude-kit★ 750same name
- AsiaOstrich/universal-dev-standards★ 76same name
- nahid-sparktales/agent-dispatcher★ 59same name
- mgifford/accessibility-skills★ 50same name
- nimadorostkar/Claude-Skills-collection★ 28same name
- KalarisLabs/Skill-Doctor★ 13same name
- iuliandita/skills★ 7same name
- kevinaimonster/skill-hub★ 4same name
- int2t05/engineering-skills★ 3same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
15 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository59 other files it gives its agents.
- github-pages/agents.mdAGENTS.md
- adrSkill
- agent-protocolsSkill
- angular-idiomsSkill
- api-documentationSkill
- axum-idiomsSkill
- browser-automationSkill
- chaos-testingSkill
- cli-developmentSkill
- code-auditSkill
- code-reviewSkill
- cpp-idiomsSkill
- csharp-idiomsSkill
- data-engineeringSkill
- debugging-protocolSkill
- django-idiomsSkill
- dotnet-idiomsSkill
- elixir-idiomsSkill
- embedded-systemsSkill
- feature-flagsSkill
- flutter-idiomsSkill
- frontend-designSkill
- git-commit-integritySkill
- go-idiomsSkill
- guardrailsSkill
- hono-idiomsSkill
- incident-responseSkill
- java-idiomsSkill
- javascript-idiomsSkill
- kotlin-idiomsSkill
- laravel-idiomsSkill
- logging-implementationSkill
- ml-engineeringSkill
- mobile-designSkill
- mobile-testingSkill
- nextjs-idiomsSkill
- parallel-dispatchSkill
- payment-integrationSkill
- perf-optimizationSkill
- php-idiomsSkill
- postgres-idiomsSkill
- python-idiomsSkill
- rails-idiomsSkill
- react-idiomsSkill
- refactoring-patternsSkill
- research-methodologySkill
- ruby-idiomsSkill
- rust-idiomsSkill
- security-auditSkill
- sequential-thinkingSkill
- spring-boot-idiomsSkill
- sql-idiomsSkill
- structured-specSkill
- supply-chain-securitySkill
- swift-idiomsSkill
- testability-patternsSkill
- testing-strategySkill
- typescript-idiomsSkill
- vue-idiomsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 9 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 16 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 71
Use GitOps — see references/gitops-kubernetes.md.
- Very specific: line 125
Use needs: to enforce stage ordering
- Very specific: line 127
Use go-version-file / node-version-file instead of hardcoding versions
- Very specific: line 128
Never put secrets in workflow files — use ${{ secrets.NAME }}
- Distinctive: line 154
Always use multi-stage builds (build → runtime)
- Distinctive: line 157
Use minimal runtime images (distroless, alpine, scratch)
- Very specific: line 158
Never copy .env, secrets, or .git into images
- Distinctive: line 194
Always define health checks for dependencies
- Very specific: line 195
Use depends_on with condition: service_healthy
- Distinctive: line 197
Use volumes for persistent data
- Distinctive: line 198
Never hardcode credentials — use env_file or environment variables
- Distinctive: line 202
After building and pushing a container image, scan it and attach a signed SBOM attestation.
- Distinctive: line 273
Prefer Cosign keyless signing — eliminates secret key management overhead
- Distinctive: line 307
Never deploy directly to production without staging validation
“Common” is measured: kept by at least 6 in 10 of the 16 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
| Level | Applies When | Key Additions |
| 0 — All projects | Always | Lint, test, security scan, secrets management |
| 1 — Containerized | Docker image is the artifact | Multi-stage build, image scan, SBOM attestation |
| 2 — Orchestrated | Kubernetes or managed container platform | Deployment 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):
- Lint — static analysis, formatting checks
- Build — compile, bundle, generate artifacts
- Unit Test — fast tests with mocked dependencies
- Integration Test — tests against real dependencies (Testcontainers)
- Security Scan — dependency audit, SAST, secrets detection
- 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):
docker compose up --buildCloud Run:
gcloud run deploy myapp \
--image gcr.io/project/myapp:$GIT_SHA \
--region us-central1Vercel (frontend SPA):
vercel deploy --prodKubernetes: Use GitOps — see references/gitops-kubernetes.md.
Level 0 — Manifest Patterns
GitHub Actions
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@latestor@main) - Use
needs:to enforce stage ordering - Cache dependencies (
cache: truein setup actions) - Use
go-version-file/node-version-fileinstead of hardcoding versions - Never put secrets in workflow files — use
${{ secrets.NAME }}
Level 1 — Containerized Projects
Dockerfile (Multi-Stage Build)
# 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.gitinto images
Docker Compose (Local Development)
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_onwithcondition: 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.
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:
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 auditinstead; no SBOM attachment applies
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 applyin 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
Related Principles
- 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
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

