工作流生成

Universal

ln-732-cicd-generator

by levnikolaevich

自动分析前后端技术栈与版本,生成适配 .NET 或 Python 项目的 GitHub Actions CI 配置,一次写好 lint、测试、构建和 Docker 校验流程。

帮你快速生成 GitHub Actions CI 配置,省去手写 YAML 的繁琐,尤其适合想低成本搭起规范自动化流程的团队。

405DevOps未扫描2026年3月5日

安装

claude skill add --url github.com/levnikolaevich/claude-code-skills/tree/master/ln-732-cicd-generator

文档

Paths: File paths (shared/, references/, ../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.

ln-732-cicd-generator

Type: L3 Worker Category: 7XX Project Bootstrap Parent: ln-730-devops-setup

Generates GitHub Actions CI pipeline for automated testing and validation.


Purpose & Scope

Creates CI/CD workflow for GitHub:

  • Does: Generate .github/workflows/ci.yml with lint, test, build, docker jobs
  • Does NOT: Configure deployment, manage secrets, set up CD pipelines

Inputs

InputSourceDescription
Stack Typeln-730 coordinatorbackend-dotnet, backend-python
VersionsAuto-detectedNode.js, .NET or Python versions
Frontend PathAuto-detectedPath to frontend directory
Build CommandsAuto-detectednpm scripts, dotnet/pytest commands

Outputs

FilePurposeTemplate
.github/workflows/ci.ymlMain CI pipelinegithub_ci_dotnet.template.yml or github_ci_python.template.yml

Workflow

Phase 1: Stack Analysis

Determine which template to use:

DetectionBackend Template
.sln or .csproj presentgithub_ci_dotnet.template.yml
requirements.txt or pyproject.toml presentgithub_ci_python.template.yml

Detect commands:

  • Frontend: Read scripts from package.json (lint, build, test)
  • .NET: Standard dotnet restore/build/test
  • Python: pip install, ruff lint, pytest

Phase 2: Variable Substitution

Replace template variables:

VariableSourceDefault
{{NODE_VERSION}}package.json engines22
{{DOTNET_VERSION}}*.csproj TargetFramework9.0.x
{{PYTHON_VERSION}}pyproject.toml3.12
{{FRONTEND_PATH}}Directory detectionsrc/frontend

Phase 3: Directory Creation

Create .github/workflows/ directory if not exists.

Phase 4: File Generation

Generate ci.yml from selected template:

  1. Check if workflow already exists (warn before overwrite)
  2. Apply variable substitution
  3. Write to .github/workflows/ci.yml
  4. Validate YAML syntax

Generated Pipeline Structure

Jobs Overview

JobPurposeDependencies
frontendLint, build, test React/ViteNone
backendBuild, test .NET or PythonNone
dockerBuild images, health checksfrontend, backend

Frontend Job Steps

  1. Checkout code
  2. Setup Node.js with caching
  3. Install dependencies (npm ci)
  4. Run linter (npm run lint)
  5. Build application (npm run build)
  6. Run tests (npm test)

Backend Job Steps (.NET)

  1. Checkout code
  2. Setup .NET SDK
  3. Restore dependencies (dotnet restore)
  4. Build (dotnet build)
  5. Run tests (dotnet test)

Backend Job Steps (Python)

  1. Checkout code
  2. Setup Python with pip caching
  3. Install dependencies (pip install -r requirements.txt)
  4. Run linter (ruff check)
  5. Run tests (pytest)

Docker Job Steps

  1. Checkout code
  2. Build images (docker compose build)
  3. Start containers (docker compose up -d)
  4. Wait for startup (30 seconds)
  5. Health check frontend (port 3000)
  6. Health check backend (port 5000/8000)
  7. Show logs on failure
  8. Stop containers (docker compose down)

Triggers

EventBranches
Pushmain, develop
Pull Requestmain

Best Practices Applied

PracticeImplementation
Dependency cachingnpm cache, pip cache
Pinned versionsactions/checkout@v4, setup-node@v4
Parallel jobsfrontend and backend run in parallel
Fail fastdocker job waits for both to succeed
Clean updocker compose down runs always
Debug supportlogs shown on failure

Quality Criteria

Generated workflow must:

  • Pass YAML syntax validation
  • Use pinned action versions (not @latest)
  • Include dependency caching
  • Have health checks for docker job
  • Clean up resources on completion

Critical Notes

  1. GitHub Actions Only: This skill generates only GitHub Actions workflows. No Azure/GitLab support.
  2. Template-based: Use templates from references/. Do NOT hardcode workflow contents.
  3. Idempotent: Check if .github/workflows/ exists. Warn before overwriting ci.yml.
  4. Version Detection: Use detected versions, not hardcoded defaults.

Reference Files

FilePurpose
github_ci.template.ymlFull template with comments
github_ci_dotnet.template.ymlCompact .NET stack template
github_ci_python.template.ymlCompact Python stack template

Version: 1.1.0 Last Updated: 2026-01-10

相关 Skills

可观测性设计

by alirezarezvani

Universal
热门

面向生产系统规划可落地的可观测性体系,串起指标、日志、链路追踪与 SLI/SLO、错误预算、告警和仪表盘设计,适合搭建监控平台与优化故障响应。

把监控、日志、链路追踪串起来,帮助团队从设计阶段构建可观测性,排障更快、系统演进更稳。

DevOps
未扫描11.5k

AWS架构师

by alirezarezvani

Universal
热门

面向初创团队规划 AWS 架构,覆盖 Serverless、ECS、Aurora 等方案,可生成 CloudFormation 模板,兼顾成本优化、CI/CD 搭建与迁移上云。

特别适合创业团队,用无服务器模式和 IaC 模板快速搭好 AWS 架构,连成本优化、CI/CD 与迁移路径都能一并规划。

DevOps
未扫描11.5k

环境密钥管理

by alirezarezvani

Universal
热门

统一梳理dev/staging/prod的.env和密钥流程,自动生成.env.example、校验必填变量、扫描Git历史泄漏,并联动Vault、AWS SSM、1Password、Doppler完成轮换。

统一管理环境变量、密钥与配置,减少泄露和部署混乱,安全治理与团队协作一起做好,DevOps 场景很省心。

DevOps
未扫描11.5k

相关 MCP 服务

kubefwd

编辑精选

by txn2

热门

kubefwd 是让 AI 帮你批量转发 Kubernetes 服务到本地的开发神器。

微服务开发者最头疼的本地调试问题,它一键搞定——自动分配 IP 避免端口冲突,还能用自然语言查询状态。但依赖 AI 工作流,纯命令行爱好者可能觉得不够直接。

DevOps
4.1k

Cloudflare

编辑精选

by Cloudflare

热门

Cloudflare MCP Server 是让你用自然语言管理 Workers、KV 和 R2 等云资源的工具。

这个工具解决了开发者频繁切换控制台和文档的痛点,特别适合那些在 Cloudflare 上部署无服务器应用、需要快速调试或管理配置的团队。不过,由于它依赖多个子服务器,初次设置可能有点繁琐,建议先从 Workers Bindings 这类核心功能入手。

DevOps
3.6k

Terraform

编辑精选

by hashicorp

Terraform MCP Server 是让 AI 助手直接操作 Terraform Registry 和 HCP Terraform 的桥梁。

如果你经常在 Terraform 里翻文档找模块配置,这个服务器能省不少时间——直接问 Claude 就能生成准确的代码片段。最适合管理多云基础设施的团队,但注意它目前只适合本地使用,别在生产环境里暴露 HTTP 端点。

DevOps
1.3k

评论