← 返回 Skills 市场
shenghoo123-png

Cicd Templates Generator

作者 shenghoo123-png · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
118
总下载
0
收藏
1
当前安装
2
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (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
安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cicd-templates-generator
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cicd-templates-generator 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
Slug cicd-templates-generator
版本 1.0.1
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 2
常见问题

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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 118 次。

如何安装 Cicd Templates Generator?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cicd-templates-generator」即可一键安装,无需额外配置。

Cicd Templates Generator 是免费的吗?

是的,Cicd Templates Generator 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Cicd Templates Generator 支持哪些平台?

Cicd Templates Generator 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Cicd Templates Generator?

由 shenghoo123-png(@shenghoo123-png)开发并维护,当前版本 v1.0.1。

💬 留言讨论