ci-conventions
Skill7 starsChanged 3 days agoMITView on GitHub
Platform-agnostic CI pipelines: quality gate, Trivy scans, path filters, caching, releases. TRIGGER when: creating or editing any CI definition (`.github/workflows/`, `.gitlab-ci.yml`, `.gitlab/ci/`, …); setting up CI; adding a test suite; user asks about triggers, path filters, CVE scanning, test coverage, CI caching, release automation, or committing a built binary. SKIP when: no pipeline is involved. Load `github-actions-conventions` or `gitlab-ci-conventions` alongside.
- Pipes a download into a shell
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- leroyguillaume/skillsword for word, first seen Nov 22, 2026
Other versions1 project uses a version of this.
Word for word · 1
- leroyguillaume/skills★ 7100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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 repository54 other files it gives its agents.
- adr-conventionsSkill
- api-conventionsSkill
- architecture-conventionsSkill
- argocd-conventionsSkill
- config-conventionsSkill
- contributing-conventionsSkill
- councilSkill
- cryptography-conventionsSkill
- dependency-update-conventionsSkill
- diagram-conventionsSkill
- docker-conventionsSkill
- documentation-conventionsSkill
- frontend-conventionsSkill
- github-actions-conventionsSkill
- github-issue-conventionsSkill
- github-pr-conventionsSkill
- github-repo-settingsSkill
- gitlab-ci-conventionsSkill
- helm-conventionsSkill
- herdr-core-delegationSkill
- herdr-delegationSkill
- herdr-tui-delegationSkill
- kopf-conventionsSkill
- kubernetes-operator-conventionsSkill
- logging-conventionsSkill
- logo-conventionsSkill
- mise-conventionsSkill
- ollama-conventionsSkill
- openssf-conventionsSkill
- pr-conventionsSkill
- pre-commit-conventionsSkill
- project-metadata-conventionsSkill
- python-async-conventionsSkill
- python-conventionsSkill
- readme-conventionsSkill
- release-script-conventionsSkill
- release-supply-chain-conventionsSkill
- renovate-ci-conventionsSkill
- rest-conventionsSkill
- rust-build-conventionsSkill
- rust-conventionsSkill
- rust-http-conventionsSkill
- security-policy-conventionsSkill
- signal-handling-conventionsSkill
- sql-conventionsSkill
- starlight-conventionsSkill
- systemd-conventionsSkill
- system-user-conventionsSkill
- task-conventionsSkill
- terraform-conventionsSkill
- topic-splittingSkill
- ui-copy-conventionsSkill
- web-layout-conventionsSkill
- yaml-conventionsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
26 rules. About 0 are common, 12 are distinctive, and 14 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Create exactly these, conditioned on what the repo contains.
- Very specific: line 24
quality: always. It runs pre-commit run --all-files and the test suite, on every change proposal (PR/MR) and on every push to the default … - Very specific: line 32
coverage: when the repo has a test suite in any language but shell. - Very specific: line 35
build: when a Dockerfile exists. It builds the image, scans it, and - Very specific: line 41
security: only when the repo holds something pre-commit does not scan: a dependency lockfile, or an image it publishes. - Very specific: line 46
chart: when a Helm chart exists. It publishes the chart as an OCI artefact. - Very specific: line 56
release: when the repository publishes an application artefact (an image, a package, a binary). - Very specific: line 67
docs: when the repo has a documentation site. - Very specific: line 140
No self-authorised ignores, for any scanner: Don't add a .trivyignore entry, an inline ignore (# hadolint ignore=…, #trivy:ignore:…, # …
- Distinctive: line 213
Every job gets the smallest token scope it needs, widened only in the job that needs more (publishing, uploading a report).
- Very specific: line 234
No generated executable is committed: no compiled binary, .jar, .pyc, wheel, archive or minified bundle.
- Distinctive: line 254
Only the default branch saves: Every other pipeline saves nothing, and a change proposal restores the default branch's cache.
- Distinctive: line 273
Never drop an architecture to save time.
- Distinctive: line 274
Never QEMU-emulate a Rust build: If no native runner exists for an architecture, say so to the user rather than falling back to emulation.
- Very specific: line 276
When pushing, each arch job pushes by digest, and a final manifest job assembles the multi-arch manifest and applies the tags.
- Distinctive: line 282
Never push an image or publish a chart from a change-proposal pipeline.
- Distinctive: line 283
Never push an image, under any tag, before it has been Trivy-scanned in the same job.
- Very specific: line 285
Never gate a vulnerability scan on anything but fixable HIGH/CRITICAL, never let a misconfiguration finding through, and never silence …
- Distinctive: line 288
Never rely on the change-proposal scan alone.
- Very specific: line 290
Never create a security pipeline in a repo with no lockfile and no published image: pre-commit already scans everything it holds.
- Very specific: line 292
Never split the quality gate, and never path-filter quality or security.
- Very specific: line 294
Never make coverage a required check without a threshold, and never set a threshold or a coverage service the user did not ask for.
- Distinctive: line 296
Never let two runs of one pipeline overlap on a ref, and never exempt a publishing pipeline from cancellation.
- Distinctive: line 298
Never create a release page for a pre-release tag, and never start a stable release's notes from an rc.
- Distinctive: line 300
Never reference third-party pipeline code by a mutable ref, and never install anything unpinned.
- Distinctive: line 302
Never commit a generated executable.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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 conventions
What a pipeline does and why, whatever runs it. The how for a given
platform is in github-actions-conventions or gitlab-ci-conventions.
The canonical pipeline set
Create exactly these, conditioned on what the repo contains. The platform skill says how each one maps onto files and triggers.
quality: always. It runspre-commit run --all-filesand the test suite, on every change proposal (PR/MR) and on every push to the default branch. Thelanguage: systemhooks shell out to real binaries, so the job installs every tool the hooks need (toolchain +helm,helm-docs,hadolint,trivy, …) before runningpre-commit, all through mise; when aTaskfile.ymlexists, it runstask lintandtask testrather than the commands behind them (mise-conventions,task-conventions). This is the single quality gate. Don't scatter fmt/lint/test across ad-hoc pipelines.coverage: when the repo has a test suite in any language but shell. It measures the suite's coverage and reports it, on the same triggers asquality; it is a report, not a gate (below).build: when aDockerfileexists. It builds the image, scans it, and pushes only when asked, meaning a manual run with apushinput or thereleasepipeline. A plain push or change proposal builds and scans without pushing (validation only). Tags and labels come from the platform's metadata (a metadata action, predefined variables). Never hand-roll tag strings in several places.security: only when the repo holds somethingpre-commitdoes not scan: a dependency lockfile, or an image it publishes. It runs the Trivy vulnerability scans (below) on every change proposal, on push to the default branch, daily on a schedule, and on manual trigger. A repo of docs, configuration or skills has nosecuritypipeline.chart: when a Helm chart exists. It publishes the chart as an OCI artefact. The chart has its own release lifecycle, decoupled from the app. It triggers on thechart-X.Y.Ztag namespace, pre-releasechart-X.Y.Z-rcNtags included (plus manual runs), and never on a change proposal, wherehelm lintinsidepre-commitis the validation. The chart version comes from the tag (helm package --version <v>).appVersionstays whateverChart.yamlpins. It runs the same drift guard asreleaseon every chart tag:Chart.yamlalways, the README'shelm install --versionon a stable tag. A chart tag never gets a release page. The only release pages are the app's.release: when the repository publishes an application artefact (an image, a package, a binary); a chart alone is thechartpipeline's. It is the app-release orchestrator, triggered by avX.Y.Ztag. It derives the version from the tag, refuses to run when the committed version disagrees (the drift guard inrelease-script-conventions), runsbuildwith push enabled, then creates the platform's release page with generated notes. It does not publish the chart. When a documentation site exists, it also redeploys it once the release page is created. On a public repository it attests what it publishes and attaches an SBOM (release-supply-chain-conventions). A repo of docs, configuration or skills has noreleasepipeline.docs: when the repo has a documentation site. It builds the site on every change proposal that touches it, and deploys it from the default branch only: on a push there, and on a stable release. What it builds, and why a release redeploys from the default branch rather than the tag, is instarlight-conventions.
Pre-release tags
A pre-release tag (vX.Y.Z-rcN, any tag with a -) publishes the image and
stops there: no release page. An rc exists to be tested. A release page for
it would carry the full generated changelog, and the final release would then
repeat it (or, diffed against the rc, show almost nothing).
For a stable release, the notes start from the previous stable tag (the
greatest vX.Y.Z without a hyphen below the current one, sort -V), never
from an rc. With no previous stable tag, let the platform pick.
Trivy: misconfigurations in pre-commit, vulnerabilities in security
trivy config is a pre-commit hook, so it gates every commit and, through
quality, every pipeline. It covers the misconfiguration checks: DS- for a
Dockerfile, KSV- for a rendered chart, provider-prefixed IDs (AWS-0086,
GCP-0001, …) for Terraform. The hooks are in docker-conventions,
helm-conventions and terraform-conventions. A misconfiguration is
deterministic, so it belongs at commit time, and it fails on every
finding, whatever its severity.
The vulnerability side lives in the security pipeline, because it needs a
database that changes every day and a network to fetch it. A CVE appears
against code nobody touched. A repo that only scans on change proposals is
scanning the day it merged, not today.
What to run:
trivy imageon the imagebuildjust produced, in the same job, before anything is pushed, change proposals included. Build into the local store or a tarball, scan, then push that same image. Publishing a known-vulnerable image and scanning it afterwards is the wrong order, and a "staging" tag in a registry is still a published image.trivy fson the checkout, for the lockfiles (Cargo.lock,uv.lock,package-lock.json) and secrets. This is what catches a vulnerable transitive dependency the manifest never mentions.
How to run the vulnerability scans:
- Fail on
HIGHandCRITICAL, and useignore-unfixedon that blocking gate only. This applies to CVEs alone: a misconfiguration has no upstream fix to wait for. A CVE with no upstream fix can't be actioned by the contributor in front of it. Blocking on it teaches everyone that red is normal, which is how a real finding gets waved through. - Report everything else where people look: the platform's code-scanning or vulnerability report, via a second, non-failing scan whose upload runs even when the gate failed. A finding that only exists in a job log is lost.
- Pin the Trivy version (action SHA, image tag) like any other tool, and use the report templates shipped with that version. Never fetch a template from a branch URL at run time.
- Cache the vulnerability DB. It is a large artefact pulled from a
registry on every run, and the failure mode is a rate-limited registry
taking the whole pipeline down. Behind a registry proxy, point
--db-repository/--java-db-repositoryat the mirror.
The scheduled re-scan
- Daily, at an off-hour minute (never
0). Top-of-the-hour runs are the first to be delayed or dropped under load. - Scan what is published, not a rebuild. A scheduled run has no fresh
build, and rebuilding
mainwould pull patched base layers and report a clean image nobody runs. It scans the image of the latest stable release, pulled by its tag.trivy fsruns on the default branch as usual. A repo with no image runstrivy fsalone. - Keep the gate. Nobody waits on a cron, so a red scheduled run is the
notification that a new
HIGH/CRITICALCVE exists.
No self-authorised ignores, for any scanner. Don't add a .trivyignore
entry, an inline ignore (# hadolint ignore=…, #trivy:ignore:…,
# zizmor: ignore[…]), a zizmor.yml rule, a
--skip-dirs / --skip-files, or a severity downgrade to get a green run,
for a CVE and a misconfiguration finding alike. Fix at the source: bump the
dependency, change the base image, harden the manifest. If an entry is
genuinely unavoidable, the user decides, and it carries a comment with the
finding's ID, the reason, and the condition that lifts it.
The only pre-authorised exceptions are the ones docker-conventions
(DL3008), helm-conventions (KSV-0011, KSV-0110),
gitlab-ci-conventions (yamllint brackets on a !reference line) and
sql-conventions (RF04, RF06) list. Nothing else is.
Test coverage: measured and reported, not gated
Every test suite has its coverage measured in CI, whatever the language,
except shell. Shell tests drive other programs end to end, and the shell
coverage tools (kcov, bashcov) are each tied to one platform or one
shell. Configuration languages are out too: terraform test and chart tests
assert on a plan or a render, with no lines to count.
task coverageruns the suite instrumented, prints the summary and writes the detailed report;task coverage:summaryprints the last run's summary again, for CI (task-conventions). The language skill gives both and names the tool (rust-build-conventions,python-conventions,frontend-conventions); a language with no skill here uses its runner's own (go test -coverprofile,node --test --experimental-test-coverage).- The tool is pinned like the rest: in
mise.tomlwhen it is a binary of its own, in the language's lockfile when the test runner loads it as a plugin (a pytest plugin, a Vitest provider), at the runner's version. - Readable without leaving the run: the summary on the run's page (the GitHub job summary, GitLab's coverage figure and diff annotations) and the HTML report as a downloadable artefact. The platform skill says how.
- One run, on Linux. A test matrix across OSes stays in
quality; coverage measures the suite once. - Not a required check. With no threshold, it fails only when a test
fails, which
qualityalready blocks on, or when the instrumentation breaks, which is no reason to hold a merge. Hence its own pipeline, outsidequality, and never path-filtered. - No threshold unless the user asks for one. A number picked for them
gets met with tests written for the number. When they ask, it is the
tool's own fail-under option, and the job then gates: it moves into
qualityand is required like the rest. - No third-party service (Codecov, Coveralls, …) unless the user asks: it needs a token or an app with access to the repository, for a report the platform already shows.
Path filters: don't trigger for nothing
- A pipeline triggered by a push or a change proposal only runs when a file
that affects it changes. A multi-arch image
builddoes not fire on a docs-only or chart-only change. Scope it to its real inputs (e.g.src/**,Cargo.toml,Cargo.lock,Dockerfile,.dockerignore, and its own pipeline file). qualityandsecurityare never path-filtered. One is the universal gate. For the other, a new CVE lands without any file changing. Becausequalityalways runs, a proposal is also never left without a pipeline.- Tag, schedule and manual triggers take no path filter.
- Only unfiltered jobs are made required for merging. A required check that a path filter skipped can block the merge forever. The platform skill has the specific trap.
Cancel superseded runs, always
Two runs of the same pipeline never overlap on the same ref. The newer one cancels the older one, publishing pipelines included. A run for a superseded commit is dead weight. Make a partial publish safe at the registry (immutable tags, digest-addressed pushes, re-runnable tags), never by letting stale runs finish.
Least privilege and immutable references
- Every job gets the smallest token scope it needs, widened only in the job that needs more (publishing, uploading a report).
- Publishing credentials exist only where publishing happens: tag pipelines, or manual runs on the default branch. A change-proposal pipeline never sees them.
- Every reference to third-party pipeline code is immutable: an action or
an included template/component pinned to a full commit SHA with the
version in a comment, kept fresh by the dependency bot
(
dependency-update-conventions). A mutable tag or branch is somebody else's deploy key into your pipeline. - Tool images are pinned to an exact version tag, never
latest. - Every install a pipeline, a
Dockerfileor a script it runs makes is pinned and checked: from the lockfile (npm ci,uv sync --locked,cargo install --locked --version <v>), through mise with itsmise.lock(mise-conventions), or an exact release whose checksum is verified. Nevercurl … | sh,npm install, orpip install <name>without a version: what ran is then whatever was served that minute (Scorecard's Pinned-Dependencies).
The repository holds source, never build output
No generated executable is committed: no compiled binary, .jar,
.pyc, wheel, archive or minified bundle. Nobody reviews one, nothing proves
it matches the source, and it bypasses the attested build of the release
pipeline (Scorecard's Binary-Artifacts). CI builds it from source; the
build directories are in .gitignore. Generated source that a reviewer
reads in the diff (a lockfile, generated code, a rendered README) is not
build output.
Cache deliberately
Cache what is expensive to recompute, not what is cheap to re-download. Restoring a large dependency cache can be slower than a clean fetch, and a stale cache is worse than none.
- Keep: the Docker layer cache, scoped per architecture so the arch
jobs never clobber each other, and compiled-dependency caches (
cargo-chefin theDockerfile, a Rust build cache for non-Docker jobs). These cache CPU work. - Skip: a cache wrapped around a fast download just because you can. Measure before adding one. (The Trivy DB is the exception, see above.)
- Only the default branch saves. Every other pipeline saves nothing, and a change proposal restores the default branch's cache. A proposal's cache serves only its own reruns, yet it shares the project's cache quota: a few dependency-bot PRs each saving gigabytes of layers evict the one cache every proposal reads, and each pays the export time for it.
- A publishing pipeline restores no build cache:
release,chartand abuildthat pushes start cold. Any job that ran on the default branch could write that cache, and the release would ship what it planted, signed and attested (cache poisoning). A slower release is the price. The Trivy DB cache stays: it feeds the scan, not the artefact. - Measure a cache that doesn't help before tuning it: hit or miss per job, what each run saved, and the quota. The usual causes are eviction (quota or inactivity), a default-branch run that never finished saving (cancelled by a newer push, so the next one saves), and a dependency change the default branch hasn't built yet, which no cache can cover.
Multi-arch builds on native runners
- A multi-arch image is a static matrix over both architectures,
amd64andarm64, each on its own native runner, change proposals included. Never drop an architecture to save time. - Never QEMU-emulate a Rust build. If no native runner exists for an architecture, say so to the user rather than falling back to emulation.
- When pushing, each arch job pushes by digest, and a final
manifestjob assembles the multi-arch manifest and applies the tags. That job runs only when pushing.
Never
- Never push an image or publish a chart from a change-proposal pipeline.
- Never push an image, under any tag, before it has been Trivy-scanned in the same job.
- Never gate a vulnerability scan on anything but fixable
HIGH/CRITICAL, never let a misconfiguration finding through, and never silence either to get a green run. - Never rely on the change-proposal scan alone. Without the daily re-scan of what is published, the repo only knows the CVEs that existed on merge day.
- Never create a
securitypipeline in a repo with no lockfile and no published image:pre-commitalready scans everything it holds. - Never split the quality gate, and never path-filter
qualityorsecurity. - Never make
coveragea required check without a threshold, and never set a threshold or a coverage service the user did not ask for. - Never let two runs of one pipeline overlap on a ref, and never exempt a publishing pipeline from cancellation.
- Never create a release page for a pre-release tag, and never start a stable release's notes from an rc.
- Never reference third-party pipeline code by a mutable ref, and never install anything unpinned.
- Never commit a generated executable.
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.

