ci-generate
Skill8 starsChanged 48 days agoMITView on GitHub
Generate a production-ready CI/CD pipeline config (GitHub Actions,
- Installs packages
- Sends data out
In this repository53 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-browserSkill
- anything-to-skillSkill
- ci-localSkill
- clotho-researchSkill
- codex-imagegenSkill
- create-ruleSkill
- create-skillSkill
- db-migrateSkill
- docker-initSkill
- docs-adrSkill
- docs-checkSkill
- docs-diagramSkill
- docs-initSkill
- docs-rfcSkill
- docs-updateSkill
- env-setupSkill
- find-skillsSkill
- fix-bugSkill
- git-commitSkill
- git-create-prSkill
- gitflowSkill
- git-releaseSkill
- git-syncSkill
- i18n-checkSkill
- implement-featureSkill
- improve-skillSkill
- inject-docsSkill
- jira-cliSkill
- motion-studioSkill
- optimize-ai-setupSkill
- orchestrateSkill
- oss-launchSkill
- prd-to-issuesSkill
- product-design-specSkill
- product-design-tokensSkill
- product-prdSkill
- project-illustratorSkill
- project-plannerSkill
- refactorSkill
- renderSkill
- review-codeSkill
- review-depsSkill
- review-designSkill
- review-perfSkill
- review-planSkill
- review-securitySkill
- shipSkill
- stopslopSkill
- test-suiteSkill
- vrt-checkSkill
- wtfSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 17 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
Verify commands exist: check the project's own config (e.g.
- Distinctive: line 28
No phantom dependencies: only include services (Redis, PostgreSQL, etc.) confirmed in project dependencies.
- Distinctive: line 119
Use discovered commands exactly (do not invent scripts)
- Distinctive: line 123
Use environment variables for configurable values
- Distinctive: line 124
Follow the platform's recommended project structure
- Distinctive: line 126
If an existing CI config exists:
- Distinctive: line 127
Read the existing file first
- Distinctive: line 128
Ask the user whether to replace or augment
- Distinctive: line 136
Run the platform's validator on the generated file, fix every reported error in the file, and run it again.
- Distinctive: line 145
If no validator is available, say so in the summary and do the minimum YAML parse for YAML platforms:
- Distinctive: line 155
Verify all referenced commands and paths exist:
- Distinctive: line 156
Every script/command in the pipeline exists in the project
- Distinctive: line 157
Every referenced file path is valid
- Distinctive: line 160
If a deploy stage exists, its deploy step references the image tag/digest (or equivalent build artifact) produced by the Build stage, not a …
- Distinctive: line 172
Do not estimate run time per stage: it hasn't run yet and any number would be a guess.
- Distinctive: line 176
If encountering unclear requirements:
- Distinctive: line 177
Ask the user to clarify platform choice, deployment target, or branching strategy.
- Distinctive: line 179
Default to the most common configuration for the detected stack.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CI/CD Pipeline Generator
Generate a CI/CD pipeline config for the detected project stack, covering lint, test, build, security, and (when requested) deploy. Start by parsing the arguments passed to this skill invocation (platform, --deploy, --monorepo): see Phase 0 below.
Anti-hallucination guidelines
Pipeline configurations must always match actual project tooling. This is critical:
- Discover before generating: never assume the project's tooling, check what it actually uses first.
- Verify commands exist: check the project's own config (e.g.
package.jsonscripts,Makefiletargets) before referencing them. - Match real versions: use the actual language/runtime version pinned in the project's own config files, not a guess.
- No phantom dependencies: only include services (Redis, PostgreSQL, etc.) confirmed in project dependencies.
- Platform-specific syntax: each CI platform has distinct YAML structure, so never mix syntax between platforms.
Workflow
Phase 0: Parse Arguments
Extract configuration from the arguments passed to this skill:
Arguments:
- <platform>: Target CI platform (default: auto-detect from existing config)
- "github" or "gh": GitHub Actions
- "gitlab" or "gl": GitLab CI
- "circle" or "circleci": CircleCI
- "jenkins": Jenkins (Jenkinsfile)
- "--deploy <target>": Deployment target (optional)
- "vercel", "netlify", "aws", "gcp", "azure", "docker", "k8s", "fly", "railway"
- "--monorepo": Generate matrix/path-filtered workflows
- No args: Auto-detect platform from existing CI config files, default to GitHub Actions
If no platform specified, detect from existing files:
- `.github/workflows/*.yml` → GitHub Actions
- `.gitlab-ci.yml` → GitLab CI
- `.circleci/config.yml` → CircleCI
- `Jenkinsfile` → Jenkins
- No CI config found → Default to GitHub ActionsPhase 1: Project Stack Detection
Explore the codebase to discover the complete project technology stack.
Phase 2: Research Best Practices (only if needed)
references/platform-patterns.md already ships current, comprehensive patterns for Node/Python/matrix/Docker/deploy across all four platforms: check it first. Only reach for WebSearch when the detected stack/platform combo isn't covered there (e.g. an unusual language or a deploy target not in the reference):
Use WebSearch:
- query: "[detected platform] CI/CD best practices [detected language] [current year]"
Use WebSearch:
- query: "[detected platform] security scanning pipeline [detected language] [current year]"Focus on:
- Caching strategies for the detected package manager
- Recommended runner images and versions
- Security scanning tools appropriate for the language
- Deployment best practices for the target platform
- Matrix testing strategies if multiple versions needed
Phase 3: Design Pipeline Architecture
Based on discovery and research, derive the stages from what the repo actually uses. For platform-specific triggers and syntax conventions (caching included), see references/platform-patterns.md.
The generated pipeline must meet these goals. Map each to the repo's own tooling from Phase 1; skip a goal only when the repo has nothing to satisfy it, and say so in the summary:
- Fails fast: lint and type checks run first or in parallel, and a failure there cancels the slow jobs.
- Runs the test suite the repo already uses, with its real command and any service containers (database, cache) the tests need, plus coverage if configured. Use a runtime-version matrix only if the project supports several versions.
- Builds what ships (app build, Docker image if a Dockerfile exists) and keeps the artifacts later jobs need.
- Catches vulnerable dependencies and leaked secrets, plus static-analysis findings where the language has a standard tool. Scan the container image if one is built.
- Caches dependency installs keyed on the lockfile.
- Pins third-party actions, orbs and images to a SHA or exact tag, never
latestor a moving branch. - Grants least-privilege permissions: a read-only token by default on GitHub Actions, widened per job only where a step needs it.
- Deploys only when
--deployis given or deployment config is detected: staging and production are separate, a health check follows the deploy, and the built artifact reference is threaded into the deploy step. The Build job must expose the image tag/digest it produced (joboutputs,GITHUB_OUTPUT, an artifact file, etc.), and the deploy step must consume that same reference: rendering it into a task definition,helm upgrade --set image.tag=<ref>,kubectl set image deployment/<name> <container>=<ref>, or equivalent. Never emit a blind restart (aws ecs update-service --force-new-deployment,kubectl rollout restartwith no image change) as the whole deploy step: if the target pins an image tag/digest, a blind restart just re-pulls the OLD image and ships nothing new.
Design decisions:
- Parallelism: lint, test, and security scan run in parallel when possible.
- Branch strategy: main/master triggers deploy, while PRs trigger lint+test+build.
- Artifacts: build outputs passed between stages where needed.
Phase 4: Generate Pipeline Configuration
Generate the complete CI/CD configuration file based on the designed architecture.
For platform-specific syntax and patterns, consult:
- references/platform-patterns.md - Detailed YAML patterns for each platform
File locations by platform:
| Platform | File Path |
| GitHub Actions | .github/workflows/ci.yml |
| GitLab CI | .gitlab-ci.yml |
| CircleCI | .circleci/config.yml |
| Jenkins | Jenkinsfile |
Generation guidelines:
- Use discovered commands exactly (do not invent scripts)
- Pin action/orb/image versions (see the pinning goal in Phase 3)
- Include inline comments explaining non-obvious configuration
- Set appropriate timeouts for each job
- Use environment variables for configurable values
- Follow the platform's recommended project structure
If an existing CI config exists:
- Read the existing file first
- Ask the user whether to replace or augment
- Preserve any custom configuration the user has added
- Merge new stages with existing ones where appropriate
Phase 5: Validate & Present
Step 5.1: Validate, Fix, Re-validate
Run the platform's validator on the generated file, fix every reported error in the file, and run it again. Stop when it is clean or after 3 rounds, then report what still fails.
| Platform | Validator | Install |
| GitHub Actions | actionlint <workflow_file> | brew install actionlint |
| GitLab CI | glab ci lint | brew install glab |
| CircleCI | circleci config validate | brew install circleci |
| Jenkins | the declarative linter, if the Jenkins instance is reachable (curl -X POST -F "jenkinsfile=<Jenkinsfile" $JENKINS_URL/pipeline-model-converter/validate) | none |
If no validator is available, say so in the summary and do the minimum YAML parse for YAML platforms:
python3 -c 'import yaml,sys;yaml.safe_load(open(sys.argv[1]))' <config_file>A Jenkinsfile is Groovy, not YAML: without the linter, re-read it for unbalanced braces and quotes.
Step 5.2: Cross-Reference Check
Verify all referenced commands and paths exist:
- Every script/command in the pipeline exists in the project
- Every referenced file path is valid
- Service versions match project requirements
- Environment variable names are consistent
- If a deploy stage exists, its deploy step references the image tag/digest (or equivalent build artifact) produced by the Build stage, not a blind restart with no reference to what was just built
Step 5.3: Present Summary
Output a summary including:
- Pipeline architecture overview
- Stages and their purposes
- Trigger conditions (which branches, PR events)
- Required secrets/environment variables to configure
- Cache strategy explanation
- Any manual steps needed (e.g., setting up deployment secrets)
Do not estimate run time per stage: it hasn't run yet and any number would be a guess.
Handling Ambiguity
If encountering unclear requirements:
- Ask the user to clarify platform choice, deployment target, or branching strategy.
- Present options with trade-offs when multiple valid approaches exist.
- Default to the most common configuration for the detected stack.
Usage Examples
# Auto-detect everything
ci-generate
# Specify platform
ci-generate github
ci-generate gitlab
ci-generate circleci
ci-generate jenkins
# With deployment target
ci-generate github --deploy vercel
ci-generate gitlab --deploy docker
ci-generate github --deploy aws
# Monorepo support
ci-generate github --monorepo
# Combined options
ci-generate github --deploy k8s --monorepoImportant Notes
- Discover first: never assume project tooling, always run Phase 1.
- Pin versions: use specific versions for actions, orbs, images, and tools.
- Secrets documentation: list all required secrets so users know what to configure.
- Existing config: always check for and respect existing CI configuration.
- Security by default: include dependency scanning and secret detection in every pipeline.
- Cache effectively: proper caching can reduce CI times by 50-80%.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

