Agent skill
cicd-pipeline-skill
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/cicd-pipeline-skill
SKILL.md
CI/CD Pipeline Skill
=== PURPOSE ===
This skill provides procedures for configuring and maintaining CI/CD pipelines. Used by the DevOps Engineer for all pipeline-related work.
=== USED BY ===
| Agent | Purpose |
|---|---|
| @agent(devops-engineer) @ref(CB-AGENT-DEVOPS-001) | Primary skill for pipelines |
=== PREREQUISITES ===
Before using this skill:
- Repository access with Actions enabled
- Understanding of project build process
- Test suite available
=== PROCEDURE: Create CI Workflow ===
Location: .github/workflows/ci.yml
Purpose: Run tests and checks on every PR
Template:
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm test
- run: npm run lint
- run: npm run typecheck
build:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run build
=== PROCEDURE: Create CD Workflow ===
Location: .github/workflows/deploy.yml
Purpose: Deploy on release
Template:
name: Deploy
on:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- name: Deploy to production
run: |
# Deployment commands here
env:
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
=== PROCEDURE: Pipeline Stages ===
Standard Stages:
- Checkout - Get code
- Setup - Install dependencies
- Lint - Code style checks
- Test - Run test suite
- Build - Create artifacts
- Deploy - Ship to environment
Stage Dependencies:
checkout → setup → lint
→ test → build → deploy
=== PROCEDURE: Caching ===
Purpose: Speed up builds
Common Caches:
# Node.js
- uses: actions/setup-node@v4
with:
cache: 'npm'
# Python
- uses: actions/setup-python@v5
with:
cache: 'pip'
# Custom cache
- uses: actions/cache@v4
with:
path: ~/.cache/custom
key: ${{ runner.os }}-custom-${{ hashFiles('**/lockfile') }}
=== PROCEDURE: Secret Management ===
Purpose: Handle sensitive data
Steps:
- Go to Settings > Secrets and variables > Actions
- Add repository secret
- Reference in workflow:
${{ secrets.SECRET_NAME }}
Best Practices:
- Never log secrets
- Use environment-specific secrets
- Rotate secrets regularly
- Use OIDC for cloud providers
=== PROCEDURE: Branch Protection ===
Purpose: Enforce CI before merge
Settings:
- Require status checks to pass
- Require branches to be up to date
- Select required checks (test, lint, build)
=== ANTI-PATTERNS ===
No Caching
Problem: Slow builds from fresh installs Solution: Cache dependencies and build artifacts
Secrets in Code
Problem: Sensitive data in workflow files Solution: Use GitHub Secrets
No Failure Notifications
Problem: Silent failures Solution: Add failure notifications
Sequential When Parallel Possible
Problem: Slow pipelines Solution: Parallelize independent jobs
=== RELATED SKILLS ===
| Skill | Relationship |
|---|---|
| @skill(deployment) | CI triggers deployment |
| @skill(infrastructure) | Infrastructure supports CI |
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?