← Back to repository

ci-cd-pipeline-builder

根据检测到的项目技术栈信号生成实用的CI/CD流水线——快速生成基线、可重复检查、环境感知的部署阶段。适用于为新项目搭建CI、重构现有流水线,或统一多个仓库的部署流程。

slug: ci-cd-pipeline-builder v1.0.0 Engineering Workflow By Alireza Rezvani 9 files · 26.3 KB Updated 2026-10-20 Measured +0.9% ↓ 0 downloads 💬 0 reviews Quality 94/100 by Alireza Rezvani
Sign in to download (1 shrimp) Reviews (0) View JSON
Benchmark 基本持平 deepseek-chat · 2 tasks × 1 samples × 3 repeats · 多轮协作 · 盲评 Methodology →
+0.9%
Average score gap in blind review,
with vs. without the skill.
n=3 次重复均值,区间 -4.6% ~ 7.3%
Bare model 28.3
With skill 28.7
Tested 2026-10-20 2 tasks × 1 samples Blind review · same model, same params Pure conversation — no real commands run
Show per-task details (2)
Task 1 · 我们团队刚接手一个仓库,想先给它搭一套 GitHub Actions 的 CI 基线,但我不想凭感觉写 YAML,你能不能先帮我判断技术栈再生成流水线?
Sample 1 Bare 82.0 vs Skilled 88.0 两份质量接近,A 在部署安全性和对用户'仅 main'要求的精确遵循上略优,B 在命令同源与 Poetry 安装方式上更规范但部署占位会假成功。
Task 2 · 我们现有 GitLab CI 文件是从别的项目复制来的,跑得慢还可能跟实际技术栈对不上,你能先看看它到底哪里不合理,再帮我重写一版吗?
Sample 1 Bare 0.0 vs Skilled 0.0 两份质量接近,A 的配置更简洁一致且诚实标注假设,B 诊断更丰富但个别 YAML 细节(coverage artifacts、needs 依赖)处理不如 A 稳妥。
Community tests Run by users with their own API keys — models and settings vary, for rough comparison only Sign in to test with my key →
Nobody has run it yet. Plug in your own key and test with your daily model — results stay in your records and never enter the official board.
—
☆☆☆☆☆
No ratings yet — tell it like it is after you've used it

One-line install

Downloading requires signing in first (free registration — just a username and password).Sign in →

Reviews · 0

Sign in to post a review.Sign in →

No reviews yet — be the first to share.

Quality check · 94/100

13 automated checks on metadata, examples, executability and completeness, for authors to self-improve; does not affect user ratings.

Version history

SKILL.md content

# 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

```bash
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

```bash
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:

```bash
python3 scripts/pipeline_generator.py --repo . --platform gitlab --output .gitlab-ci.yml
```

### 3. Validate Before Merge

1. Confirm commands exist in project (`test`, `lint`, `build`).
2. Run generated pipeline locally where possible.
3. Ensure required secrets/env vars are documented.
4. 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](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/github-actions-templates.md)
- [references/gitlab-ci-templates.md](references/gitlab-ci-templates.md)
- [references/deployment-gates.md](references/deployment-gates.md)
- [README.md](README.md)