Agent skill
cicd-pipelines
Use when the DevOp is setting up CI/CD pipelines, configuring GitHub Actions, GitLab CI, build automation, deployment strategies (blue-green, canary, rolling), or managing build artifacts. Activates for pipeline creation, build optimization, or deployment configuration.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/cicd-pipelines
SKILL.md
CI/CD Pipeline Expertise
When This Applies
Apply this guidance when:
- Creating or modifying CI/CD pipeline configurations
- Setting up automated builds, tests, and deployments
- Choosing deployment strategies
- Optimizing build times
- Managing artifacts and releases
Pipeline Design Principles
Standard Pipeline Stages
Commit → Build → Test → Quality → Deploy (staging) → Deploy (production)
- Build — Compile, bundle, create artifacts
- Test — Unit tests, integration tests, e2e tests
- Quality — Linting, type checking, security scanning
- Deploy Staging — Deploy to staging environment
- Deploy Production — Deploy to production (manual gate)
GitHub Actions Template
name: CI/CD Pipeline
on:
push:
branches: [development, main]
pull_request:
branches: [development]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run build
test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm test -- --coverage
- uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage/
deploy-staging:
needs: test
if: github.ref == 'refs/heads/development'
runs-on: ubuntu-latest
environment: staging
steps:
- run: echo "Deploy to staging"
deploy-production:
needs: test
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment: production
steps:
- run: echo "Deploy to production"
Deployment Strategies
| Strategy | Risk | Downtime | Rollback | Use When |
|---|---|---|---|---|
| Rolling | Low | Zero | Slow | Standard updates |
| Blue-Green | Low | Zero | Instant | Need instant rollback |
| Canary | Very Low | Zero | Fast | High-risk changes |
| Recreate | High | Yes | Slow | Database migrations |
Blue-Green
- Run two identical environments (blue = current, green = new)
- Deploy to green, test, then switch traffic
- Keep blue running for instant rollback
Canary
- Route 5-10% of traffic to new version
- Monitor error rates and performance
- Gradually increase if healthy
- Roll back immediately if problems detected
Build Optimization
- Cache dependencies — Use CI cache for node_modules, pip cache
- Parallel jobs — Run independent tests in parallel
- Incremental builds — Only rebuild what changed
- Slim base images — Alpine-based images build faster
- Skip unnecessary steps — Use path filters to skip irrelevant jobs
Security in Pipelines
- Store secrets in CI/CD secret management (never in code)
- Use short-lived tokens where possible
- Pin action versions to specific SHAs (not tags)
- Run security scanning (dependency audit, SAST) in pipeline
- Restrict who can trigger production deployments
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?