流水线搭建

Universal

CI/CD Pipeline Builder

by alirezarezvani

自动识别仓库语言、运行时与构建信号,生成贴合项目实际的 GitHub Actions 或 GitLab CI 流水线,适合新仓库初始化、平台迁移和校验现有 CI 配置。

帮你把 CI/CD 流水线和部署流程快速串起来,尤其适合复杂 DevOps 场景,省下大量重复配置与排障时间。

12.1k编码与调试未扫描2026年3月5日

安装

claude skill add --url github.com/alirezarezvani/claude-skills/tree/main/engineering/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

Common Pitfalls

  1. Copying a Node pipeline into Python/Go repos
  2. Enabling deploy jobs before stable tests
  3. Forgetting dependency cache keys
  4. Running expensive matrix builds for every trivial branch
  5. Missing branch protections around prod deploy jobs
  6. Hardcoding secrets in YAML instead of CI secret stores

Best Practices

  1. Detect stack first, then generate pipeline.
  2. Keep generated baseline under version control.
  3. Add one optimization at a time (cache, matrix, split jobs).
  4. Require green CI before deployment jobs.
  5. Use protected environments for production credentials.
  6. Regenerate pipeline when stack changes significantly.

References

Detection Heuristics

The stack detector prioritizes deterministic file signals over heuristics:

  • Lockfiles determine package manager preference
  • Language manifests determine runtime families
  • Script commands (if present) drive lint/test/build commands
  • Missing scripts trigger conservative placeholder commands

Generation Strategy

Start with a minimal, reliable pipeline:

  1. Checkout and setup runtime
  2. Install dependencies with cache strategy
  3. Run lint, test, build in separate steps
  4. Publish artifacts only after passing checks

Then layer advanced behavior (matrix builds, security scans, deploy gates).

Platform Decision Notes

  • GitHub Actions for tight GitHub ecosystem integration
  • GitLab CI for integrated SCM + CI in self-hosted environments
  • Keep one canonical pipeline source per repo to reduce drift

Validation Checklist

  1. Generated YAML parses successfully.
  2. All referenced commands exist in the repo.
  3. Cache strategy matches package manager.
  4. Required secrets are documented, not embedded.
  5. Branch/protected-environment rules match org policy.

Scaling Guidance

  • Split long jobs by stage when runtime exceeds 10 minutes.
  • Introduce test matrix only when compatibility truly requires it.
  • Separate deploy jobs from CI jobs to keep feedback fast.
  • Track pipeline duration and flakiness as first-class metrics.

相关 Skills

网页构建器

by anthropics

Universal
热门

面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。

在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。

编码与调试
未扫描121.2k

前端设计

by anthropics

Universal
热门

面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。

想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。

编码与调试
未扫描121.2k

网页应用测试

by anthropics

Universal
热门

用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。

借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。

编码与调试
未扫描121.2k

相关 MCP 服务

GitHub

编辑精选

by GitHub

热门

GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。

这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。

编码与调试
84.2k

by Context7

热门

Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。

它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。

编码与调试
53.3k

by tldraw

热门

tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。

这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。

编码与调试
46.4k

评论