/ci-pipeline
Manage and automate CI/CD pipeline configuration with GitHub Actions, multi-environment support, and deployment strategies
$ npx -y skills add davila7/claude-code-templates --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/ci-pipeline
Context preview
What this command does when you run it.
Manage and automate CI/CD pipeline configuration with GitHub Actions, multi-environment support, and deployment strategies
Command definition
ci-pipeline.mdallowed-tools: Read, Write, Edit, Bash
argument-hint: [pipeline-name] | setup | status | fix
description: Manage and automate CI/CD pipeline configuration with GitHub Actions, multi-environment support, and deployment strategies
CI/CD Pipeline Manager
Manage CI/CD pipeline automation: $ARGUMENTS
Current Pipeline State
- GitHub Actions: !`find .github/workflows -name "*.yml" -o -name "*.yaml" 2>/dev/null | head -5`
- CI configuration: @.github/workflows/ (if exists)
- Package scripts: @package.json
- Environment files: !`find . -name ".env*" | head -3`
- Recent workflow runs: !`gh run list --limit 5 2>/dev/null || echo "GitHub CLI not available"`
Task
Automate CI/CD pipeline management with comprehensive workflow orchestration.
Pipeline Operations
Setup New Pipeline
Create complete CI/CD pipeline with:
# .github/workflows/ci.yml
name: CI Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run linter
run: npm run lint
- name: Run tests
run: npm run test:coverage
- name: Build application
run: npm run build
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
file: ./coverage/lcov.infoMulti-Environment Deployment
# .github/workflows/deploy.yml
name: Deploy
on:
push:
branches: [main]
release:
types: [published]
jobs:
deploy-staging:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment: staging
steps:
- uses: actions/checkout@v4
- name: Deploy to Staging
run: |
npm run build:staging
npm run deploy:staging
env:
STAGING_API_URL: ${{ secrets.STAGING_API_URL }}
STAGING_SECRET: ${{ secrets.STAGING_SECRET }}
deploy-production:
if: github.event_name == 'release'
runs-on: ubuntu-latest
environment: production
needs: [test]
steps:
- uses: actions/checkout@v4
- name: Deploy to Production
run: |
npm run build:production
npm run deploy:production
env:
PROD_API_URL: ${{ secrets.PROD_API_URL }}
PROD_SECRET: ${{ secrets.PROD_SECRET }}Security & Quality Gates
security-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run security audit
run: npm audit --audit-level=moderate
- name: Scan for secrets
uses: trufflesecurity/trufflehog@main
with:
path: ./
base: main
head: HEAD
- name: SAST Scan
uses: github/super-linter@v4
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}Performance Testing
performance:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
- name: Performance Test
run: |
npm run build
npm run start:test &
sleep 10
npx lighthouse http://localhost:3000 --output=json --output-path=./lighthouse.json
- name: Comment PR
uses: actions/github-script@v6
with:
script: |
const fs = require('fs');
const lighthouse = JSON.parse(fs.readFileSync('./lighthouse.json'));
const score = lighthouse.lhr.categories.performance.score * 100;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `⚡ Performance Score: ${score}/100`
});Advanced Features
1. **Matrix Strategy Testing**
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [16, 18, 20]
include:
- os: ubuntu-latest
node-version: 20
coverage: true2. **Conditional Workflows**
- name: Skip CI
if: contains(github.event.head_commit.message, '[skip ci]')
run: echo "Skipping CI as requested"
- name: Deploy only on version tags
if: startsWith(github.ref, 'refs/tags/v')
run: npm run deploy
3. **Workflow Dependencies**
jobs:
test:
runs-on: ubuntu-latest
build:
needs: test
runs-on: ubuntu-latest
deploy:
needs: [test, build]
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest4. **Cache Optimization**
- name: Cache node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache build output
uses: actions/cache@v3
with:
path: dist
key: build-${{ github.sha }}5. **Artifact Management**
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: dist-files
path: dist/
retention-days: 7
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: dist-files
path: dist/6. **Environment Management**
environments:
staging:
url: https://staging.example.com
production:
url: https://example.com
protection_rules:
- type: required_reviewers
required_reviewers:
- devops-team
- type: wait_timer
wait_timer: 5Pipeline Monitoring
Status Checks
# Check workflow status
gh run list --workflow=ci.yml --limit=10
# View specific run
gh run view [run-id]
Read more
allowed-tools: Read, Write, Edit, Bash argument-hint: [pipeline-name] | setup | status | fix description: Manage and automate CI/CD pipeline configuration with GitHub Actions, multi-environment support, and deployment strategies
CI/CD Pipeline Manager
Manage CI/CD pipeline automation: $ARGUMENTS
Current Pipeline State
- GitHub Actions: !`find .github/workflows -name "*.yml" -o -name "*.yaml" 2>/dev/null | head -5`
- CI configuration: @.github/workflows/ (if exists)
- Package scripts: @package.json
- Environment files: !`find . -name ".env*" | head -3`
- Recent workflow runs: !`gh run list --limit 5 2>/dev/null || echo "GitHub CLI not available"`
Task
Automate CI/CD pipeline management with comprehensive workflow orchestration.
Pipeline Operations
Setup New Pipeline
Create complete CI/CD pipeline with:
# .github/workflows/ci.yml
name: CI Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run linter
run: npm run lint
- name: Run tests
run: npm run test:coverage
- name: Build application
run: npm run build
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
file: ./coverage/lcov.infoMulti-Environment Deployment
# .github/workflows/deploy.yml
name: Deploy
on:
push:
branches: [main]
release:
types: [published]
jobs:
deploy-staging:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment: staging
steps:
- uses: actions/checkout@v4
- name: Deploy to Staging
run: |
npm run build:staging
npm run deploy:staging
env:
STAGING_API_URL: ${{ secrets.STAGING_API_URL }}
STAGING_SECRET: ${{ secrets.STAGING_SECRET }}
deploy-production:
if: github.event_name == 'release'
runs-on: ubuntu-latest
environment: production
needs: [test]
steps:
- uses: actions/checkout@v4
- name: Deploy to Production
run: |
npm run build:production
npm run deploy:production
env:
PROD_API_URL: ${{ secrets.PROD_API_URL }}
PROD_SECRET: ${{ secrets.PROD_SECRET }}Security & Quality Gates
security-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run security audit
run: npm audit --audit-level=moderate
- name: Scan for secrets
uses: trufflesecurity/trufflehog@main
with:
path: ./
base: main
head: HEAD
- name: SAST Scan
uses: github/super-linter@v4
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}Performance Testing
performance:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
- name: Performance Test
run: |
npm run build
npm run start:test &
sleep 10
npx lighthouse http://localhost:3000 --output=json --output-path=./lighthouse.json
- name: Comment PR
uses: actions/github-script@v6
with:
script: |
const fs = require('fs');
const lighthouse = JSON.parse(fs.readFileSync('./lighthouse.json'));
const score = lighthouse.lhr.categories.performance.score * 100;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `⚡ Performance Score: ${score}/100`
});Advanced Features
1. **Matrix Strategy Testing**
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [16, 18, 20]
include:
- os: ubuntu-latest
node-version: 20
coverage: true2. **Conditional Workflows**
- name: Skip CI if: contains(github.event.head_commit.message, '[skip ci]') run: echo "Skipping CI as requested" - name: Deploy only on version tags if: startsWith(github.ref, 'refs/tags/v') run: npm run deploy
3. **Workflow Dependencies**
jobs:
test:
runs-on: ubuntu-latest
build:
needs: test
runs-on: ubuntu-latest
deploy:
needs: [test, build]
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest4. **Cache Optimization**
- name: Cache node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache build output
uses: actions/cache@v3
with:
path: dist
key: build-${{ github.sha }}5. **Artifact Management**
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: dist-files
path: dist/
retention-days: 7
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: dist-files
path: dist/6. **Environment Management**
environments:
staging:
url: https://staging.example.com
production:
url: https://example.com
protection_rules:
- type: required_reviewers
required_reviewers:
- devops-team
- type: wait_timer
wait_timer: 5Pipeline Monitoring
Status Checks
# Check workflow status gh run list --workflow=ci.yml --limit=10 # View specific run gh run view [run-id]
Ready-to-use configurations for Anthropic's Claude Code. A comprehensive collection of AI agents, custom commands, settings, hooks, external integrations (MCPs), and project templates to enhance your development workflow.
Repo: davila7/claude-code-templates
Other commands on claude-code-templates.
- /cleanup-cache
Clean system caches (npm, Homebrew, Yarn, browsers, Python/ML) to free disk space
Open command - /create-blog-article
Create an SEO-optimized blog article for a Claude Code component with AI-generated cover image
Open command - /lint
Run Python code linting and formatting tools.
Open command - /test
Run Python tests with pytest, unittest, or other testing frameworks.
Open command - /worktree-check
Check current worktree status, branch, and assigned task
Open command - /worktree-cleanup
Clean up merged worktrees and their branches
Open command

