Ci Cd Pipeline Builder

alirezarezvani/claude-skills/engineering/skills/ci-cd-pipeline-builder

作者 alirezarezvani19392f7a0826無授權條款27K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫5 週前更新

Generate pragmatic CI/CD pipelines from detected project stack signals — fast baseline generation, repeatable checks, environment-aware deployment stages. Use when setting up CI for a new project, refactoring existing pipelines, or standardizing deployment workflows across multiple repos.

包含腳本DevOps & Cloud
AI 產生的概覽

根據偵測到的專案技術棧訊號,產生 GitHub Actions 或 GitLab CI 的 CI/CD 管線設定。

功能
從儲存庫檔案中偵測語言、執行環境與工具鏈訊號,並建議 lint、test、build、deploy 等 CI 階段。它會產生 GitHub Actions 或 GitLab CI 的入門 YAML,包含快取與矩陣策略,並可輸出機器可讀的偵測結果。內容也涵蓋合併前驗證以及加入具閘門的部署階段。
適用情境
適用於為新儲存庫建立 CI、取代脆弱的手動複製管線檔案、在 GitHub Actions 與 GitLab CI 之間移轉,或稽核管線步驟是否與實際技術棧相符。
執行需求
需要 Python 3 來執行隨附指令碼 scripts/stack_detector.py 與 scripts/pipeline_generator.py。它會讀取儲存庫檔案,以及來自標準輸入或檔案的可選 JSON 輸入,並將 YAML 寫入標準輸出或指定輸出路徑。未說明需要憑證或網路存取。

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 textpython3 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 [blocked] — common pitfalls, best practices, detection heuristics, generation strategy, platform decision notes, pre-merge validation checklist, and scaling guidance
  • references/github-actions-templates.md [blocked]
  • references/gitlab-ci-templates.md [blocked]
  • references/deployment-gates.md [blocked]
  • README.md [blocked]

來源與署名

來源:alirezarezvani/claude-skills位於engineering/skills/ci-cd-pipeline-builder提交19392f7

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架