ci-cd-pipeline-builder
它能做什么
它查看代码仓库中的文件,识别所用的语言和工具,然后为 GitHub Actions 或 GitLab CI 创建一个入门流水线。适合设置或替换自动化检查的开发者。
适用场景
- ✓当你为新代码仓库设置自动化测试和构建时。
- ✓当你现有的流水线文件很脆弱,或是从其他项目复制过来时。
- ✓当你想在 GitHub Actions 和 GitLab CI 之间迁移流水线时。
技能链接
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/ci-cd-pipeline-builder/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我需要为这个仓库配置一个 GitHub Actions 流水线,运行 lint、测试和构建。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体根据项目文件识别技术栈,然后生成用于代码检查、测试、构建和部署的流水线阶段,并为该技术栈设置合适的缓存。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
CI/CD Pipeline Builder
Tier: POWERFUL
Category: Engineering
Domain: DevOps / Automation
Overview
Use this skill to generate pragmatic CI/CD pipelines from detected project stack signals, not guesswork. It focuses on fast baseline generation, repeatable checks, and environment-aware deployment stages.
Core Capabilities
- Detect language/runtime/tooling from repository files
- Recommend CI stages (
lint,test,build,deploy) - Generate GitHub Actions or GitLab CI starter pipelines
- Include caching and matrix strategy based on detected stack
- Emit machine-readable detection output for automation
- Keep pipeline logic aligned with project lockfiles and build commands
When to Use
- Bootstrapping CI for a new repository
- Replacing brittle copied pipeline files
- Migrating between GitHub Actions and GitLab CI
- Auditing whether pipeline steps match actual stack
- Creating a reproducible baseline before custom hardening
Key Workflows
1. Detect Stack
python3 scripts/stack_detector.py --repo . --format text
python3 scripts/stack_detector.py --repo . --format json > detected-stack.json
Supports input via stdin or --input file for offline analysis payloads.
2. Generate Pipeline From Detection
python3 scripts/pipeline_generator.py \
--input detected-stack.json \
--platform github \
--output .github/workflows/ci.yml \
--format text
Or end-to-end from repo directly:
python3 scripts/pipeline_generator.py --repo . --platform gitlab --output .gitlab-ci.yml
3. Validate Before Merge
- Confirm commands exist in project (
test,lint,build). - Run generated pipeline locally where possible.
- Ensure required secrets/env vars are documented.
- Keep deploy jobs gated by protected branches/environments.
4. Add Deployment Stages Safely
- Start with CI-only (
lint/test/build). - Add staging deploy with explicit environment context.
- Add production deploy with manual gate/approval.
- Keep rollout/rollback commands explicit and auditable.
Script Interfaces
python3 scripts/stack_detector.py --help- Detects stack signals from repository files
- Reads optional JSON input from stdin/
--input
python3 scripts/pipeline_generator.py --help- Generates GitHub/GitLab YAML from detection payload
- Writes to stdout or
--output
References
- references/pipeline-design-notes.md — common pitfalls, best practices, detection heuristics, generation strategy, platform decision notes, pre-merge validation checklist, and scaling guidance
- references/github-actions-templates.md
- references/gitlab-ci-templates.md
- references/deployment-gates.md
- README.md
常见问题
它支持哪些平台?
GitHub Actions 和 GitLab CI。
它怎么知道我的项目使用什么?
检测脚本会读取代码仓库中的文件,例如锁文件和构建配置。
这个流水线可以直接用于生产环境吗?
它是一个基准版本,之后你可能还需要添加自定义的加固措施。
详情
作者的原始描述
Use when setting up or refactoring CI/CD for a repo, before writing workflow YAML. Detects the stack with stack_detector.py and generates the pipeline with pipeline_generator.py.
热度
- GitHub 星标
- 29k
- 排名
- #9579
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-launcher-orchestrator
29k帮你的智能体从一个清晰的目标出发,逐步规划、构建、测试并定时运行你自己账户中的 Claude 托管智能体。
grade-iterate
29k让你的智能体按评分标准为托管 AI 智能体的工作打分,并在固定的轮次内改进,因此它永远不会无限循环。
interview
29k让你的智能体就一个 AI 智能体的想法对你进行访谈,并在任何上线之前,把你的回答整理成一份简单的构建计划。
run-without-you
29k帮你的智能体设置托管 AI 智能体,使其按计划或在某个事件发生时运行,并在启动前检查定时设置。