生成CI 流水线 · CI Pipeline Generator
把仓库现状变成可运行的CI流水线:选型、阶段拆分、触发条件与缓存策略,附安全加固清单和失败排查手册。 Turn your repository's current state into a working CI pipeline with tooling, stages, triggers, and caching, plus security hardening and troubleshooting guides.
$7
Works with the AI tools you already use
生成CI 流水线 · CI Pipeline Generator
Example session with this skill installed
帮我们仓库搭一条 CI 流水线。背景:Node.js + pnpm 的 monorepo,GitHub 私有仓库,目前只有手动 npm test,经常有人提交损坏的代码。要求:PR 时跑 lint + 单测,合并 main 后自动构建 Docker 镜像并推送到 ghcr,构建产物要带版本号;pipeline 单次跑完最好在 8 分钟内。输出 GitHub Actions 配置,并说明每一步为什么这么配。
- Read your context and instructions
- Compiled the ci ci pipeline
结论:用 2 个 workflow 解决:PR 上跑「lint+test」双检查,合并 main 后跑「build+push」。缓存用 pnpm store 与 Docker layer cache,预计 PR 检查 6 分钟内完成;镜像 tag 用 latest + git sha,版本号从 package.json 读取,保证可追溯可回滚。
# .github/workflows/pr.yml(节选)
on: pull_request
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with: { version: 9 }
- uses: actions/setup-node@v4
with: { node-version: 20, cache: pnpm }
- run: pnpm install --frozen-lockfile
- run: pnpm lint
- run: pnpm test --coverage
| 阶段 | 触发时机 | 关键配置 | 为什么 |
|---|---|---|---|
| Lint+Test | PR | frozen-lockfile + pnpm cache | 锁版本、提速约2分钟 |
| 覆盖率门禁 | PR | coverage >= 80% | 防止测试缩水 |
| Build | merge main | multi-stage Docker | 镜像从1.4G降到300M |
| Push | merge main | ghcr + sha tag | 可回滚、可追溯 |
下一步
- 把两个 workflow 文件放进 .github/workflows/,先在一个 PR 上验证 lint+test 通过。
- 在仓库 Secrets 配 GHCR_TOKEN(或改用内置 GITHUB_TOKEN),首次 push 后确认镜像出现在 ghcr。
- 若 8 分钟超时,把 test 拆成 shard 并行跑;仍超时就把 e2e 挪到 nightly 定时任务。
Connects securely to your tools. The creator never sees your data.
What you get
About this skill
它解决什么问题
CI 流水线搭错一步,要么跑一次 20 分钟,要么缓存失效天天全量装依赖,要么密钥被写进日志。这个技能把「照着网上的 YAML 抄」变成按仓库现状设计:先问清技术栈、触发场景与时间预算,再给出阶段拆分、缓存策略与安全边界,一次到位而不是反复试错。
这个技能做什么
围绕 CI 流水线提供结构化生成能力:先澄清仓库技术栈、包管理器、部署目标与构建时长约束,再输出可直接使用的 CI 配置文件(GitHub Actions / GitLab CI 等),同时给出每一步的配置理由、缓存与并行策略、密钥管理方式和失败排查手册。涉及代码时给出文件级操作建议。
为什么比裸提示词强
- 内嵌质量红线:密钥不进日志、缓存键正确、依赖锁版本、产物可追溯逐项检查
- 按生产级标准输出:覆盖触发条件、失败重试、超时设置与回滚考虑
- 结论先行:先给流水线总览,再给配置与理由,评审时一眼看清取舍
- 不确定的信息标注「待确认」,不会替你编造仓库结构
典型用例
- Node.js monorepo 要加 PR 检查与 Docker 镜像推送,预算 8 分钟内跑完
- Python 服务要接入代码覆盖率门禁与自动发布到 PyPI
- 存量流水线跑得慢、缓存总失效,需要诊断并给出改造方案
- 从零起步的小团队需要一个最小可用的 CI 模板并理解每行含义
局限
技能输出的是配置设计与建议,实际接入时需要你按仓库环境调整 runner 类型与密钥设置;涉及私有镜像仓库与生产部署的权限,请自行完成安全审查。
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean today
- Passed all security checks, Safe to install