home / skills / dasien / claudemultiagenttemplate / ci-cd-pipelines

This skill helps you design and implement robust CI/CD pipelines with automated testing, quality gates, and deployment strategies.

npx playbooks add skill dasien/claudemultiagenttemplate --skill ci-cd-pipelines

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.9 KB
---
name: "CI/CD Pipeline Design"
description: "Design and implement continuous integration and deployment pipelines with automated testing, builds, and deployments"
category: "devops"
required_tools: ["Read", "Write", "Bash", "WebSearch"]
---

## Purpose
Design robust CI/CD pipelines that automate building, testing, and deploying applications with quality gates and deployment strategies.

## When to Use
- Setting up new projects
- Automating deployment processes
- Implementing quality gates
- Configuring automated testing

## Key Capabilities
1. **Pipeline Design** - Structure multi-stage build/test/deploy workflows
2. **Quality Gates** - Implement automated testing and code quality checks
3. **Deployment Strategies** - Blue-green, canary, rolling deployments

## Approach
1. Define pipeline stages (build, test, deploy)
2. Configure triggers (push, PR, schedule)
3. Add quality gates (tests must pass, coverage >80%)
4. Implement deployment strategies
5. Add notifications and monitoring

## Example
```yaml
# .github/workflows/ci-cd.yml
name: CI/CD Pipeline

on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Setup Node
        uses: actions/setup-node@v3
        with:
          node-version: '18'
      - run: npm ci
      - run: npm run build
      - run: npm test
      - name: Upload coverage
        uses: codecov/codecov-action@v3
  
  deploy:
    needs: build
    if: github.ref == 'refs/heads/main'
    runs-on: ubuntu-latest
    steps:
      - name: Deploy to production
        run: |
          ./deploy.sh production
```

## Best Practices
- ✅ Run tests on every commit
- ✅ Fail fast on test failures
- ✅ Use caching to speed up builds
- ✅ Separate build and deploy stages
- ✅ Require code review before merging
- ❌ Avoid: Skipping tests to deploy faster
- ❌ Avoid: Deploying without quality gates

---

Overview

This skill designs and implements CI/CD pipelines that automate builds, tests, and deployments with clear quality gates and deployment strategies. It focuses on reliable multi-stage workflows that integrate automated testing, caching, notifications, and monitoring. The result is faster feedback, safer releases, and repeatable delivery processes.

How this skill works

I define pipeline stages (build, test, deploy), configure triggers (push, PR, schedule), and enforce quality gates such as passing tests and coverage thresholds. Deployment strategies like blue-green, canary, and rolling are implemented according to risk and traffic requirements. The pipelines include caching, artifact handling, notifications, and hooks for observability and rollbacks.

When to use it

  • Setting up CI/CD for a new project
  • Automating deployment across environments (staging, production)
  • Enforcing automated quality gates before merge or release
  • Adding automated test and coverage requirements
  • Implementing safer deployment strategies like canary or blue-green

Best practices

  • Run unit and integration tests on every commit and PR
  • Fail fast on test or lint failures to reduce wasted work
  • Separate build and deploy stages and store build artifacts
  • Use caching and parallel jobs to speed pipelines
  • Require code review and enforce coverage thresholds before merge

Example use cases

  • Create a GitHub Actions workflow that builds, tests, uploads coverage, and deploys from main.
  • Design a pipeline that triggers on PRs to run lint, unit tests, and security scans before allowing merges.
  • Implement a canary deployment pipeline that shifts traffic progressively and runs health checks.
  • Add scheduled nightly builds and end-to-end tests for regression detection.
  • Configure notifications to Slack and monitoring alerts on deployment and rollback events.

FAQ

What quality gates should I enforce?

Require passing unit and integration tests, static analysis/linting, and a minimum coverage threshold (commonly >=80%). Add security scans for production branches.

Which deployment strategy should I choose?

Choose based on risk and traffic: blue-green for near-zero downtime, canary for gradual exposure, rolling for incremental updates. Use canary when you want progressive validation with real traffic.

How do I speed up slow pipelines?

Enable caching for dependencies and build outputs, run independent jobs in parallel, and store build artifacts to reuse across stages. Profile slow steps and optimize or containerize heavy tasks.