/ci-setup
Setup continuous integration pipeline
$ npx -y skills add qdhenry/Claude-Command-Suite --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-setup
Context preview
What this command does when you run it.
Setup continuous integration pipeline
Command definition
ci-setup.mdCI/CD Setup Command
Setup continuous integration pipeline
Instructions
Follow this systematic approach to implement CI/CD: **$ARGUMENTS**
1. **Project Analysis**
- Identify the technology stack and deployment requirements
- Review existing build and test processes
- Understand deployment environments (dev, staging, prod)
- Assess current version control and branching strategy
2. **CI/CD Platform Selection**
- Choose appropriate CI/CD platform based on requirements:
- **GitHub Actions**: Native GitHub integration, extensive marketplace
- **GitLab CI**: Built-in GitLab, comprehensive DevOps platform
- **Jenkins**: Self-hosted, highly customizable, extensive plugins
- **CircleCI**: Cloud-based, optimized for speed
- **Azure DevOps**: Microsoft ecosystem integration
- **AWS CodePipeline**: AWS-native solution
3. **Repository Setup**
- Ensure proper `.gitignore` configuration
- Set up branch protection rules
- Configure merge requirements and reviews
- Establish semantic versioning strategy
4. **Build Pipeline Configuration**
**GitHub Actions Example:**
name: CI/CD Pipeline
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- run: npm ci
- run: npm run test
- run: npm run build**GitLab CI Example:**
stages:
- test
- build
- deploy
test:
stage: test
script:
- npm ci
- npm run test
cache:
paths:
- node_modules/5. **Environment Configuration**
- Set up environment variables and secrets
- Configure different environments (dev, staging, prod)
- Implement environment-specific configurations
- Set up secure secret management
6. **Automated Testing Integration**
- Configure unit test execution
- Set up integration test running
- Implement E2E test execution
- Configure test reporting and coverage
**Multi-stage Testing:**
test:
strategy:
matrix:
node-version: [16, 18, 20]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test7. **Code Quality Gates**
- Integrate linting and formatting checks
- Set up static code analysis (SonarQube, CodeClimate)
- Configure security vulnerability scanning
- Implement code coverage thresholds
8. **Build Optimization**
- Configure build caching strategies
- Implement parallel job execution
- Optimize Docker image builds
- Set up artifact management
**Caching Example:**
- name: Cache node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-9. **Docker Integration**
- Create optimized Dockerfiles
- Set up multi-stage builds
- Configure container registry integration
- Implement security scanning for images
**Multi-stage Dockerfile:**
FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
FROM node:18-alpine AS runtime
WORKDIR /app
COPY --from=builder /app/node_modules ./node_modules
COPY . .
EXPOSE 3000
CMD ["npm", "start"]
10. **Deployment Strategies**
- Implement blue-green deployment
- Set up canary releases
- Configure rolling updates
- Implement feature flags integration
11. **Infrastructure as Code**
- Use Terraform, CloudFormation, or similar tools
- Version control infrastructure definitions
- Implement infrastructure testing
- Set up automated infrastructure provisioning
12. **Monitoring and Observability**
- Set up application performance monitoring
- Configure log aggregation and analysis
- Implement health checks and alerting
- Set up deployment notifications
13. **Security Integration**
- Implement dependency vulnerability scanning
- Set up container security scanning
- Configure SAST (Static Application Security Testing)
- Implement secrets scanning
**Security Scanning Example:**
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}14. **Database Migration Handling**
- Automate database schema migrations
- Implement rollback strategies
- Set up database seeding for testing
- Configure backup and recovery procedures
15. **Performance Testing Integration**
- Set up load testing in pipeline
- Configure performance benchmarks
- Implement performance regression detection
- Set up performance monitoring
16. **Multi-Environment Deployment**
- Configure staging environment deployment
- Set up production deployment with approvals
- Implement environment promotion workflow
- Configure environment-specific configurations
**Environment Deployment:**
deploy-staging:
needs: test
if: github.ref == 'refs/heads/develop'
runs-on: ubuntu-latest
steps:
- name: Deploy to staging
run: |
# Deploy to staging environment
deploy-production:
needs: test
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment: production
steps:
- name: Deploy to production
run: |
# Deploy tRead more
CI/CD Setup Command
Setup continuous integration pipeline
Instructions
Follow this systematic approach to implement CI/CD: **$ARGUMENTS**
1. **Project Analysis**
- Identify the technology stack and deployment requirements
- Review existing build and test processes
- Understand deployment environments (dev, staging, prod)
- Assess current version control and branching strategy
2. **CI/CD Platform Selection**
- Choose appropriate CI/CD platform based on requirements:
- **GitHub Actions**: Native GitHub integration, extensive marketplace
- **GitLab CI**: Built-in GitLab, comprehensive DevOps platform
- **Jenkins**: Self-hosted, highly customizable, extensive plugins
- **CircleCI**: Cloud-based, optimized for speed
- **Azure DevOps**: Microsoft ecosystem integration
- **AWS CodePipeline**: AWS-native solution
3. **Repository Setup**
- Ensure proper `.gitignore` configuration
- Set up branch protection rules
- Configure merge requirements and reviews
- Establish semantic versioning strategy
4. **Build Pipeline Configuration**
**GitHub Actions Example:**
name: CI/CD Pipeline
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- run: npm ci
- run: npm run test
- run: npm run build**GitLab CI Example:**
stages:
- test
- build
- deploy
test:
stage: test
script:
- npm ci
- npm run test
cache:
paths:
- node_modules/5. **Environment Configuration**
- Set up environment variables and secrets
- Configure different environments (dev, staging, prod)
- Implement environment-specific configurations
- Set up secure secret management
6. **Automated Testing Integration**
- Configure unit test execution
- Set up integration test running
- Implement E2E test execution
- Configure test reporting and coverage
**Multi-stage Testing:**
test:
strategy:
matrix:
node-version: [16, 18, 20]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test7. **Code Quality Gates**
- Integrate linting and formatting checks
- Set up static code analysis (SonarQube, CodeClimate)
- Configure security vulnerability scanning
- Implement code coverage thresholds
8. **Build Optimization**
- Configure build caching strategies
- Implement parallel job execution
- Optimize Docker image builds
- Set up artifact management
**Caching Example:**
- name: Cache node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-9. **Docker Integration**
- Create optimized Dockerfiles
- Set up multi-stage builds
- Configure container registry integration
- Implement security scanning for images
**Multi-stage Dockerfile:**
FROM node:18-alpine AS builder WORKDIR /app COPY package*.json ./ RUN npm ci --only=production FROM node:18-alpine AS runtime WORKDIR /app COPY --from=builder /app/node_modules ./node_modules COPY . . EXPOSE 3000 CMD ["npm", "start"]
10. **Deployment Strategies**
- Implement blue-green deployment
- Set up canary releases
- Configure rolling updates
- Implement feature flags integration
11. **Infrastructure as Code**
- Use Terraform, CloudFormation, or similar tools
- Version control infrastructure definitions
- Implement infrastructure testing
- Set up automated infrastructure provisioning
12. **Monitoring and Observability**
- Set up application performance monitoring
- Configure log aggregation and analysis
- Implement health checks and alerting
- Set up deployment notifications
13. **Security Integration**
- Implement dependency vulnerability scanning
- Set up container security scanning
- Configure SAST (Static Application Security Testing)
- Implement secrets scanning
**Security Scanning Example:**
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}14. **Database Migration Handling**
- Automate database schema migrations
- Implement rollback strategies
- Set up database seeding for testing
- Configure backup and recovery procedures
15. **Performance Testing Integration**
- Set up load testing in pipeline
- Configure performance benchmarks
- Implement performance regression detection
- Set up performance monitoring
16. **Multi-Environment Deployment**
- Configure staging environment deployment
- Set up production deployment with approvals
- Implement environment promotion workflow
- Configure environment-specific configurations
**Environment Deployment:**
deploy-staging:
needs: test
if: github.ref == 'refs/heads/develop'
runs-on: ubuntu-latest
steps:
- name: Deploy to staging
run: |
# Deploy to staging environment
deploy-production:
needs: test
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment: production
steps:
- name: Deploy to production
run: |
# Deploy tA comprehensive development toolkit designed following Anthropic's Claude Code Best Practices for AI-assisted software development.
Repo: qdhenry/Claude-Command-Suite
Other commands on claude-command-suite.
- /boundary-bbcr-fallback
Execute automatic BBCR (Collapse-Rebirth Correction) when knowledge boundaries are exceeded or reasoning fails.
Open command - /boundary-detect
Analyze semantic position relative to knowledge boundaries to prevent hallucination and identify uncertainty zones.
Open command - /boundary-heatmap
Generate a visual heatmap of knowledge boundaries showing safe zones, risk areas, and semantic coverage.
Open command - /boundary-risk-assess
Evaluate the current risk level and provide detailed analysis of potential hallucination or reasoning failure.
Open command - /boundary-safe-bridge
Find and construct semantic bridges to safely navigate from current position to target concept without crossing dangerous boundaries.
Open command - /optimize-prompt
Takes an input prompt and returns ONLY a token-optimized version that preserves meaning while minimizing token count. Based on LLM tokenization principles: common words tokenize more efficiently, unusual words break into more tokens, and conciseness reduces cost.
Open command

