home / skills / ntaksh42 / agents / ci-cd-generator

ci-cd-generator skill

/.claude/skills/ci-cd-generator

This skill generates CI/CD pipeline configurations for GitHub Actions, GitLab CI, CircleCI, and Jenkins to streamline automated builds and deployments.

npx playbooks add skill ntaksh42/agents --skill ci-cd-generator

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.3 KB
---
name: ci-cd-generator
description: Generate CI/CD pipeline configurations for GitHub Actions, GitLab CI, Jenkins. Use when setting up automated build and deployment pipelines.
---

# CI/CD Generator Skill

CI/CDパイプラインの設定を生成するスキルです。

## 主な機能

- **GitHub Actions**: ワークフロー生成
- **GitLab CI**: .gitlab-ci.yml生成
- **CircleCI**: config.yml生成
- **Jenkins**: Jenkinsfile生成

## GitHub Actions例

```yaml
name: CI/CD Pipeline

on:
  push:
    branches: [ main, develop ]
  pull_request:
    branches: [ main ]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: '18'
      - run: npm ci
      - run: npm test
      - run: npm run lint

  build:
    needs: test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - run: npm ci
      - run: npm run build
      - uses: actions/upload-artifact@v3
        with:
          name: build
          path: dist/

  deploy:
    needs: build
    if: github.ref == 'refs/heads/main'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/download-artifact@v3
      - name: Deploy to Production
        run: |
          # デプロイコマンド
```

## バージョン情報
- Version: 1.0.0

Overview

This skill generates ready-to-use CI/CD pipeline configurations for common platforms including GitHub Actions, GitLab CI, CircleCI, and Jenkins. It produces YAML or Jenkinsfile templates tailored to your project's language, test commands, build steps, artifacts, and deployment rules. Use it to accelerate automated testing, building, and deployment setup across repositories.

How this skill works

The generator analyzes your project type and key files (package.json, Dockerfile, build scripts) or accepts explicit inputs like test/build commands, target branches, and deployment commands. It outputs platform-specific pipeline definitions (GitHub Actions workflows, .gitlab-ci.yml, CircleCI config.yml, Jenkinsfile) with staged jobs for test, build, artifact handling, and conditional deploys. Templates are editable and include sensible defaults for runners, environment variables, and artifact handling so you can drop them into your repository and iterate.

When to use it

  • Setting up CI/CD for a new repository to enforce tests and builds on push or PRs
  • Migrating pipelines to GitHub Actions, GitLab CI, CircleCI, or Jenkins from manual scripts
  • Adding automated build, artifact upload/download, and conditional production deploys
  • Standardizing pipeline patterns across multiple projects or teams
  • Quickly generating pipeline templates for demos, prototypes, or onboarding repos

Best practices

  • Keep pipelines small and focused: separate test, build, and deploy stages for clarity and parallelism
  • Use explicit node/runtime versions and pinned actions or Docker images to avoid drift
  • Run fast, deterministic tests in the test stage; cache dependencies where supported to speed up runs
  • Store secrets in the CI platform’s secret store and avoid embedding credentials in pipeline files
  • Use conditional deploys tied to protected branches and require passing checks before merging

Example use cases

  • Generate a GitHub Actions workflow that runs tests, builds an artifact, and deploys only from main branch
  • Create a .gitlab-ci.yml for a Dockerized service with build, push to registry, and integration test stages
  • Produce a Jenkinsfile that orchestrates pipeline stages on an existing Jenkins agent pool
  • Build a CircleCI config.yml that caches dependencies and uploads build artifacts for downstream jobs
  • Rapidly scaffold pipelines for multiple microservices with consistent job names and artifact handling

FAQ

Can I customize the generated steps?

Yes. Generated templates include configurable placeholders for commands, versions, environment variables, and deployment conditions so you can adapt them to your project.

Which files does the generator inspect to infer settings?

It checks common indicators like package.json, Pipfile, requirements.txt, Dockerfile, and existing build scripts, but you can also supply commands and branch rules manually.