ci-cd-pipeline

ci-cd-pipeline is a skill for Claude Code, Codex from Wade-DevCode/awesome-coding-skills-cn. It costs 27 tokens per session (2,209 once invoked), scanned A, original, MIT.

A guide to CI/CD pipelines, which automatically check, build, and deploy code. It focuses on ordered stages, repeatable builds, caching, traceable outputs, and rollback.

In plain words
What is it for?
Use it when creating or changing GitHub Actions, GitLab CI, or Jenkins files; fixing unreliable pipelines; adding a new environment; or removing hard-coded secrets and hidden dependencies.
Why use it?
It prevents failed checks from reaching deployment, inconsistent builds caused by changing dependencies, slow repeated installs, and releases that cannot be identified or reversed.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/wade-devcode/awesome-coding-skills-cn/ci-cd-pipeline
Any agent
npx skills add Wade-DevCode/awesome-coding-skills-cn --skill ci-cd-pipeline
Clone the repo
git clone --depth 1 https://github.com/Wade-DevCode/awesome-coding-skills-cn

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ci-cd-pipeline

README.md
[![agentmods](https://agentmods.dev/badge/skills/wade-devcode/awesome-coding-skills-cn/ci-cd-pipeline.svg)](https://agentmods.dev/skills/wade-devcode/awesome-coding-skills-cn/ci-cd-pipeline)
Your own site
<a href="https://agentmods.dev/skills/wade-devcode/awesome-coding-skills-cn/ci-cd-pipeline"><img src="https://agentmods.dev/badge/skills/wade-devcode/awesome-coding-skills-cn/ci-cd-pipeline.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,209 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00027 $0.02209
Opus 5 $0.00014 $0.01104
Sonnet 5 $0.00005 $0.00442
Haiku 4.5 $0.00003 $0.00221

Measured 4d ago against content hash 62956ba152c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ci-cd-pipeline scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ci-cd-pipeline/SKILL.md · 200 lines

How it starts

The opening of the file, as written. The whole thing — 200 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CI/CD 流水线

何时用

  • 新建或修改任何 CI/CD 配置文件(GitHub Actions、GitLab CI、Jenkinsfile 等)。
  • 流水线频繁失败、构建结果不一致、部署不可回滚时。
  • 接入新项目或新环境时设计部署策略。
  • 发现流水线中存在硬编码密钥或依赖隐式环境时。

核心规则

1. 阶段清晰,前序失败即停

规则: 流水线按 lint → test → build → deploy 顺序分阶段,每个阶段只做一件事;前序阶段失败,后续阶段不执行。

为什么: AI 生成的 CI 配置最常见的问题是把 lint、测试、构建、部署全塞进一个 job,或者测试失败后继续往生产部署。曾见过真实事故:测试报告里明确有失败用例,因为 YAML 里 continue-on-error: true 被随手加上,部署仍然执行,问题代码上了生产。

怎么做:

# GitHub Actions 示例
jobs:
  lint:
    runs-on: ubuntu-latest
    steps: [...]

  test:
    needs: lint        # ✅ 显式依赖,lint 失败即停
    runs-on: ubuntu-latest
    steps: [...]

  build:
    needs: test        # ✅ 测试通过才构建
    steps: [...]

  deploy:
    needs: build
    if: github.ref == 'refs/heads/main'   # ✅ 只部署 main 分支
    steps: [...]
  • 不加 continue-on-error: true,除非确实需要收集所有失败报告再决策。

2. 构建可重复:锁版本 + 缓存 + 产物带标识

规则: 锁定所有工具和依赖的版本;缓存依赖目录加速重复构建;构建产物打上版本标识(commit SHA 或语义版本),使每次构建可追溯。

为什么: AI 配置 CI 时倾向于用 npm install(不加 --frozen-lockfile)、不固定 Action 版本(uses: actions/checkout@main)、不给镜像打 tag。结果:同一份代码在不同时间构建出不同产物,线上出问题却无法精确定位是哪个版本,依赖每次都重新下载让构建平均耗时从 30 秒变成 5 分钟。

怎么做:

- uses: actions/setup-node@v4          # ✅ 固定 Action 版本
  with:
    node-version: '20'
    cache: 'npm'                        # ✅ 启用依赖缓存

- run: npm ci                           # ✅ 使用 lockfile,拒绝版本漂移

- name: Build & tag image
  run: |
    IMAGE_TAG="${{ github.sha }}"       # ✅ 用 commit SHA 作镜像标签
    docker build -t myapp:${IMAGE_TAG} .
    docker push myapp:${IMAGE_TAG}

3. 密钥走 secret store,最小权限

规则: 所有密钥、API token、部署凭据通过 CI 平台的 secret 机制注入,绝不硬编码进 YAML;为 CI 服务账号配置最小权限(只读仓库 + 只写目标服务),不用个人账号或 admin token。

为什么: AI 生成 CI 配置时极容易在 env: 块里直接写 AWS_SECRET_KEY: "AKIA..." 或在 run: 步骤里明文打印环境变量。这类配置一旦提交进公开仓库,密钥立刻面临泄露,且 git 历史删不干净。2023 年 GitHub 上每天有数千个 API key 因为这类配置被意外泄露。

怎么做:

- name: Deploy
  env:
    AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}       # ✅ 引用 secret
    AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
  run: aws s3 sync dist/ s3://my-bucket/
  # ❌ 不要 run: echo $AWS_SECRET_ACCESS_KEY(日志会打印出来)
  • IAM role / OIDC 优于长期密钥;部署账号只有目标环境的写权限,无法操作其他环境。

Read the full file on GitHub · 200 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 200 lines · 27 tokens per session scan A 62956ba152c8

Subscribe to this mod's changes

ci-cd-pipeline is a skill published in the GitHub repository Wade-DevCode/awesome-coding-skills-cn (6 stars, last pushed 2mo ago), licensed MIT. It adds 27 tokens to every session and 2,209 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

chinese-documentation

中文文档排版参考——中英文空格、全半角标点、术语保留、链接格式、中文文案排版指北约定。仅在用户显式 /chinese-documentation 时调用,不要根据上下文自动触发。.

jnMetaCode/superpowers-zh · 62 tokens

chinese-git-workflow

国内 Git 平台配置参考——Gitee、Coding.net、极狐 GitLab、CNB 的 SSH/HTTPS/凭据/CI 接入差异与镜像同步配置。仅在用户显式 /chinese-git-workflow 时调用,不要根据上下文自动触发。.

jnMetaCode/superpowers-zh · 69 tokens

brainstorming

在任何创造性工作之前必须使用此技能——创建功能、构建组件、添加功能或修改行为。在实现之前先探索用户意图、需求和设计。.

jnMetaCode/superpowers-zh · 40 tokens

chinese-code-review

中文 review 沟通参考——话术模板、分级标注(必须修复/建议修改/仅供参考)、国内团队常见反模式应对。仅在用户显式 /chinese-code-review 时调用,不要根据上下文自动触发。.

jnMetaCode/superpowers-zh · 62 tokens

chinese-commit-conventions

中文 commit 与 changelog 配置参考——Conventional Commits 中文适配、commitlint/husky/commitizen 中文模板、conventional-changelog 中文配置。仅在用户显式 /chinese-commit-conventions 时调用,不要根据上下文自动触发。.

jnMetaCode/superpowers-zh · 65 tokens

mcp-builder

MCP 服务器构建方法论 — 系统化构建生产级 MCP 工具,让 AI 助手连接外部能力.

jnMetaCode/superpowers-zh · 32 tokens