[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6E26D0V93R25Y12RYKAREKN":3,"skill-same:01M6E26D0V93R25Y12RYKAREKN":84},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":6,"ownerHtmlUrl":53,"ownerBlogUrl":6,"ownerDescription":54,"updatedAt":55,"install":56,"resources":69},"01M6E26D0V93R25Y12RYKAREKN","cicd-expert",null,"Expert-level CI\u002FCD pipeline development. Use when building GitHub Actions, GitLab CI, Jenkins, CircleCI, or ArgoCD pipelines, implementing automated testing, deployment strategies (blue\u002Fgreen, canary), or release automation. Also use when the user mentions 'GitHub Actions', 'pipeline', 'CI\u002FCD', 'deployment strategy', 'blue-green', 'canary', 'rollback', 'automated testing', or 'release automation'.","luokai0\u002Fai-agent-skills-by-luo-kai","luokai0","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F266954973?v=4","01M6E16VNT42JB8B3X3254QWJ7","luo kai","01M6E16VTFVP6S5XJF1V1MPV90",14,"MIT","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F05-devops-and-cloud (by Luo Kai)\u002F07-cicd\u002Fcicd-expert\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"cicd expert","expert","cicd","canary","automated testing","strategies","green","deployment strategies","use","strategy","argocd","testing","pipeline","github actions","ci","actions","development","deployment","gitlab","automation","2026-11-10 10:12:30",false,"---\nauthor: luo-kai\nname: cicd-expert\ndescription: Expert-level CI\u002FCD pipeline development. Use when building GitHub Actions, GitLab CI, Jenkins, CircleCI, or ArgoCD pipelines, implementing automated testing, deployment strategies (blue\u002Fgreen, canary), or release automation. Also use when the user mentions 'GitHub Actions', 'pipeline', 'CI\u002FCD', 'deployment strategy', 'blue-green', 'canary', 'rollback', 'automated testing', or 'release automation'.\nlicense: MIT\nmetadata:\n  author: luokai0\n  version: \"1.0\"\n  category: coding\n---\n\n# CI\u002FCD Expert\n\nYou are an expert in CI\u002FCD pipelines and DevOps automation with deep knowledge of GitHub Actions, GitLab CI, deployment strategies, and release engineering.\n\n## Before Starting\n\n1. **Platform** — GitHub Actions, GitLab CI, Jenkins, CircleCI?\n2. **Deployment target** — Kubernetes, ECS, EC2, serverless, static?\n3. **Language\u002Fframework** — Node.js, Python, Go, Java?\n4. **Deployment strategy** — rolling, blue\u002Fgreen, canary?\n5. **Problem type** — writing pipeline, speeding up builds, deployment issues?\n\n---\n\n## Core Expertise Areas\n\n- **GitHub Actions**: workflows, jobs, steps, matrices, reusable workflows, composite actions\n- **GitLab CI**: stages, jobs, artifacts, cache, environments, rules\n- **Docker in CI**: layer caching, multi-stage builds, registry push, image scanning\n- **Testing**: unit, integration, e2e in CI, test parallelism, flaky test handling\n- **Deployment strategies**: rolling, blue\u002Fgreen, canary, feature flags\n- **Release automation**: semantic versioning, changelogs, GitHub releases, tagging\n- **Secrets management**: GitHub secrets, OIDC auth, vault integration\n- **Observability**: pipeline metrics, deployment tracking, rollback triggers\n\n---\n\n## Key Patterns & Code\n\n### GitHub Actions — Full CI\u002FCD Pipeline\n```yaml\nname: CI\u002FCD\n\non:\n  push:\n    branches: [main, develop]\n  pull_request:\n    branches: [main]\n  release:\n    types: [published]\n\nconcurrency:\n  group: ci-${{ github.ref }}\n  cancel-in-progress: true  # cancel older runs on same branch\n\nenv:\n  NODE_VERSION: \"20\"\n  REGISTRY: ghcr.io\n  IMAGE_NAME: ${{ github.repository }}\n\njobs:\n  # ── Job 1: Lint & Type Check ──────────────────────────────────────────────\n  lint:\n    name: Lint & Type Check\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: ${{ env.NODE_VERSION }}\n          cache: npm\n\n      - run: npm ci\n      - run: npm run lint\n      - run: npm run typecheck\n\n  # ── Job 2: Unit Tests ─────────────────────────────────────────────────────\n  test:\n    name: Unit Tests\n    runs-on: ubuntu-latest\n    needs: lint\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: ${{ env.NODE_VERSION }}\n          cache: npm\n\n      - run: npm ci\n      - run: npm run test:coverage\n\n      - name: Upload coverage\n        uses: codecov\u002Fcodecov-action@v4\n        with:\n          token: ${{ secrets.CODECOV_TOKEN }}\n\n  # ── Job 3: Build & Push Docker Image ─────────────────────────────────────\n  build:\n    name: Build & Push Image\n    runs-on: ubuntu-latest\n    needs: test\n    permissions:\n      contents: read\n      packages: write\n    outputs:\n      image-digest: ${{ steps.build.outputs.digest }}\n      image-tag: ${{ steps.meta.outputs.tags }}\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Set up Docker Buildx\n        uses: docker\u002Fsetup-buildx-action@v3\n\n      - name: Log in to Container Registry\n        uses: docker\u002Flogin-action@v3\n        with:\n          registry: ${{ env.REGISTRY }}\n          username: ${{ github.actor }}\n          password: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Extract Docker metadata\n        id: meta\n        uses: docker\u002Fmetadata-action@v5\n        with:\n          images: ${{ env.REGISTRY }}\u002F${{ env.IMAGE_NAME }}\n          tags: |\n            type=ref,event=branch\n            type=ref,event=pr\n            type=semver,pattern={{version}}\n            type=sha,prefix=sha-\n\n      - name: Build and push\n        id: build\n        uses: docker\u002Fbuild-push-action@v5\n        with:\n          context: .\n          push: ${{ github.event_name != 'pull_request' }}\n          tags: ${{ steps.meta.outputs.tags }}\n          labels: ${{ steps.meta.outputs.labels }}\n          cache-from: type=gha\n          cache-to: type=gha,mode=max\n          platforms: linux\u002Famd64,linux\u002Farm64\n\n  # ── Job 4: Deploy to Staging ──────────────────────────────────────────────\n  deploy-staging:\n    name: Deploy to Staging\n    runs-on: ubuntu-latest\n    needs: build\n    if: github.ref == 'refs\u002Fheads\u002Fdevelop'\n    environment:\n      name: staging\n      url: https:\u002F\u002Fstaging.example.com\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Configure AWS credentials (OIDC — no static keys)\n        uses: aws-actions\u002Fconfigure-aws-credentials@v4\n        with:\n          role-to-assume: arn:aws:iam::123456789:role\u002FGitHubActionsStaging\n          aws-region: us-east-1\n\n      - name: Deploy to ECS\n        run: |\n          aws ecs update-service \\\n            --cluster staging \\\n            --service api \\\n            --force-new-deployment \\\n            --region us-east-1\n\n  # ── Job 5: Deploy to Production ───────────────────────────────────────────\n  deploy-prod:\n    name: Deploy to Production\n    runs-on: ubuntu-latest\n    needs: build\n    if: github.event_name == 'release'\n    environment:\n      name: production\n      url: https:\u002F\u002Fexample.com\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Configure AWS credentials (OIDC)\n        uses: aws-actions\u002Fconfigure-aws-credentials@v4\n        with:\n          role-to-assume: arn:aws:iam::123456789:role\u002FGitHubActionsProduction\n          aws-region: us-east-1\n\n      - name: Deploy to ECS\n        run: |\n          aws ecs update-service \\\n            --cluster production \\\n            --service api \\\n            --force-new-deployment\n```\n\n### Reusable Workflow\n```yaml\n# .github\u002Fworkflows\u002Fdeploy.yml — reusable workflow\nname: Deploy\n\non:\n  workflow_call:\n    inputs:\n      environment:\n        required: true\n        type: string\n      image-tag:\n        required: true\n        type: string\n    secrets:\n      aws-role-arn:\n        required: true\n\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n    environment: ${{ inputs.environment }}\n    steps:\n      - name: Configure AWS\n        uses: aws-actions\u002Fconfigure-aws-credentials@v4\n        with:\n          role-to-assume: ${{ secrets.aws-role-arn }}\n          aws-region: us-east-1\n\n      - name: Deploy\n        run: |\n          echo \"Deploying ${{ inputs.image-tag }} to ${{ inputs.environment }}\"\n          aws ecs update-service --cluster ${{ inputs.environment }} --service api --force-new-deployment\n\n# Calling the reusable workflow\n# .github\u002Fworkflows\u002Fmain.yml\njobs:\n  deploy-staging:\n    uses: .\u002F.github\u002Fworkflows\u002Fdeploy.yml\n    with:\n      environment: staging\n      image-tag: ${{ needs.build.outputs.image-tag }}\n    secrets:\n      aws-role-arn: ${{ secrets.STAGING_AWS_ROLE_ARN }}\n```\n\n### Matrix Testing\n```yaml\njobs:\n  test:\n    name: Test (Node ${{ matrix.node }}, OS ${{ matrix.os }})\n    runs-on: ${{ matrix.os }}\n    strategy:\n      fail-fast: false  # run all combinations even if one fails\n      matrix:\n        node: [\"18\", \"20\", \"22\"]\n        os: [ubuntu-latest, windows-latest, macos-latest]\n        exclude:\n          - os: windows-latest\n            node: \"18\"\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: ${{ matrix.node }}\n      - run: npm ci\n      - run: npm test\n```\n\n### Caching Strategies\n```yaml\n# Node.js — cache node_modules\n- uses: actions\u002Fsetup-node@v4\n  with:\n    node-version: \"20\"\n    cache: npm  # built-in npm cache\n\n# Python — cache pip packages\n- uses: actions\u002Fsetup-python@v5\n  with:\n    python-version: \"3.12\"\n    cache: pip\n\n# Go — cache Go modules\n- uses: actions\u002Fsetup-go@v5\n  with:\n    go-version: \"1.22\"\n    cache: true\n\n# Custom cache\n- uses: actions\u002Fcache@v4\n  with:\n    path: |\n      ~\u002F.npm\n      node_modules\n      .next\u002Fcache\n    key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}\n    restore-keys: |\n      ${{ runner.os }}-node-\n\n# Docker layer cache via GitHub Actions Cache\n- uses: docker\u002Fbuild-push-action@v5\n  with:\n    cache-from: type=gha\n    cache-to: type=gha,mode=max\n```\n\n### Blue\u002FGreen Deployment on ECS\n```bash\n#!\u002Fbin\u002Fbash\n# blue-green-deploy.sh\n\nset -euo pipefail\n\nCLUSTER=\"production\"\nSERVICE=\"api\"\nNEW_IMAGE=\"$1\"\nREGION=\"us-east-1\"\n\necho \"Starting blue\u002Fgreen deployment...\"\n\n# Get current task definition\nTASK_DEF=$(aws ecs describe-services   --cluster $CLUSTER   --services $SERVICE   --query 'services[0].taskDefinition'   --output text)\n\n# Register new task definition with updated image\nNEW_TASK_DEF=$(aws ecs describe-task-definition   --task-definition $TASK_DEF   --query 'taskDefinition' |   jq --arg IMAGE \"$NEW_IMAGE\"   '.containerDefinitions[0].image = $IMAGE |\n   del(.taskDefinitionArn, .revision, .status, .requiresAttributes, .compatibilities, .registeredAt, .registeredBy)')\n\nNEW_TASK_ARN=$(aws ecs register-task-definition   --cli-input-json \"$NEW_TASK_DEF\"   --query 'taskDefinition.taskDefinitionArn'   --output text)\n\necho \"New task definition: $NEW_TASK_ARN\"\n\n# Update service with new task definition\naws ecs update-service   --cluster $CLUSTER   --service $SERVICE   --task-definition $NEW_TASK_ARN   --region $REGION\n\n# Wait for deployment to complete\necho \"Waiting for deployment to stabilize...\"\naws ecs wait services-stable   --cluster $CLUSTER   --services $SERVICE   --region $REGION\n\necho \"Deployment complete!\"\n\n# Verify health\nRUNNING=$(aws ecs describe-services   --cluster $CLUSTER   --services $SERVICE   --query 'services[0].runningCount'   --output text)\n\necho \"Running tasks: $RUNNING\"\n```\n\n### Canary Deployment with Kubernetes\n```yaml\n# canary-deploy.yml GitHub Action step\n- name: Canary Deploy\n  run: |\n    # Deploy canary with 10% traffic\n    kubectl set image deployment\u002Fapi-canary       api=${{ env.IMAGE }}:${{ github.sha }}\n\n    kubectl scale deployment\u002Fapi-canary --replicas=1\n\n    # Wait and check error rate\n    sleep 300  # 5 minutes\n\n    ERROR_RATE=$(kubectl exec -it prometheus-0 --       promtool query instant       'rate(http_requests_total{status=~\"5..\"}[5m]) \u002F rate(http_requests_total[5m])'       | grep -oP '\\d+\\.\\d+')\n\n    if (( $(echo \"$ERROR_RATE > 0.01\" | bc -l) )); then\n      echo \"Error rate $ERROR_RATE exceeds threshold, rolling back\"\n      kubectl rollout undo deployment\u002Fapi-canary\n      exit 1\n    fi\n\n    # Promote to full rollout\n    kubectl set image deployment\u002Fapi       api=${{ env.IMAGE }}:${{ github.sha }}\n    kubectl rollout status deployment\u002Fapi\n```\n\n### Semantic Release Automation\n```yaml\n# .github\u002Fworkflows\u002Frelease.yml\nname: Release\n\non:\n  push:\n    branches: [main]\n\njobs:\n  release:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: write\n      issues: write\n      pull-requests: write\n    steps:\n      - uses: actions\u002Fcheckout@v4\n        with:\n          fetch-depth: 0  # full history for semantic-release\n\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: \"20\"\n          cache: npm\n\n      - run: npm ci\n\n      - name: Semantic Release\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}\n        run: npx semantic-release\n```\n```json\n\u002F\u002F .releaserc.json\n{\n  \"branches\": [\"main\"],\n  \"plugins\": [\n    \"@semantic-release\u002Fcommit-analyzer\",\n    \"@semantic-release\u002Frelease-notes-generator\",\n    \"@semantic-release\u002Fchangelog\",\n    \"@semantic-release\u002Fnpm\",\n    \"@semantic-release\u002Fgithub\",\n    [\"@semantic-release\u002Fgit\", {\n      \"assets\": [\"CHANGELOG.md\", \"package.json\"],\n      \"message\": \"chore(release): v${nextRelease.version} [skip ci]\"\n    }]\n  ]\n}\n```\n\n### GitLab CI Pipeline\n```yaml\n# .gitlab-ci.yml\nstages:\n  - lint\n  - test\n  - build\n  - deploy\n\nvariables:\n  DOCKER_DRIVER: overlay2\n  IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA\n\ndefault:\n  image: node:20-alpine\n  cache:\n    key: $CI_COMMIT_REF_SLUG\n    paths:\n      - node_modules\u002F\n\nlint:\n  stage: lint\n  script:\n    - npm ci\n    - npm run lint\n    - npm run typecheck\n\ntest:\n  stage: test\n  script:\n    - npm ci\n    - npm run test:coverage\n  coverage: '\u002FLines\\s*:\\s*(\\d+\\.\\d+)%\u002F'\n  artifacts:\n    reports:\n      coverage_report:\n        coverage_format: cobertura\n        path: coverage\u002Fcobertura-coverage.xml\n\nbuild:\n  stage: build\n  image: docker:24\n  services:\n    - docker:24-dind\n  before_script:\n    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY\n  script:\n    - docker build -t $IMAGE_TAG .\n    - docker push $IMAGE_TAG\n  only:\n    - main\n    - develop\n\ndeploy-staging:\n  stage: deploy\n  environment:\n    name: staging\n    url: https:\u002F\u002Fstaging.example.com\n  script:\n    - kubectl set image deployment\u002Fapi api=$IMAGE_TAG\n  only:\n    - develop\n\ndeploy-prod:\n  stage: deploy\n  environment:\n    name: production\n    url: https:\u002F\u002Fexample.com\n  script:\n    - kubectl set image deployment\u002Fapi api=$IMAGE_TAG\n  when: manual  # requires manual approval\n  only:\n    - main\n```\n\n### Branch Protection & Required Checks\n```yaml\n# Enforce these in GitHub repository settings:\n# Settings > Branches > Branch protection rules\n\nRequired status checks:\n  - lint\n  - test\n  - build\n\nRequired reviews: 1\nDismiss stale reviews: true\nRequire up-to-date branches: true\nRestrict pushes: only CI service account\n```\n\n---\n\n## Best Practices\n\n- Use OIDC for cloud authentication — never store static cloud credentials as secrets\n- Cache dependencies aggressively — biggest CI speedup available\n- Use concurrency groups to cancel redundant runs on the same branch\n- Pin action versions to full SHA — not just tag (e.g. actions\u002Fcheckout@v4 is fine, but SHA is safer)\n- Run lint and typecheck before tests — fail fast on cheap checks first\n- Use environments with protection rules for staging and production deployments\n- Store test results and coverage as artifacts for visibility\n- Use matrix builds to test across multiple versions and platforms\n- Never auto-deploy to production on push — require a release event or manual approval\n\n---\n\n## Common Pitfalls\n\n| Pitfall | Problem | Fix |\n|---|---|---|\n| Static cloud credentials in secrets | Credentials can leak or expire | Use OIDC role assumption instead |\n| No dependency caching | Slow builds (npm install every time) | Cache node_modules\u002Fpip\u002Fgo modules |\n| Deploying on every push to main | Accidental production deploys | Deploy only on release events or manual trigger |\n| No concurrency control | Parallel runs on same branch cause conflicts | Add concurrency group with cancel-in-progress |\n| Pinning actions to tags only | Tag can be moved to malicious commit | Pin to full commit SHA for security |\n| No rollback strategy | Bad deploy = manual intervention | Always have automated rollback on health check failure |\n| Ignoring flaky tests | False failures erode CI trust | Track and fix flaky tests immediately |\n| Long sequential pipelines | Slow feedback loop | Parallelize independent jobs |\n\n---\n\n## Related Skills\n\n- **docker-expert**: For building and pushing container images\n- **kubernetes-expert**: For deploying to Kubernetes clusters\n- **aws-expert**: For AWS CodePipeline and ECS deployments\n- **terraform-expert**: For infrastructure changes in CI\u002FCD\n- **monitoring-expert**: For deployment health tracking\n- **git-expert**: For branching strategies and conventional commits\n","# CI\u002FCD Expert\n\nYou are an expert in CI\u002FCD pipelines and DevOps automation with deep knowledge of GitHub Actions, GitLab CI, deployment strategies, and release engineering.\n\n## Before Starting\n\n1. **Platform** — GitHub Actions, GitLab CI, Jenkins, CircleCI?\n2. **Deployment target** — Kubernetes, ECS, EC2, serverless, static?\n3. **Language\u002Fframework** — Node.js, Python, Go, Java?\n4. **Deployment strategy** — rolling, blue\u002Fgreen, canary?\n5. **Problem type** — writing pipeline, speeding up builds, deployment issues?\n\n---\n\n## Core Expertise Areas\n\n- **GitHub Actions**: workflows, jobs, steps, matrices, reusable workflows, composite actions\n- **GitLab CI**: stages, jobs, artifacts, cache, environments, rules\n- **Docker in CI**: layer caching, multi-stage builds, registry push, image scanning\n- **Testing**: unit, integration, e2e in CI, test parallelism, flaky test handling\n- **Deployment strategies**: rolling, blue\u002Fgreen, canary, feature flags\n- **Release automation**: semantic versioning, changelogs, GitHub releases, tagging\n- **Secrets management**: GitHub secrets, OIDC auth, vault integration\n- **Observability**: pipeline metrics, deployment tracking, rollback triggers\n\n---\n\n## Key Patterns & Code\n\n### GitHub Actions — Full CI\u002FCD Pipeline\n```yaml\nname: CI\u002FCD\n\non:\n  push:\n    branches: [main, develop]\n  pull_request:\n    branches: [main]\n  release:\n    types: [published]\n\nconcurrency:\n  group: ci-${{ github.ref }}\n  cancel-in-progress: true  # cancel older runs on same branch\n\nenv:\n  NODE_VERSION: \"20\"\n  REGISTRY: ghcr.io\n  IMAGE_NAME: ${{ github.repository }}\n\njobs:\n  # ── Job 1: Lint & Type Check ──────────────────────────────────────────────\n  lint:\n    name: Lint & Type Check\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: ${{ env.NODE_VERSION }}\n          cache: npm\n\n      - run: npm ci\n      - run: npm run lint\n      - run: npm run typecheck\n\n  # ── Job 2: Unit Tests ─────────────────────────────────────────────────────\n  test:\n    name: Unit Tests\n    runs-on: ubuntu-latest\n    needs: lint\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: ${{ env.NODE_VERSION }}\n          cache: npm\n\n      - run: npm ci\n      - run: npm run test:coverage\n\n      - name: Upload coverage\n        uses: codecov\u002Fcodecov-action@v4\n        with:\n          token: ${{ secrets.CODECOV_TOKEN }}\n\n  # ── Job 3: Build & Push Docker Image ─────────────────────────────────────\n  build:\n    name: Build & Push Image\n    runs-on: ubuntu-latest\n    needs: test\n    permissions:\n      contents: read\n      packages: write\n    outputs:\n      image-digest: ${{ steps.build.outputs.digest }}\n      image-tag: ${{ steps.meta.outputs.tags }}\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Set up Docker Buildx\n        uses: docker\u002Fsetup-buildx-action@v3\n\n      - name: Log in to Container Registry\n        uses: docker\u002Flogin-action@v3\n        with:\n          registry: ${{ env.REGISTRY }}\n          username: ${{ github.actor }}\n          password: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Extract Docker metadata\n        id: meta\n        uses: docker\u002Fmetadata-action@v5\n        with:\n          images: ${{ env.REGISTRY }}\u002F${{ env.IMAGE_NAME }}\n          tags: |\n            type=ref,event=branch\n            type=ref,event=pr\n            type=semver,pattern={{version}}\n            type=sha,prefix=sha-\n\n      - name: Build and push\n        id: build\n        uses: docker\u002Fbuild-push-action@v5\n        with:\n          context: .\n          push: ${{ github.event_name != 'pull_request' }}\n          tags: ${{ steps.meta.outputs.tags }}\n          labels: ${{ steps.meta.outputs.labels }}\n          cache-from: type=gha\n          cache-to: type=gha,mode=max\n          platforms: linux\u002Famd64,linux\u002Farm64\n\n  # ── Job 4: Deploy to Staging ──────────────────────────────────────────────\n  deploy-staging:\n    name: Deploy to Staging\n    runs-on: ubuntu-latest\n    needs: build\n    if: github.ref == 'refs\u002Fheads\u002Fdevelop'\n    environment:\n      name: staging\n      url: https:\u002F\u002Fstaging.example.com\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Configure AWS credentials (OIDC — no static keys)\n        uses: aws-actions\u002Fconfigure-aws-credentials@v4\n        with:\n          role-to-assume: arn:aws:iam::123456789:role\u002FGitHubActionsStaging\n          aws-region: us-east-1\n\n      - name: Deploy to ECS\n        run: |\n          aws ecs update-service \\\n            --cluster staging \\\n            --service api \\\n            --force-new-deployment \\\n            --region us-east-1\n\n  # ── Job 5: Deploy to Production ───────────────────────────────────────────\n  deploy-prod:\n    name: Deploy to Production\n    runs-on: ubuntu-latest\n    needs: build\n    if: github.event_name == 'release'\n    environment:\n      name: production\n      url: https:\u002F\u002Fexample.com\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Configure AWS credentials (OIDC)\n        uses: aws-actions\u002Fconfigure-aws-credentials@v4\n        with:\n          role-to-assume: arn:aws:iam::123456789:role\u002FGitHubActionsProduction\n          aws-region: us-east-1\n\n      - name: Deploy to ECS\n        run: |\n          aws ecs update-service \\\n            --cluster production \\\n            --service api \\\n            --force-new-deployment\n```\n\n### Reusable Workflow\n```yaml\n# .github\u002Fworkflows\u002Fdeploy.yml — reusable workflow\nname: Deploy\n\non:\n  workflow_call:\n    inputs:\n      environment:\n        required: true\n        type: string\n      image-tag:\n        required: true\n        type: string\n    secrets:\n      aws-role-arn:\n        required: true\n\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n    environment: ${{ inputs.environment }}\n    steps:\n      - name: Configure AWS\n        uses: aws-actions\u002Fconfigure-aws-credentials@v4\n        with:\n          role-to-assume: ${{ secrets.aws-role-arn }}\n          aws-region: us-east-1\n\n      - name: Deploy\n        run: |\n          echo \"Deploying ${{ inputs.image-tag }} to ${{ inputs.environment }}\"\n          aws ecs update-service --cluster ${{ inputs.environment }} --service api --force-new-deployment\n\n# Calling the reusable workflow\n# .github\u002Fworkflows\u002Fmain.yml\njobs:\n  deploy-staging:\n    uses: .\u002F.github\u002Fworkflows\u002Fdeploy.yml\n    with:\n      environment: staging\n      image-tag: ${{ needs.build.outputs.image-tag }}\n    secrets:\n      aws-role-arn: ${{ secrets.STAGING_AWS_ROLE_ARN }}\n```\n\n### Matrix Testing\n```yaml\njobs:\n  test:\n    name: Test (Node ${{ matrix.node }}, OS ${{ matrix.os }})\n    runs-on: ${{ matrix.os }}\n    strategy:\n      fail-fast: false  # run all combinations even if one fails\n      matrix:\n        node: [\"18\", \"20\", \"22\"]\n        os: [ubuntu-latest, windows-latest, macos-latest]\n        exclude:\n          - os: windows-latest\n            node: \"18\"\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: ${{ matrix.node }}\n      - run: npm ci\n      - run: npm test\n```\n\n### Caching Strategies\n```yaml\n# Node.js — cache node_modules\n- uses: actions\u002Fsetup-node@v4\n  with:\n    node-version: \"20\"\n    cache: npm  # built-in npm cache\n\n# Python — cache pip packages\n- uses: actions\u002Fsetup-python@v5\n  with:\n    python-version: \"3.12\"\n    cache: pip\n\n# Go — cache Go modules\n- uses: actions\u002Fsetup-go@v5\n  with:\n    go-version: \"1.22\"\n    cache: true\n\n# Custom cache\n- uses: actions\u002Fcache@v4\n  with:\n    path: |\n      ~\u002F.npm\n      node_modules\n      .next\u002Fcache\n    key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}\n    restore-keys: |\n      ${{ runner.os }}-node-\n\n# Docker layer cache via GitHub Actions Cache\n- uses: docker\u002Fbuild-push-action@v5\n  with:\n    cache-from: type=gha\n    cache-to: type=gha,mode=max\n```\n\n### Blue\u002FGreen Deployment on ECS\n```bash\n#!\u002Fbin\u002Fbash\n# blue-green-deploy.sh\n\nset -euo pipefail\n\nCLUSTER=\"production\"\nSERVICE=\"api\"\nNEW_IMAGE=\"$1\"\nREGION=\"us-east-1\"\n\necho \"Starting blue\u002Fgreen deployment...\"\n\n# Get current task definition\nTASK_DEF=$(aws ecs describe-services   --cluster $CLUSTER   --services $SERVICE   --query 'services[0].taskDefinition'   --output text)\n\n# Register new task definition with updated image\nNEW_TASK_DEF=$(aws ecs describe-task-definition   --task-definition $TASK_DEF   --query 'taskDefinition' |   jq --arg IMAGE \"$NEW_IMAGE\"   '.containerDefinitions[0].image = $IMAGE |\n   del(.taskDefinitionArn, .revision, .status, .requiresAttributes, .compatibilities, .registeredAt, .registeredBy)')\n\nNEW_TASK_ARN=$(aws ecs register-task-definition   --cli-input-json \"$NEW_TASK_DEF\"   --query 'taskDefinition.taskDefinitionArn'   --output text)\n\necho \"New task definition: $NEW_TASK_ARN\"\n\n# Update service with new task definition\naws ecs update-service   --cluster $CLUSTER   --service $SERVICE   --task-definition $NEW_TASK_ARN   --region $REGION\n\n# Wait for deployment to complete\necho \"Waiting for deployment to stabilize...\"\naws ecs wait services-stable   --cluster $CLUSTER   --services $SERVICE   --region $REGION\n\necho \"Deployment complete!\"\n\n# Verify health\nRUNNING=$(aws ecs describe-services   --cluster $CLUSTER   --services $SERVICE   --query 'services[0].runningCount'   --output text)\n\necho \"Running tasks: $RUNNING\"\n```\n\n### Canary Deployment with Kubernetes\n```yaml\n# canary-deploy.yml GitHub Action step\n- name: Canary Deploy\n  run: |\n    # Deploy canary with 10% traffic\n    kubectl set image deployment\u002Fapi-canary       api=${{ env.IMAGE }}:${{ github.sha }}\n\n    kubectl scale deployment\u002Fapi-canary --replicas=1\n\n    # Wait and check error rate\n    sleep 300  # 5 minutes\n\n    ERROR_RATE=$(kubectl exec -it prometheus-0 --       promtool query instant       'rate(http_requests_total{status=~\"5..\"}[5m]) \u002F rate(http_requests_total[5m])'       | grep -oP '\\d+\\.\\d+')\n\n    if (( $(echo \"$ERROR_RATE > 0.01\" | bc -l) )); then\n      echo \"Error rate $ERROR_RATE exceeds threshold, rolling back\"\n      kubectl rollout undo deployment\u002Fapi-canary\n      exit 1\n    fi\n\n    # Promote to full rollout\n    kubectl set image deployment\u002Fapi       api=${{ env.IMAGE }}:${{ github.sha }}\n    kubectl rollout status deployment\u002Fapi\n```\n\n### Semantic Release Automation\n```yaml\n# .github\u002Fworkflows\u002Frelease.yml\nname: Release\n\non:\n  push:\n    branches: [main]\n\njobs:\n  release:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: write\n      issues: write\n      pull-requests: write\n    steps:\n      - uses: actions\u002Fcheckout@v4\n        with:\n          fetch-depth: 0  # full history for semantic-release\n\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: \"20\"\n          cache: npm\n\n      - run: npm ci\n\n      - name: Semantic Release\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}\n        run: npx semantic-release\n```\n```json\n\u002F\u002F .releaserc.json\n{\n  \"branches\": [\"main\"],\n  \"plugins\": [\n    \"@semantic-release\u002Fcommit-analyzer\",\n    \"@semantic-release\u002Frelease-notes-generator\",\n    \"@semantic-release\u002Fchangelog\",\n    \"@semantic-release\u002Fnpm\",\n    \"@semantic-release\u002Fgithub\",\n    [\"@semantic-release\u002Fgit\", {\n      \"assets\": [\"CHANGELOG.md\", \"package.json\"],\n      \"message\": \"chore(release): v${nextRelease.version} [skip ci]\"\n    }]\n  ]\n}\n```\n\n### GitLab CI Pipeline\n```yaml\n# .gitlab-ci.yml\nstages:\n  - lint\n  - test\n  - build\n  - deploy\n\nvariables:\n  DOCKER_DRIVER: overlay2\n  IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA\n\ndefault:\n  image: node:20-alpine\n  cache:\n    key: $CI_COMMIT_REF_SLUG\n    paths:\n      - node_modules\u002F\n\nlint:\n  stage: lint\n  script:\n    - npm ci\n    - npm run lint\n    - npm run typecheck\n\ntest:\n  stage: test\n  script:\n    - npm ci\n    - npm run test:coverage\n  coverage: '\u002FLines\\s*:\\s*(\\d+\\.\\d+)%\u002F'\n  artifacts:\n    reports:\n      coverage_report:\n        coverage_format: cobertura\n        path: coverage\u002Fcobertura-coverage.xml\n\nbuild:\n  stage: build\n  image: docker:24\n  services:\n    - docker:24-dind\n  before_script:\n    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY\n  script:\n    - docker build -t $IMAGE_TAG .\n    - docker push $IMAGE_TAG\n  only:\n    - main\n    - develop\n\ndeploy-staging:\n  stage: deploy\n  environment:\n    name: staging\n    url: https:\u002F\u002Fstaging.example.com\n  script:\n    - kubectl set image deployment\u002Fapi api=$IMAGE_TAG\n  only:\n    - develop\n\ndeploy-prod:\n  stage: deploy\n  environment:\n    name: production\n    url: https:\u002F\u002Fexample.com\n  script:\n    - kubectl set image deployment\u002Fapi api=$IMAGE_TAG\n  when: manual  # requires manual approval\n  only:\n    - main\n```\n\n### Branch Protection & Required Checks\n```yaml\n# Enforce these in GitHub repository settings:\n# Settings > Branches > Branch protection rules\n\nRequired status checks:\n  - lint\n  - test\n  - build\n\nRequired reviews: 1\nDismiss stale reviews: true\nRequire up-to-date branches: true\nRestrict pushes: only CI service account\n```\n\n---\n\n## Best Practices\n\n- Use OIDC for cloud authentication — never store static cloud credentials as secrets\n- Cache dependencies aggressively — biggest CI speedup available\n- Use concurrency groups to cancel redundant runs on the same branch\n- Pin action versions to full SHA — not just tag (e.g. actions\u002Fcheckout@v4 is fine, but SHA is safer)\n- Run lint and typecheck before tests — fail fast on cheap checks first\n- Use environments with protection rules for staging and production deployments\n- Store test results and coverage as artifacts for visibility\n- Use matrix builds to test across multiple versions and platforms\n- Never auto-deploy to production on push — require a release event or manual approval\n\n---\n\n## Common Pitfalls\n\n| Pitfall | Problem | Fix |\n|---|---|---|\n| Static cloud credentials in secrets | Credentials can leak or expire | Use OIDC role assumption instead |\n| No dependency caching | Slow builds (npm install every time) | Cache node_modules\u002Fpip\u002Fgo modules |\n| Deploying on every push to main | Accidental production deploys | Deploy only on release events or manual trigger |\n| No concurrency control | Parallel runs on same branch cause conflicts | Add concurrency group with cancel-in-progress |\n| Pinning actions to tags only | Tag can be moved to malicious commit | Pin to full commit SHA for security |\n| No rollback strategy | Bad deploy = manual intervention | Always have automated rollback on health check failure |\n| Ignoring flaky tests | False failures erode CI trust | Track and fix flaky tests immediately |\n| Long sequential pipelines | Slow feedback loop | Parallelize independent jobs |\n\n---\n\n## Related Skills\n\n- **docker-expert**: For building and pushing container images\n- **kubernetes-expert**: For deploying to Kubernetes clusters\n- **aws-expert**: For AWS CodePipeline and ECS deployments\n- **terraform-expert**: For infrastructure changes in CI\u002FCD\n- **monitoring-expert**: For deployment health tracking\n- **git-expert**: For branching strategies and conventional commits\n",{"name":5,"author":44,"license":15,"metadata":45,"description":7},"luo-kai",{"author":9,"version":46,"category":47},"1.0","coding","main","4d2fb89cdfb75f3f6fd3c6c5ec9ad90ea129eb3c","ai-agent-skills\u002F05-devops-and-cloud (by Luo Kai)\u002F07-cicd\u002Fcicd-expert",2,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai","https:\u002F\u002Fgithub.com\u002Fluokai0","a solo builder.","2026-05-06 04:29:04",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add luokai0\u002Fai-agent-skills-by-luo-kai --skill cicd-expert",{"tool":62,"command":63},"bunx","bunx skills add luokai0\u002Fai-agent-skills-by-luo-kai --skill cicd-expert",{"tool":65,"command":66},"pnpm","pnpm dlx skills add luokai0\u002Fai-agent-skills-by-luo-kai --skill cicd-expert","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F05-devops-and-cloud (by Luo Kai)\u002F07-cicd\u002Fcicd-expert\u002FSKILL.md",true,[70,76,80],{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"generate-image.js","SCRIPT","脚本",5235,"https:\u002F\u002Fgithub.com\u002Frunecraftai\u002Farcanum\u002Fblob\u002Fmain\u002Fpackages\u002Ffamiliar\u002Fskills\u002Fnano-banana\u002Fgenerate-image.js",{"path":77,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":78,"sourceHtmlUrl":79},"inspect-response.js",838,"https:\u002F\u002Fgithub.com\u002Frunecraftai\u002Farcanum\u002Fblob\u002Fmain\u002Fpackages\u002Ffamiliar\u002Fskills\u002Fnano-banana\u002Finspect-response.js",{"path":81,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":82,"sourceHtmlUrl":83},"test-runner.js",985,"https:\u002F\u002Fgithub.com\u002Frunecraftai\u002Farcanum\u002Fblob\u002Fmain\u002Fpackages\u002Ffamiliar\u002Fskills\u002Fnano-banana\u002Ftest-runner.js",[85,112,129,154,180,204],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":39},"01M6F2SKTE208174C7S7JJCZC7","write-contracts","Generates secure Aptos Move V2 smart contracts with Object model, Digital Asset integration, security patterns, and storage type guidance. Includes comprehensive storage decision framework for optimal data structure selection. Triggers on: 'write contract', 'create NFT collection', 'build marketplace', 'implement minting', 'generate Move module', 'create token contract', 'build DAO', 'implement staking'. Ask storage questions when: 'store', 'track', 'registry', 'mapping', 'list', 'collection'.","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fwrite-contracts\u002FSKILL.md",[],[92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111],"write","contracts","write contracts","storage","secure","create","generate","collection","model","decision","ask","smart-contracts","selection","objects","structure","nft","token","aptos","critical","move",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":39},"01M6F2RFXJ6T9MKW0A7N7GM45B","web-search","通用网络搜索技能，支持多引擎搜索（百度、必应、DuckDuckGo），无需API密钥即可获取实时信息","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fweb-search-ex-skill\u002FSKILL.md",[],[119,120,121,122,123,124,125,126,127,128],"web","search","web search","搜索","baidu","bing","duckduckgo","百度","多引擎","internet",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":39},"01M6F2K968G1FZEZFPW2E6B222","solo-build","Execute implementation plan tasks with TDD workflow, auto-commit, and phase gates. Use when user says \"build it\", \"start building\", \"execute plan\", \"implement tasks\", \"ship it\", or references a track ID. Do NOT use for planning (use \u002Fplan) or scaffolding (use \u002Fscaffold).","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fsolo-build\u002FSKILL.md",[],[136,137,138,139,140,141,142,143,120,144,145,146,92,147,148,149,150,151,152,153],"build","solo","solo build","MCP","workflow","commit","tasks","code","Bash","plan","read","auto","references","context7","query","scaffolding","ship it","project",{"skillNo":155,"name":156,"nameZh":6,"description":157,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":158,"categories":159,"keywords":160,"publishedAt":39},"01M6F2GKN39SGHSPWYB3662YC8","react-email","Use when building HTML email templates with React components, adding a visual email editor to an application using the React Email visual editor, rendering emails to HTML, or sending emails with Resend. Covers welcome emails, password resets, notifications, order confirmations, newsletters, transactional emails, and the embeddable email editor component.","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Freact-email-skills\u002FSKILL.md",[],[161,162,163,164,165,166,167,168,169,170,171,172,173,27,174,175,176,177,178,179],"react","email","react email","github","editor","components","react components","component","welcome","https","notifications","password","node","html","resend","visual","emails","rendering","with",{"skillNo":181,"name":182,"nameZh":6,"description":183,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":184,"categories":185,"keywords":186,"publishedAt":39},"01M6F2FBVGVDFSG8SSFJGXA40C","APITester Agent-Driven API Testing","Test API endpoints and document responses. Define tests in plain English, run them, get formatted results. Agent-driven Postman alternative.","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fopenclaw-api-tester\u002FSKILL.md",[],[30,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203],"api","api testing","driven","APITester Agent Driven API Testing","test","run","postman","results","plain english","tester","endpoints","document","get","define","tests","english","api-tester",{"skillNo":205,"name":206,"nameZh":6,"description":207,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":208,"categories":209,"keywords":210,"publishedAt":39},"01M6F273Y3NGAPVJZ608BC0G9G","hubspot-implementation-plan","Generate a phased implementation plan from a HubSpot audit report. Creates prioritized, sequenced cleanup processes with effort estimates, dependencies, and automation feasibility. Use after running \u002Fhubspot-audit.","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fhubspot-implementation-plan\u002FSKILL.md",[],[145,211,212,213,38,214,215,98,216,217,218,219,220,27,221,222,179,223],"implementation","hubspot","hubspot implementation plan","feasibility","cleanup","planning","report","audit","audit report","phased implementation","dependencies","processes","hubspot audit"]