ferroxlabs/wayland/ci-cd-pipeline-design
Claude Code and agent skill by ferroxlabs/wayland
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Guides expert-level ci/cd pipeline design implementation: ci-cd and automation decision frameworks, production-ready patterns, and concrete templates for ci cd pipeline design workflows. Use when the user asks about ci/cd pipeline design, ci cd pipeline design configuration, or ci-cd best practices for ci/cd projects. Do NOT use when the user needs a different devops cloud capability -- check sibling skills in the devops cloud subcategory.
Install
npx vskill@latest install ferroxlabs/wayland/ci-cd-pipeline-designSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as ferroxlabs/wayland/ci-cd-pipeline-design.
CI/CD Pipeline Design
When to Use
Use this skill when:
- A user needs to design or redesign a CI/CD pipeline from scratch for a new or existing application
- A user is experiencing slow pipeline execution (builds exceeding 10 minutes, deploy cycles exceeding 30 minutes) and needs optimization guidance
- A user wants to migrate from a legacy CI system (Jenkins, TeamCity, CircleCI 1.x) to a modern pipeline-as-code approach
- A user is implementing a multi-environment promotion strategy (dev → staging → production) and needs gate controls, approval workflows, and environment parity
- A user is designing a pipeline for a monorepo or microservices architecture and needs path-based triggering, dependency graphs, or matrix builds
- A user needs to integrate security scanning (SAST, DAST, dependency auditing, container image scanning) into an existing pipeline without blocking fast feedback loops
- A user is adopting GitOps patterns and needs to understand the boundary between CI (push-based artifact creation) and CD (pull-based reconciliation)
- A user needs to design deployment strategies such as blue/green, canary, or rolling deployments and needs to know how to wire those into pipeline stages
Do NOT use this skill when:
- The user needs help with container orchestration platform configuration (Kubernetes resource definitions, Helm chart authoring) -- use the container-orchestration skill instead
- The user needs infrastructure-as-code design for provisioning cloud resources (Terraform, Pulumi module design) -- use the infrastructure-as-code skill
- The user is asking about secrets management architecture as a standalone topic (Vault policies, AWS Secrets Manager rotation) -- use the secrets-management skill
- The user needs help designing a GitOps operator or ArgoCD application manifest structure -- use the gitops-deployment skill
- The user is asking about monitoring and observability design independent of the pipeline -- use the observability-design skill
- The user needs general Docker or container image optimization advice not tied to pipeline stages -- use the container-image-optimization skill
- The user is asking purely about branching strategy (Git Flow vs trunk-based) without pipeline implications -- use the version-control-strategy skill
Process
1. Gather Pipeline Context and Constraints
Before producing any pipeline design, collect the following inputs explicitly from the user. Each answer materially changes the recommended architecture.
- Application type and runtime: Is this a compiled language (Go, Java, C#), interpreted (Python, Node.js), or a frontend build (React, Next.js)? Compiled languages need artifact caching strategies; interpreted languages need dependency caching.
- Target deployment platform: Kubernetes (self-managed or managed like EKS/GKE/AKS), serverless (Lambda, Cloud Run), VM-based (EC2, GCE), or PaaS (Heroku, Render, Railway). Each has different deployment primitives.
- Repository structure: Single-repo single-service, monorepo multi-service, or polyrepo. Monorepos require path-based change detection; polyrepos require cross-repo artifact versioning.
- Team size and deployment frequency: Teams of 1--5 with low frequency (< 5 deploys/day) can tolerate simpler pipelines. Teams of 10+ with high frequency (> 20 deploys/day) need parallelized stages, queuing controls, and deployment locks.
- Existing CI platform constraints: GitHub Actions, GitLab CI, CircleCI, Buildkite, Jenkins, Tekton, or Drone. Each has architectural primitives (runners vs agents vs executors) that constrain design options.
- Compliance requirements: SOC 2, PCI-DSS, HIPAA, FedRAMP. These add mandatory audit logging, approval gates, artifact signing, and immutable build records.
- Current pain points: Slow builds, flaky tests, broken deploys, manual steps, no rollback capability, environment drift. These are the primary optimization targets.
2. Choose the Pipeline Topology
Apply this decision framework based on collected context:
- Linear pipeline (single app, single environment path): Appropriate when deploying one service to one production environment with one staging environment. Stages run sequentially: build → test → scan → package → deploy-staging → smoke-test → deploy-prod. Simplest to understand and debug.
- Fan-out / fan-in pipeline (monorepo or parallel test suites): Use when you have multiple independent build targets in a monorepo or when test suites can be parallelized. A single trigger fans out to N parallel jobs, then fans back in to a gate that requires all to pass before proceeding to deployment. Reduces total wall-clock time by 40--70% for large test suites.
- Matrix build pipeline: Use when the same code must be validated against multiple runtime versions (Node 18/20/22, Python 3.10/3.11/3.12) or multiple OS targets (linux/amd64, linux/arm64, darwin). Define a matrix and let the CI platform generate job permutations.
- Multi-stage promotion pipeline (environment promotion): Use for any production system. Artifacts built once in CI are promoted through environments using immutable references (a container image SHA or a versioned artifact in an artifact registry), never rebuilt. The same artifact that passes staging is what gets deployed to production.
- GitOps split pipeline: CI pipeline ends at image push + manifest update. CD is handled by a GitOps operator (ArgoCD, Flux) that pulls and reconciles. The CI pipeline writes a commit to a configuration repository; the CD system detects and applies it. Use when running Kubernetes and wanting deployment history in Git.
3. Design Stage Structure and Sequencing
Define each stage explicitly with its purpose, inputs, outputs, and failure behavior:
- Fast-feedback stage (target: < 3 minutes): Syntax checks, linting (ESLint, flake8, golangci-lint), unit tests, and import validation. This stage runs on every push including to feature branches. Fail fast: if linting fails, do not proceed to longer-running stages. Use caching aggressively -- cache node_modules, pip packages, Go module cache, Maven .m2 by hashing lockfiles (package-lock.json, requirements.txt, go.sum, pom.xml).
- Build and package stage (target: < 5 minutes for most apps): Compile the application, produce the deployable artifact. For containers: docker buildx build with layer caching (--cache-from type=registry or type=gha). For JVM apps: produce a fat JAR or exploded WAR. For Go: produce a static binary. Tag the artifact with the git SHA (not a mutable tag like "latest"). Push to artifact registry only on main/release branches, not feature branches.
- Full test stage (target: < 10 minutes for 80th percentile): Integration tests, contract tests, and any tests requiring external dependencies (test containers, localstack for AWS). Parallelize using job matrices or by splitting test files. If total test time exceeds 15 minutes, split into parallel shards -- most CI platforms support this via a modulo split (tests[0..N/3], tests[N/3..2N/3], tests[2N/3..N]) or via a test impact analysis tool that only runs tests affected by changed files.
- Security scanning stage (run in parallel with full tests): Static analysis (Semgrep, CodeQL, SonarQube), dependency vulnerability scanning (Dependabot, Snyk, OWASP Dependency-Check), container image scanning (Trivy, Grype, Anchore). Do NOT make these blocking on feature branches initially -- start in audit mode, then enforce after 30 days once the team has cleared baseline violations. On the main branch, fail on CRITICAL and HIGH CVEs in the final application layer (not base image issues you cannot control).
- Staging deployment stage: Deploy the tagged artifact to staging. Run smoke tests (a small suite of 5--20 tests validating critical paths) and synthetic transactions. Include an automated rollback trigger: if smoke tests fail within 5 minutes of deploy, automatically redeploy the previous artifact. Capture deployment metadata (who triggered, git SHA, timestamp, environment) into a deployment record.
- Production deployment stage (with gates): Require manual approval for production deployments in most organizations. Add automated gate checks: staging smoke tests must have passed, security scan must be clean, no open P1 incidents in the incident management system (via API check). Implement the chosen deployment strategy (rolling, blue/green, or canary) at this stage. Post deployment: run the same smoke test suite against production with a 10-minute window before declaring success.
4. Design the Artifact Strategy
Artifact management is where most pipeline designs have critical gaps:
- Immutable artifacts: Every build produces one artifact tagged with the full git SHA (40 characters, not abbreviated). Never use floating tags like "latest", "stable", or "main" for deployment references in staging or production. Floating tags cause environment drift and make rollback ambiguous.
- Artifact registry selection: Container images go to a container registry (ECR, GCR, Docker Hub private, GitHub Container Registry, GitLab Registry). Non-container artifacts (JARs, NPM packages, Go binaries) go to a language-specific registry (Nexus, Artifactory, GitHub Packages, PyPI private). Set a retention policy: keep the last 30 days of artifacts for main branch builds, keep 3 days for feature branch builds.
- Build provenance: For compliance-heavy environments, generate an SBOM (Software Bill of Materials) using Syft or Docker's built-in SBOM generation. Sign container images with Cosign. Store the SBOM as an artifact attestation in the registry. This is required for SLSA Level 2+ supply chain security.
- Artifact promotion (not rebuild): The same container image SHA deployed to staging is the one deployed to production. Never rebuild the image for each environment. Parameterize environment-specific configuration through environment variables, ConfigMaps, or Secrets -- not through image contents.
5. Implement Caching and Performance Optimization
Pipeline speed directly affects developer productivity. A pipeline exceeding 15 minutes total causes developers to context-switch and reduces merge frequency:
- Dependency caching: Cache by hashing the lockfile, not the date or branch. GitHub Actions: use
actions/cachewith a key of${{ hashFiles('**/package-lock.json') }}. GitLab CI: usecache: key: files: [package-lock.json]. Restore from a fallback key (partial match) when the exact key misses. Warm caches by running the dependency install step even on cache hit to catch lockfile drift. - Docker layer caching: Structure Dockerfiles so that dependency installation (COPY package.json, RUN npm install) comes before application code copy. This ensures the expensive layer (npm install) is cached unless dependencies change. Use multi-stage builds to keep final images small (< 100MB is achievable for most apps) while keeping build caches warm.
- Test parallelization thresholds: If test suite runs > 8 minutes serially, split into 2 shards. If > 16 minutes, split into 4 shards. Beyond 4 shards, evaluate whether test quality (flakiness, slow external I/O) is the root cause rather than volume.
- Incremental builds in monorepos: Use Nx, Turborepo, Bazel, or Gradle build cache for monorepos. These tools track which packages have changed and skip building/testing unaffected packages. Without this, a monorepo pipeline will rebuild everything on every commit, becoming untenable beyond 10--15 packages.
- Runner sizing: Do not run all jobs on the smallest available runner. Build stages benefit significantly from more CPU cores and memory. A GitHub Actions runner with 4 cores instead of 2 typically cuts build time by 35--50% for compiled languages. The cost delta (cents per build) is almost always worth the developer-hour savings.
6. Implement Security and Compliance Controls
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsrc/process/resources/skills-library/bodies/skills/devops-cloud/ci-cd-pipeline-design/SKILL.md
Popularity
- Repository stars
- 608
- Repository forks
- 113
- 7-day trend score
- 37
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ferroxlabs/wayland/ci-cd-pipeline-design)