AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Ci Cd Pipeline Design

skill-the-ai-directory-company-agents-and-skills-ci-cd-pipeline-design · by The-AI-Directory-Company

Design CI/CD pipeline configurations for GitHub Actions, GitLab CI, and CircleCI. Covers build, test, and deploy stages with caching strategies, parallelization, environment promotion, and secret management.

No reviews yet
0 installs
40 views
0.0% view→install

Install

$ agentstack add skill-the-ai-directory-company-agents-and-skills-ci-cd-pipeline-design

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-the-ai-directory-company-agents-and-skills-ci-cd-pipeline-design)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Ci Cd Pipeline Design? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

CI/CD Pipeline Design

Before you start

Gather the following from the user:

  1. Which CI/CD platform? (GitHub Actions, GitLab CI, CircleCI, or platform-agnostic)
  2. What language/runtime? (Node.js, Python, Go, Java, Rust, multi-language)
  3. What needs to happen? (Lint, test, build, deploy — which of these?)
  4. Where does it deploy? (Vercel, AWS, GCP, Kubernetes, static hosting)
  5. What is the branching strategy? (Trunk-based, GitFlow, feature branches)
  6. What is slow today? (If optimizing an existing pipeline, what takes the longest?)

If the user says "set up CI/CD," push back: "For which platform, language, and deployment target? I also need your branching strategy to design the trigger rules."

Procedure

Step 1: Define trigger rules

Map git events to pipeline runs:

# GitHub Actions example
on:
  pull_request:
    branches: [main]          # Run tests on PRs to main
  push:
    branches: [main]          # Deploy on merge to main
    tags: ["v*"]              # Deploy releases on version tags
  workflow_dispatch:           # Manual trigger for ad-hoc runs

Rules:

  • PRs trigger lint + test + build (no deploy)
  • Merge to main triggers lint + test + build + deploy to staging
  • Tags trigger deploy to production
  • Never auto-deploy to production on push to main

Step 2: Design the stage graph

Organize jobs into stages with dependency edges:

[Lint] ──┐
         ├──> [Build] ──> [Deploy Staging] ──> [Smoke Test] ──> [Deploy Prod]
[Test] ──┘

For each stage, document:

| Stage | Trigger | Depends on | Timeout | Runs on | |-------|---------|------------|---------|---------| | Lint | PR + push | None | 5 min | ubuntu-latest | | Test | PR + push | None | 15 min | ubuntu-latest | | Build | PR + push | Lint + Test pass | 10 min | ubuntu-latest | | Deploy staging | Push to main | Build | 10 min | ubuntu-latest | | Smoke test | After staging deploy | Deploy staging | 5 min | ubuntu-latest | | Deploy prod | Tag v* or manual | Smoke test pass | 10 min | ubuntu-latest |

Run Lint and Test in parallel. They have no dependency on each other.

Step 3: Configure caching

Caching is the single highest-impact optimization. For each ecosystem, cache the dependency directory with a key based on the lockfile hash:

  • Node.js: Cache node_modules, key on hashFiles('pnpm-lock.yaml')
  • Python: Cache ~/.cache/pip, key on hashFiles('requirements.txt')
  • Go: Cache ~/go/pkg/mod + ~/.cache/go-build, key on hashFiles('go.sum')
  • Docker: Use cache-from: type=gha and cache-to: type=gha,mode=max

Always set restore-keys for partial cache hits. Monitor cache hit rates — below 80% means the key strategy needs adjustment.

Step 4: Implement test parallelization

Split tests across parallel runners to reduce wall-clock time:

GitHub Actions matrix:

test:
  strategy:
    matrix:
      shard: [1, 2, 3, 4]
  steps:
    - run: npx jest --shard=${{ matrix.shard }}/4

CircleCI parallelism:

test:
  parallelism: 4
  steps:
    - run: |
        TESTS=$(circleci tests glob "**/*.test.ts" | circleci tests split --split-by=timings)
        npx jest $TESTS

Split by timing data when available. Fall back to file count splitting. Rebalance shards when test distribution becomes uneven.

Step 5: Configure secrets and environment variables

Use the platform's secret store (${{ secrets.X }} in GitHub Actions, CI/CD variables in GitLab). Rules:

  • Never echo secrets in logs — use add-mask or equivalent
  • Scope secrets per environment (staging vs production)
  • For OIDC-capable targets (AWS, GCP), use identity federation instead of static credentials
  • Document secret rotation procedure in the pipeline README

Step 6: Add deploy gates

Between staging and production, require at least one gate:

  • Smoke test: Automated health check hitting critical endpoints on staging
  • Manual approval: Required for production deploys (GitHub: environment with reviewers; GitLab: when: manual)
  • Canary verification: Deploy to a subset, verify metrics, then proceed
# GitHub Actions environment protection
deploy-prod:
  environment:
    name: production
    url: https://app.example.com
  needs: [smoke-test]

Step 7: Handle artifacts

Build once, deploy the same artifact to all environments. Upload build output as a pipeline artifact with a retention policy. Download in deploy jobs. The artifact deployed to production must be byte-identical to what was tested in staging — never rebuild per environment.

Quality checklist

Before delivering the pipeline configuration, verify:

  • [ ] PRs run lint + test + build but never deploy
  • [ ] Lint and test run in parallel where possible
  • [ ] Caching is configured for dependencies with lockfile-based keys
  • [ ] Secrets use the platform's secret store, never hardcoded
  • [ ] Production deploy requires a gate (manual approval or automated canary)
  • [ ] Build artifacts are created once and reused across environments
  • [ ] Timeouts are set on every job to prevent hung pipelines
  • [ ] The pipeline YAML is syntactically valid for the target platform

Common mistakes

  • Deploying to production on push to main. Always gate production deploys behind manual approval or automated verification. A broken merge should not reach users automatically.
  • No caching. Installing dependencies from scratch on every run wastes 2-5 minutes. Cache aggressively and monitor hit rates.
  • Rebuilding per environment. Building separately for staging and production means you are deploying untested artifacts to production. Build once, deploy everywhere.
  • Sequential lint and test. These have no dependency on each other. Run them in parallel to cut pipeline time.
  • Secrets in pipeline YAML. Even "temporary" secrets in YAML files end up in git history. Use the platform's secret management from day one.
  • No timeout on jobs. A hung test suite or a stuck deploy can block the pipeline for hours. Set explicit timeouts on every job.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.