Cicd Templates Generator

# SKILL.md — CI/CD Templates Generator

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "Cicd Templates Generator" with this command: npx skills add shenghoo123-png/cicd-templates-generator

SKILL.md — CI/CD Templates Generator

Identity

Name: CI/CD Templates Generator (cicd-gen) Type: CLI Tool + OpenClaw Skill Purpose: 一键生成生产级 CI/CD workflow 文件(GitHub Actions / GitLab CI / Jenkins) Author: kay Version: 1.0.0


Triggers

cicd-gen <language> [framework] [options]

触发词示例:

  • "生成 Python Flask CI/CD workflow"
  • "创建 GitHub Actions workflow for pytest + Docker"
  • "GitLab CI for Node.js + Jest"
  • "Generate Jenkinsfile for Go + goreleaser"
  • "多平台 CI/CD: Python + pytest + Docker"
  • "帮我创建一个 CI/CD workflow"
  • "CI/CD 模板生成"

Capabilities

支持的语言与框架

语言框架测试框架部署选项发布
Pythonflask, django, fastapipytest, unittestdocker, azure, aliyun, tencent, k8s, serverless
JavaScriptnode, expressjest, mochadocker, azure, aliyun, tencentnpm publish
Gogin, echogo-testdockergoreleaser

支持的场景

  • 定时任务 (cron): 集成于 GitHub Actions on.schedule
  • PR 测试: 集成于 on.pull_request
  • 自动发布: goreleaser / npm publish
  • 多平台矩阵: 同时输出 GitHub Actions + GitLab CI + Jenkinsfile
  • Docker 构建推送: docker build + push 到 Docker Hub
  • 云部署: Azure Web App / 阿里云 ECS / 腾讯云 / Kubernetes / Serverless

CLI Usage

# 基本用法
cicd-gen python flask --test pytest --output ./.github/workflows/

# Python + pytest + Docker
cicd-gen python flask --test pytest --deploy docker

# Python + pytest + Docker + Azure 部署
cicd-gen python flask --test pytest --deploy docker --cloud azure

# Python + unittest + 覆盖率
cicd-gen python django --test unittest --coverage

# JavaScript + Jest
cicd-gen javascript node --test jest

# JavaScript + Jest + Docker + npm 发布
cicd-gen javascript node --test jest --deploy docker --release npm

# Go + goreleaser
cicd-gen go gin --test go-test --release goreleaser

# 多平台输出
cicd-gen python flask --test pytest --format all

# 仅打印不写文件
cicd-gen python flask --test pytest --print-only

# 自定义版本
cicd-gen python flask --test pytest --python-version 3.10 --name "My CI"

参数说明

参数说明默认值
languagepython / javascript / go必填
frameworkflask / django / node / gin / echo 等可选
--test, -t测试框架自动检测 (pytest/jest/go-test)
--deploy, -d部署目标
--release, -r发布工具 (npm/goreleaser)
--coverage, -c启用覆盖率报告False
--cloud云服务商 (azure/aliyun/tencent)
--format, -fgithub / gitlab / jenkins / allgithub
--output, -o输出目录./.github/workflows
--name, -nworkflow 名称CI
--python-versionPython 版本3.11
--node-versionNode 版本20
--go-versionGo 版本1.22
--print-only仅打印,不写文件False

Installation

pip install cicd-gen
# 或本地安装
cd cicd-templates-generator && pip install -e .

Technical Details

  • 语言: Python 3.8+
  • 依赖: pyyaml
  • CLI 入口: cicd-gen
  • 代码行数: 单文件 ≤ 500 行(generator 模块各自独立)
  • 测试: 25 个单元测试,全部通过

输出示例

GitHub Actions (.github/workflows/ci.yml)

name: CI
on:
  push:
    branches: [main, master]
  pull_request:
    branches: [main, master]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
      - name: Set up Python 3.11
        uses: actions/setup-python@v5
        with:
          python-version: '3.11'
      - name: Install dependencies
        run: pip install -r requirements.txt pytest
      - name: Run tests
        run: pytest
      - name: Log in to Docker Hub
        uses: docker/login-action@v3
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      - name: Build and push Docker image
        uses: docker/build-push-action@v5
        with:
          context: .
          push: true
          tags: ${{ secrets.DOCKERHUB_USERNAME }}/app:latest

文件结构

cicd-templates-generator/
├── cicd_gen/
│   ├── __init__.py
│   ├── cli.py                    # CLI 入口
│   └── generator/
│       ├── __init__.py           # BaseGenerator
│       ├── github_actions.py     # GitHub Actions 生成器
│       ├── gitlab_ci.py          # GitLab CI 生成器
│       └── jenkins.py            # Jenkinsfile 生成器
├── tests/
│   └── test_cicd_gen.py          # 单元测试
├── setup.py
├── SKILL.md
└── DESIGN-cicd-templates-generator.md

Integration with OpenClaw

当用户请求创建 CI/CD workflow 时:

  1. 解析用户意图(语言、框架、需求)
  2. 调用 cicd-gen CLI 生成对应 workflow
  3. 展示生成结果(--print-only 模式)
  4. 可选:写入项目目录
# 示例调用
cicd-gen python flask --test pytest --deploy docker --print-only

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

xCloud Docker Deploy

Deploy any project to xCloud hosting — auto-detects stack (WordPress, Laravel, PHP, Node.js, Next.js, NestJS, Python, Go, Rust), routes to native or Docker d...

Registry SourceRecently Updated
4730Profile unavailable
Coding

letcairn.work

Project management for AI agents using markdown files. Install and use the cairn CLI to create projects, manage tasks, track status, and coordinate human-AI collaboration through a shared workspace of markdown files.

Registry SourceRecently Updated
1.6K0Profile unavailable
Coding

Asoul Support

A-SOUL 粉丝应援工具 — 检测开播自动点亮粉丝牌+移动端心跳挂机涨亲密度、视频点赞/投币/收藏、动态点赞。纯Python实现,零外部依赖。触发词:A-SOUL、asoul、签到、点赞、三连、应援、动态、点亮、粉丝牌、心跳、挂机、直播、嘉然、贝拉、乃琳、心宜、思诺。

Registry SourceRecently Updated
2730Profile unavailable
Coding

AppDev Skill - 通用应用软件开发工作流

通用应用软件开发完整工作流(HarmonyOS版)。支持从需求到部署的全流程开发管理。 包含:产品功能设计、代码生成、TDD开发、调试诊断、编译验证、版本管理。 适用于各类HarmonyOS应用的快速开发。 当用户需要开发HarmonyOS应用、生成代码、管理开发进度、进行TDD开发时触发。 关键词:开发应用、生...

Registry SourceRecently Updated
2350Profile unavailable