← Back to Skills Marketplace
shenghoo123-png

Cicd Templates Generator

by shenghoo123-png · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ Security Clean
118
Downloads
0
Stars
1
Active Installs
2
Versions
Install in OpenClaw
/install cicd-templates-generator
Description
Generate production-ready CI/CD workflow files for GitHub Actions, GitLab CI, or Jenkins tailored to chosen language, framework, tests, deploy, and release o...
README (SKILL.md)

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 \x3Clanguage> [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

支持的语言与框架

语言 框架 测试框架 部署选项 发布
Python flask, django, fastapi pytest, unittest docker, azure, aliyun, tencent, k8s, serverless
JavaScript node, express jest, mocha docker, azure, aliyun, tencent npm publish
Go gin, echo go-test docker goreleaser

支持的场景

  • 定时任务 (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"

参数说明

参数 说明 默认值
language python / javascript / go 必填
framework flask / django / node / gin / echo 等 可选
--test, -t 测试框架 自动检测 (pytest/jest/go-test)
--deploy, -d 部署目标
--release, -r 发布工具 (npm/goreleaser)
--coverage, -c 启用覆盖率报告 False
--cloud 云服务商 (azure/aliyun/tencent)
--format, -f github / gitlab / jenkins / all github
--output, -o 输出目录 ./.github/workflows
--name, -n workflow 名称 CI
--python-version Python 版本 3.11
--node-version Node 版本 20
--go-version Go 版本 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
Usage Guidance
This skill appears to do exactly what it says: generate CI/CD workflow files. Before installing/using it, review the generated templates (especially any lines that curl | bash or call external scripts and the list of referenced secrets) so you understand what your CI runner will do and which secrets it will need. If you plan to commit generated files, avoid blindly committing templates that execute remote scripts or that assume credentials you don't want in your CI environment; prefer replacing remote-install pipes with pinned/reviewed releases or internal steps where possible.
Capability Analysis
Type: OpenClaw Skill Name: cicd-templates-generator Version: 1.0.1 The bundle is a CI/CD template generator (cicd-gen) designed to produce configuration files for GitHub Actions, GitLab CI, and Jenkins. The code logic in 'cicd_gen/generator/' follows a standard object-oriented approach to generate YAML and Groovy files based on user-provided parameters (language, framework, deployment target). While some generated templates include 'curl | bash' patterns for tools like Codecov and GoReleaser (found in 'gitlab_ci.py' and 'jenkins.py'), these are common industry practices for CI environments and are part of the generated output rather than being executed by the tool itself. No evidence of malicious intent, data exfiltration, or prompt injection was found.
Capability Assessment
Purpose & Capability
Name/description match the code and SKILL.md. The package implements generators for GitHub Actions, GitLab CI, and Jenkins and exposes a cicd-gen CLI. No unrelated environment variables, binaries, or unusual install requirements are requested by the skill.
Instruction Scope
SKILL.md instructs the agent to run the cicd-gen CLI and optionally write files into the project. The generated CI templates embed commands and references to external actions/services and secrets (e.g., CODECOV_TOKEN, DOCKERHUB_TOKEN, AZURE_*). Some templates include commands that download and execute remote scripts (e.g., curl https://codecov.io/bash | bash and a git.io short link for goreleaser in the Jenkinsfile). While normal for CI templates, those lines instruct future CI runners to fetch and run remote code — this is a security consideration for users when they commit/run these generated files.
Install Mechanism
There is no install spec for the skill (instruction-only packaging via pip is indicated in SKILL.md and setup.py), so installation is low-risk. The skill itself does not download arbitrary artifacts at install time. Note: the generated CI artifacts (not the skill install) contain steps that fetch external scripts/actions.
Credentials
The skill requests no environment variables or secrets at runtime. Generated templates, however, reference many CI secrets and environment variables (Docker Hub creds, CODECOV_TOKEN, AZURE credentials, ALIYUN/TENCENT keys, NPM_TOKEN, CI_REGISTRY_* etc.). This is expected for CI/CD workflows but means users must supply those secrets in their CI provider — review and minimize secrets before enabling pipelines.
Persistence & Privilege
always is false and the skill does not request persistent elevated privileges or modify other skills or system-wide settings. It writes files into a user-specified output directory (default ./.github/workflows) which is appropriate for a CI template generator.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install cicd-templates-generator
  3. After installation, invoke the skill by name or use /cicd-templates-generator
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
Updated with 25 passing unit tests covering GitHub Actions, GitLab CI, Jenkins generators; all tests validated
v1.0.0
Initial release of CI/CD Templates Generator (v1.0.0): - Provides a CLI tool for one-command generation of production-ready CI/CD workflow files for GitHub Actions, GitLab CI, and Jenkins. - Supports Python (flask, django, fastapi), JavaScript (node, express), and Go (gin, echo) projects, with multiple test and deployment options. - Enables workflows for scheduled runs, pull request testing, automatic releases (npm/goreleaser), multi-platform output, Docker build/push, and cloud deployment. - Offers flexible CLI arguments for custom configuration, output formats, and cloud providers. - Integrates with OpenClaw to interpret natural language intent and generate CI/CD workflows accordingly.
Metadata
Slug cicd-templates-generator
Version 1.0.1
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 2
Frequently Asked Questions

What is Cicd Templates Generator?

Generate production-ready CI/CD workflow files for GitHub Actions, GitLab CI, or Jenkins tailored to chosen language, framework, tests, deploy, and release o... It is an AI Agent Skill for Claude Code / OpenClaw, with 118 downloads so far.

How do I install Cicd Templates Generator?

Run "/install cicd-templates-generator" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Cicd Templates Generator free?

Yes, Cicd Templates Generator is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Cicd Templates Generator support?

Cicd Templates Generator is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Cicd Templates Generator?

It is built and maintained by shenghoo123-png (@shenghoo123-png); the current version is v1.0.1.

💬 Comments