Token导航 LogoToken导航TokenDH.com
运维和基础设施敏感数据github未标认证来源可访问许可证需确认审计提醒

ci-cd-opsCI CD 操作

Agent Skill

ci-cd-ops 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

259

周安装

11

GitHub Stars

17

下载量

91
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ci-cd-ops(CI CD 操作)
来源仓库:https://github.com/0xdarkmatter/claude-mods
仓库路径:skills/ci-cd-ops
安装命令:
npx skills add https://github.com/0xdarkmatter/claude-mods --skill ci-cd-ops
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/0xdarkmatter/claude-mods --skill ci-cd-ops

简介

用于管理 GitHub Actions 工作流的生命周期,包括触发器、权限和环境变量配置。

  • 提供 secrets 安全管理、缓存优化和跨平台构建的最佳实践模板。
  • 使用时需遵循最少权限原则,禁止将 secrets 输出到日志或 artifacts。
  • 通过 GitHub 安装,需确保 actions/checkout 等组件已固定到 SHA 引用。
  • ci-cd-ops 属于运维和基础设施类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

CI/CD Operations

Comprehensive patterns for continuous integration, delivery, and deployment using GitHub Actions, release automation tools, and testing pipelines.

GitHub Actions Quick Reference

Workflow File Anatomy

name: CI                          # Display name in Actions tab
on:                               # Trigger events
  push:
    branches: [main]
  pull_request:
    branches: [main]

permissions:                      # GITHUB_TOKEN scope (least privilege)
  contents: read
  pull-requests: write

concurrency:                      # Prevent duplicate runs
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

env:                              # Workflow-level environment variables
  NODE_VERSION: "20"

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ env.NODE_VERSION }}
          cache: npm
      - run: npm ci
      - run: npm test

Core Syntax Elements

ElementPurposeExample
onEvent triggerspush, pull_request, schedule
jobs.<id>.runs-onRunner selectionubuntu-latest, self-hosted
jobs.<id>.needsJob dependenciesneeds: [build, lint]
jobs.<id>.ifConditional executionif: github.event_name == 'push'
jobs.<id>.strategy.matrixParallel variantsnode-version: [18, 20, 22]
jobs.<id>.environmentDeployment targetenvironment: production
jobs.<id>.permissionsToken scopecontents: write
steps[*].usesUse an actionuses: actions/checkout@v4
steps[*].runRun a commandrun: npm test
steps[*].envStep environmentenv: {CI: true}

Trigger Decision Tree

ScenarioTriggerConfig
Run tests on every PRpull_requestbranches: [main]
Deploy on merge to mainpushbranches: [main]
Release on version tagpushtags: ['v*']
Nightly buildsschedulecron: '0 2 * * *'
Manual deploymentworkflow_dispatchinputs: {environment:...}
Called by another workflowworkflow_callinputs:, secrets:
On PR label changepull_requesttypes: [labeled]
On issue commentissue_commenttypes: [created]
On release publishedreleasetypes: [published]
On package pushregistry_packagetypes: [published]

Trigger Filter Patterns

on:
  push:
    branches: [main, 'release/**']      # Branch patterns
    paths: ['src/**', '!src/**/*.test.*'] # Path filters (ignore tests)
    tags: ['v*']                          # Tag patterns
  pull_request:
    types: [opened, synchronize, reopened] # Default types
    paths-ignore: ['docs/**', '*.md']     # Ignore docs-only changes

Caching Strategies

EcosystemAction / KeyPathRestore Key
Node (npm)actions/setup-node with cache: npmAutoAuto
Node (pnpm)actions/setup-node with cache: pnpmAutoAuto
Go modulesactions/setup-go with cache: trueAutoAuto
Cargoactions/cache@v4~/.cargo/registry, targetcargo-${{runner.os}}-${{hashFiles('Cargo.lock')}}
pip / uvactions/setup-python with cache: pipAutoAuto
Docker layersdocker/build-push-actionUses buildx cachetype=gha or type=registry
Gradleactions/setup-java with cache: gradleAutoAuto
Composeractions/cache@v4vendorcomposer-${{hashFiles('composer.lock')}}

Manual Cache Example

- uses: actions/cache@v4
  with:
    path: |
      ~/.cargo/bin
      ~/.cargo/registry
      ~/.cargo/git
      target
    key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
    restore-keys: |
      cargo-${{ runner.os }}-

Matrix Strategy

strategy:
  fail-fast: false                    # Don't cancel siblings on failure
  max-parallel: 4                     # Limit concurrent jobs
  matrix:
    os: [ubuntu-latest, windows-latest, macos-latest]
    node-version: [18, 20, 22]
    include:                          # Add specific combos
      - os: ubuntu-latest
        node-version: 22
        coverage: true
    exclude:                          # Remove specific combos
      - os: windows-latest
        node-version: 18

Dynamic Matrix

prepare:
  runs-on: ubuntu-latest
  outputs:
    matrix: ${{ steps.set.outputs.matrix }}
  steps:
    - id: set
      run: echo "matrix=$(jq -c . matrix.json)" >> "$GITHUB_OUTPUT"

test:
  needs: prepare
  strategy:
    matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}

Secrets Management

ScopeAccessUse Case
Repository secretsAll workflows in repoAPI keys, tokens
Environment secretsJobs targeting that environmentProduction credentials
Organization secretsSelected repos in orgShared service accounts
OIDC tokensFederated identityCloud deployment (no stored secrets)

Secrets Best Practices

# Reference secrets - NEVER echo or log them
- run: deploy --token ${{ secrets.DEPLOY_TOKEN }}

# Mask custom values
- run: echo "::add-mask::$CUSTOM_SECRET"

# Use environments for deployment secrets
jobs:
  deploy:
    environment: production           # Requires approval + has secrets
    steps:
      - run: deploy --key ${{ secrets.PROD_API_KEY }}

OIDC for Cloud (No Stored Secrets)

permissions:
  id-token: write
  contents: read

steps:
  - uses: aws-actions/configure-aws-credentials@v4
    with:
      role-to-assume: arn:aws:iam::123456789:role/github-actions
      aws-region: us-east-1

Common Workflow Patterns

Test on Pull Request

name: Test
on:
  pull_request:
    branches: [main]
concurrency:
  group: test-${{ github.head_ref }}
  cancel-in-progress: true
jobs:
  test:
    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 lint
      - run: npm test -- --coverage

Deploy on Merge to Main

name: Deploy
on:
  push:
    branches: [main]
jobs:
  deploy:
    runs-on: ubuntu-latest
    environment: production
    steps:
      - uses: actions/checkout@v4
      - run: npm ci && npm run build
      - run: npx wrangler deploy
        env:
          CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}

Release on Tag

name: Release
on:
  push:
    tags: ['v*']
permissions:
  contents: write
jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with: { fetch-depth: 0 }
      - run: |
          gh release create ${{ github.ref_name }} \
            --generate-notes \
            --title "${{ github.ref_name }}"
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Gotchas Table

GotchaProblemFix
Shallow clonegit describe fails, history missingactions/checkout@v4 with fetch-depth: 0
Default permissionsGITHUB_TOKEN is read-only by defaultSet permissions: explicitly
Action pinning@main can break without warningPin to SHA: @abc123 or @v4
Fork PR secretsSecrets unavailable on fork PRsUse pull_request_target carefully
Concurrent deploysRace condition on productionUse concurrency: groups
Stale cachesCache grows unboundedInclude lockfile hash in key
Node.js versionsetup-node defaults varyAlways specify node-version
Docker layer cacheRebuilds everything without cacheUse cache-from: type=gha
Matrix + environmentEach matrix job needs approvalUse a single deploy job after matrix
Path filters + required checksSkipped jobs block mergeUse paths-filter action or make checks non-required
GITHUB_TOKEN in PRsCannot trigger other workflowsUse a PAT or GitHub App token
Windows line endingsScripts fail with \r\nUse .gitattributes or core.autocrlf

Expression Syntax Quick Reference

ExpressionResult
${{github.event_name}}push, pull_request, etc.
${{github.ref_name}}Branch or tag name
${{github.sha}}Full commit SHA
${{github.actor}}User who triggered
${{runner.os}}Linux, Windows, macOS
${{contains(github.event.head_commit.message, '[skip ci]')}}Check commit message
${{needs.build.outputs.version}}Output from prior job
${{fromJson(steps.meta.outputs.json)}}Parse JSON output
${{hashFiles('**/package-lock.json')}}Hash for cache keys
${{format('refs/heads/{0}', matrix.branch)}}String formatting
${{toJson(matrix)}}Debug: print matrix config

Step Outputs

steps:
  - id: version
    run: echo "value=$(cat VERSION)" >> "$GITHUB_OUTPUT"

  - run: echo "Version is ${{ steps.version.outputs.value }}"

Job Outputs (for Cross-Job Communication)

jobs:
  build:
    runs-on: ubuntu-latest
    outputs:
      artifact-id: ${{ steps.upload.outputs.artifact-id }}
    steps:
      - id: upload
        run: echo "artifact-id=abc123" >> "$GITHUB_OUTPUT"

  deploy:
    needs: build
    runs-on: ubuntu-latest
    steps:
      - run: echo "Deploying ${{ needs.build.outputs.artifact-id }}"

Reference Files

FileContents
references/github-actions.mdComplete workflow syntax, reusable workflows, composite actions, OIDC, runners, debugging
references/release-automation.mdSemantic versioning, semantic-release, changesets, goreleaser, changelog, publishing
references/testing-pipelines.mdTest stages, parallelism, coverage, service containers, e2e in CI, deployment pipelines

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.8%
按下载量换算32

Claude

31.99%
按下载量换算29

Cursor

18.54%
按下载量换算17

Gemini CLI

9.29%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills