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 从公开仓库中收录这些内容。

举报或申请下架