ci-cd-pipeline
Skill0 starsChanged 4 months agoMITView on GitHub
Set up or fix a CI/CD pipeline with quality gates — lint, type check, tests, build, security audit, and deployment. Triggered by "set up CI", "fix the pipeline", "add GitHub Actions", "ci-cd-pipeline", "automate deployment", "set up quality gates".
- Reads credentials
7 other projects use a version of this.
Adopted by
Most recently taken up by
- Cure-Consulting-Group/ProductEngineeringSkillstheir own version, first seen Sep 28, 2026
- Ygohel18/skillstheir own version, first seen Sep 27, 2026
- rloisell/rl-agents-n-skillstheir own version, first seen Jun 5, 2026
- kwhorne/elyra-skillstheir own version, first seen May 22, 2026
- impeto-ai/claude-skills-impetotheir own version, first seen May 18, 2026
- kienbui1995/magic-powerstheir own version, first seen Apr 10, 2026
Used with
Projects with it also use observability and api-design.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
OpenAISkillobservability
Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.
Also in 3 projects that use this
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 3 projects that use this
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- rloisell/rl-agents-n-skills★ 8same name
- Cure-Consulting-Group/ProductEngineeringSkills★ 3same name
- cryptofish7/claude-skills★ 1same name
- impeto-ai/claude-skills-impeto★ 1same name
- kwhorne/elyra-skills★ 1same name
- Ygohel18/skills★ 1same name
- kienbui1995/magic-powers★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository21 other files it gives its agents.
- templates/AGENTS.mdAGENTS.md
- requirements-synthesisSkill
- security-hardeningSkill
- spec-driven-developmentSkill
- workflow-from-chatsSkill
- architecture-decision-recordsSkill
- commit-history-auditSkill
- commit-messageSkill
- deslopSkill
- document-thisSkill
- env-drift-checkSkill
- handoffSkill
- minimal-diff-reviewSkill
- onboardingSkill
- pre-commit-checkSkill
- pr-review-canvasSkill
- pr-summarySkill
- release-readinessSkill
- requirements-qaSkill
- sync-docs-after-editSkill
- write-changelogSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 10 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
10
Distinctive
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
- Distinctive: line 34
Every change passes these gates before merge — in order, no skipping:
- Distinctive: line 57
Before writing any pipeline config:
- Very specific: line 60
Check if a CI config already exists (.github/workflows/, .gitlab-ci.yml, Jenkinsfile)
- Distinctive: line 61
If one exists, read it fully before modifying
- Distinctive: line 137
After the workflow is live, enforce it via branch protection rules:
- Distinctive: line 150
When CI fails, copy the full failure output and pass it back:
- Distinctive: line 214
Never share secrets between CI and production.
- Distinctive: line 250
Never disable a failing check to make CI green — fix the code or fix the check.
- Distinctive: line 251
Never store secrets in workflow files — use the secrets manager.
- Distinctive: line 252
Never set up CI for only one branch and call it done — protect main with branch rules too.
- Distinctive: line 253
If the project already has CI, read it fully before modifying — don't add duplicate jobs.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
🚦 Skill: ci-cd-pipeline
Purpose
CI/CD is the enforcement mechanism for every other team standard — it catches what humans and agents miss, consistently, on every change. Setting it up once protects the entire team permanently. This skill establishes a quality gate pipeline, feeds failures back into the development loop, and documents deployment strategy.
Trigger phrases
- "set up CI"
- "add GitHub Actions"
- "fix the pipeline"
- "ci-cd-pipeline"
- "automate deployment"
- "set up quality gates"
- "why is CI failing"
- "add a quality gate"
The quality gate pipeline
Every change passes these gates before merge — in order, no skipping:
PR opened
│
▼
Lint → Type check → Unit tests → Build → Security audit
│
▼ (all pass)
Integration tests → E2E (if applicable)
│
▼ (all pass)
Ready for review → Merge → Deploy to staging → Deploy to productionShift left: a bug caught in lint costs minutes; the same bug caught in production costs hours. Move checks as early as possible.
Steps
1. Read the project first
Before writing any pipeline config:
- Identify the package manager (
npm,pnpm,yarn,pip,cargo, etc.) - Find the test command, lint command, build command from
package.json/Makefile/pyproject.toml - Check if a CI config already exists (
.github/workflows/,.gitlab-ci.yml,Jenkinsfile) - If one exists, read it fully before modifying
2. Create the CI workflow
GitHub Actions — Node.js (adapt language as needed)
# .github/workflows/ci.yml
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- run: npm run lint
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- run: npx tsc --noEmit
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- run: npm test -- --coverage
build:
runs-on: ubuntu-latest
needs: [lint, typecheck, test]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- run: npm run build
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- run: npm audit --audit-level=high3. Configure branch protection
After the workflow is live, enforce it via branch protection rules:
Settings → Branches → main → Branch protection rule:
✅ Require status checks to pass before merging
Add: lint, typecheck, test, build, security
✅ Require branches to be up to date before merging
✅ Do not allow force pushes
✅ Require at least 1 approving review4. Feeding CI failures back to the agent
When CI fails, copy the full failure output and pass it back:
"The CI pipeline failed with this error:
[paste full error output — do not truncate]
Fix the issue and verify locally before pushing."| Failure type | What the agent should do |
| Lint error | Run npm run lint --fix, review unfixable errors, commit |
| Type error | Read the error location, fix the type, do not use any |
| Test failure | Follow systematic-debugging skill |
| Build error | Check config, dependencies, and env vars |
| Audit finding | npm audit fix; for manual fixes, read the advisory first |
5. Deployment strategy
Choose based on project risk:
Low-risk (internal tools, early stage):
merge to main → auto-deploy to production → monitor for 15 minStandard (most projects):
merge to main → auto-deploy to staging → manual promotion to productionHigh-risk (regulated, high traffic):
merge to main → staging → canary (5% traffic) → full productionRollback workflow:
# .github/workflows/rollback.yml
name: Rollback
on:
workflow_dispatch:
inputs:
version:
description: 'Version/SHA to roll back to'
required: true
jobs:
rollback:
runs-on: ubuntu-latest
steps:
- name: Rollback
run: echo "Deploy version ${{ inputs.version }} here"
# Replace with your actual deployment command6. Environment and secrets hygiene
.env.example → committed (template, no real values)
.env → NOT committed (local dev only, in .gitignore)
.env.test → committed (test config, no real secrets)
CI secrets → stored in GitHub Secrets (Settings → Secrets)
Production → stored in deployment platform vaultNever share secrets between CI and production. Use separate values.
Pipeline optimisation (when CI exceeds 10 min)
Apply in this order:
| Fix | Impact |
Cache dependencies (actions/cache or setup-node cache) | High |
| Run lint, typecheck, test in parallel jobs | High |
| Use path filters — skip E2E for docs-only PRs | Medium |
| Shard test suite across matrix runners | Medium |
| Move slow tests to a nightly schedule | Low |
Common rationalisations and rebuttals
| Rationalisation | Reality |
| "CI is too slow to run on every PR" | Optimise the pipeline — don't remove the gate. A 5-min pipeline prevents hours of debugging. |
| "This change is trivial, CI will pass" | Trivial changes cause broken builds. The pipeline is fast for trivial changes. |
| "The test is flaky, just re-run it" | Flaky tests mask real bugs. Fix the flakiness — don't re-run and hope. |
| "We'll add CI after launch" | Projects without CI accumulate broken states that get harder to fix under pressure. Set it up on day one. |
| "I disabled the failing check temporarily" | Temporarily disabled checks become permanently ignored. Fix the check or fix the code. |
Output
A working .github/workflows/ci.yml (or equivalent for your CI platform) with all quality gates active, plus branch protection settings documented. Deployment strategy documented in AGENTS.md or docs/deployment.md.
Guardrails
- Never disable a failing check to make CI green — fix the code or fix the check.
- Never store secrets in workflow files — use the secrets manager.
- Never set up CI for only one branch and call it done — protect
mainwith branch rules too. - If the project already has CI, read it fully before modifying — don't add duplicate jobs.
Gotchas
- The sample workflow above is a Node.js template — pasting it unmodified into a Python, Go, or Ruby repo passes the checkout step and then fails every job on a missing
package.json. Always substitute the package manager, install command, and test/lint/build commands actually detected in Step 1. - Branch protection settings (
Settings → Branches) aren't configurable via a committed YAML file — they require repo admin access through the GitHub UI or API. Don't imply the workflow file alone enforces them; call out the manual step explicitly. - A pipeline that passes locally but was never actually triggered (wrong
on:branch filter, typo'd branch name) reports as "set up" while doing nothing — verify a real PR actually triggers the new checks before calling the setup done.
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.

