ci-pipeline
Set up a complete CI/CD pipeline for a project. Detects the stack, then generates and validates GitHub Actions workflows, a Dockerfile, and a Makefile as one coherent pipeline. Use when asked to "set
SKILL.mdskills/global_config/ci-pipeline/SKILL.md
GitHubCI/CD Pipeline Setup
Announce at start: "I'm using the ci-pipeline skill to set up the pipeline."
Core principle: Generate, then validate, then fix. A pipeline that was never validated is not a pipeline — it is a guess that will fail on someone else's machine.
This skill is the orchestrator. It does not write workflows, Dockerfiles, or Makefiles itself — it detects the stack, calls the right generator, routes the output through the matching validator, and reports the result.
When to Use
"set up CI", "add pipeline", "create GitHub Actions", "ci/cd setup", "automate builds", "add Docker", "containerize", "add Makefile".
Not for: debugging an existing pipeline that already runs (read it first), or infrastructure provisioning — see What NOT to do.
Stack Detection
Before generating anything, detect. Guessing here produces a pipeline that builds the wrong thing correctly.
- Language/runtime —
package.json,pyproject.toml,go.mod,Cargo.toml,pom.xml,build.gradle,Gemfile - Existing CI —
.github/workflows/,.gitlab-ci.yml,Jenkinsfile,.circleci/ - Docker —
Dockerfile,docker-compose.yml,compose.yaml - Build tool —
Makefile,package.jsonscripts,build.gradle,Taskfile.yml
Report what you found before generating. If detection is ambiguous — two languages, a monorepo with per-package manifests — say so and ask which target the pipeline should build, rather than picking one.
Orchestration Flow
Run in this order. Stop on a hard failure; do not generate the next artifact on top of a broken one.
1. GitHub Actions
Invoke github-actions-generator with the detected stack.
- Validator:
github-actions-validator— must pass before continuing. - Output:
.github/workflows/ci.yml, plusdeploy.ymlif a deployment target is detected.
2. Dockerfile
Only if no Dockerfile exists, or the user asked for one. Invoke
docker-expert (section Dockerfile Generation).
- Validator:
docker-expert(section Dockerfile Validation) — must pass before continuing. - Output:
Dockerfile,.dockerignore.
3. Makefile
Only if no Makefile exists. Invoke makefile-pro.
- Output:
Makefilewith the targetsbuild,test,lint,docker-build,clean.
4. Validation summary
Run every applicable validator once more against the final, combined output and report the results. A generator that passed in isolation can still produce a set of files that disagree with each other — the combined pass is what proves the pipeline works, not the per-step passes.
The Validation Loop
This is the part that matters, and it is not optional:
- Run the generator.
- Run the validator against what it produced.
- On failure, feed the validator's errors back to the generator.
- Repeat until clean. Minimum one full pass — generating and declaring success without ever running a validator has produced a broken pipeline more often than not.
If the validator cannot run in the current environment (no actionlint, no
Docker daemon), say that explicitly and report which checks were skipped. An
unavailable validator is not a passing validator.
Output Checklist
Verify before calling this done:
-
.github/workflows/ci.ymlexists and passesgithub-actions-validator -
Dockerfileexists (if applicable) and passes thedocker-expertvalidator -
Makefileexists andmake testruns locally - Every validator ran at least once, and its result is reported — passed, failed, or skipped-with-reason
- No secrets, tokens, or environment values hardcoded in any generated file
- Generated files are ready to commit but not committed
What NOT to do
- Do not commit. Leave the files staged for review. Committing and pushing a pipeline is a separate, explicit request.
- Do not overwrite existing
.github/workflows/or an existingDockerfilewithout showing the diff first. Existing pipelines usually encode a reason — a private registry, a matrix, a self-hosted runner — that a regenerated file silently drops. - Do not generate Terraform, Helm, or Kubernetes manifests unless
explicitly asked. Deployment infrastructure is a different job with different
blast radius;
helm-generatorand the k8s skills exist for it. - Do not invent a validator result. Report what ran and what did not.
- Do not use
github-actions-templatesfor new work — it is superseded bygithub-actions-generator.
Related
os-scripting(Bash script generation and ShellCheck validation) — helper scripts the pipeline calls, when the workflow needs more than a Makefile targetgithub-actions-templates— superseded, kept for its existing patternsvercel-deployment— deployment specifics for Vercel targetsdeploy-incus— Forgejo-to-Incus push deployment