Generate or update CI/CD pipelines based on project stack: detect language, analyze existing workflows, generate CI/CD/release/security pipelines, validate with actionlint, support monorepo triggers.
Generates or updates CI/CD pipeline configurations for {{PROJECT_NAME}} based on detected project stack. Analyzes existing workflows to avoid duplication, generates customized GitHub Actions workflows for CI, CD, release, and security scanning, validates generated YAML with actionlint, and supports monorepo path-based triggers.
/x-ci-generate — generate all pipelines (default: all)/x-ci-generate ci — generate CI pipeline (build + test + security scan)/x-ci-generate cd — generate CD pipeline (deploy staging + production + rollback)/x-ci-generate release — generate release pipeline (semantic versioning + changelog)/x-ci-generate security — generate security scan pipeline (scheduled SAST + dependency audit)/x-ci-generate all — generate all pipeline types/x-ci-generate ci --monorepo — generate with path-based triggers for monorepo/x-ci-generate ci --force — overwrite existing workflows| Parameter | Type | Default | Description |
|---|---|---|---|
type | Enum | all | Pipeline type: ci, cd, release, security, all |
--monorepo | Flag | false | Activate path-based triggers for monorepo |
--force | Flag | false | Overwrite existing workflow files |
1. DETECT -> Detect project stack from config files (pom.xml, package.json, etc.)
2. ANALYZE -> Check existing .github/workflows/ for conflicts
3. GENERATE -> Generate workflow YAML files based on stack and type
4. VALIDATE -> Run actionlint (if available) on generated files
5. REPORT -> Report generated/updated files and any validation issues
Analyze project root to identify language, build tool, and dependencies:
| Config File | Language | Build Tool | Framework Detection |
|---|---|---|---|
pom.xml | Java | Maven | Spring Boot, Quarkus (from dependencies) |
build.gradle / build.gradle.kts | Java/Kotlin | Gradle | Spring Boot, Ktor (from plugins) |
package.json | TypeScript/JavaScript | npm/yarn/pnpm | NestJS, Express (from dependencies) |
go.mod | Go | go | Gin, Echo (from require) |
Cargo.toml | Rust | cargo | Axum, Actix (from dependencies) |
pyproject.toml / requirements.txt | Python | pip/poetry | FastAPI, Django (from dependencies) |
# Auto-detect language from project root
ls -la pom.xml build.gradle* go.mod Cargo.toml pyproject.toml package.json 2>/dev/null
Cross-reference with .claude/rules/01-project-identity.md (RULE-001 — Project Identity) if available for authoritative stack information.
Additionally detect:
Check .github/workflows/ for existing pipeline files:
# List existing workflows
ls -la .github/workflows/*.yml .github/workflows/*.yaml 2>/dev/null
For each existing workflow:
name: field to identify purposeon: section)Conflict Resolution:
| Scenario | Without --force | With --force |
|---|---|---|
| File exists, same purpose | Report "exists, use --force" | Overwrite |
| File exists, different purpose | Skip (no conflict) | Skip (no conflict) |
| File does not exist | Generate | Generate |
Reference the CI/CD patterns knowledge pack (skills/ci-cd-patterns/) for pipeline templates and best practices.
ci.yml)Generate continuous integration workflow:
# Git Flow: CI runs on integration (develop), release, and hotfix branches