agentleFS
TsukiNi22TsukiNi22/ai-utils/skills/git/ci-cd/SKILL.md

ci-cd

Skill1 starsChanged 3 days agoMITView on GitHub

CI and CD of a GitHub repository in Tsukini's way - the CI (build check, unit tests, style check with xstyle, coverage) and the CD (GitHub releases from the CHANGELOG, RPM/DEB packages and their gh-pages repository, container images on ghcr.io, PyPI, docs on gh-pages, dispatch to other repositories), always asking first what to run, runs the jobs in the user's Docker images (ghcr.io/tsukini22 ci / unit-tests / package / git from the docker-image repository) or else the smallest official image that has what is needed, follows his conventions (names, vars.RUNNER, ccache, set -euo pipefail, annotations, dispatch keywords), and when one of his images misses a tool, adds it to the docker-image repository (Dockerfile, version, CHANGELOG, README) with a local commit only. Used by the project setup skills (cpp-project, python-project) when the project is a GitHub repository. Use whenever the user wants a CI, a CD, a release / deployment / publication pipeline, a GitHub workflow / action, or to change one.

  • Reads credentials

39 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use caching, api-versioning and 10 more.

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.
  • wpankSkill

    caching

    Caching strategies, invalidation, eviction policies, HTTP caching, distributed caching, and anti-patterns. Use when designing cache layers, choosing eviction policies, debugging stale data, or optimizing read-heavy workloads.

    Also in 5 projects that use this

  • wpankSkill

    api-versioning

    API versioning strategies — URL path, header, query param, content negotiation — with breaking change classification, deprecation timelines, migration patterns, and multi-version support. Use when evolving APIs, planning breaking changes, or managing version lifecycles.

    Also in 3 projects that use this

  • SentrySkill

    feature-flags

    Gate a Sentry feature behind a FlagPole feature flag. Use when adding a feature flag, registering a flag in temporary.py, checking a flag from Python or the frontend, enabling a flag in tests, or asking where FlagPole rollout config lives. Trigger on "add a feature flag", "gate this behind a flag", "register a flag", "features.has", "api_expose", "OrganizationFeature", "ProjectFeature", "FlagPole".

    Also in 4 projects that use this

  • OpenAISkill

    auth

    Authentication integration guidance — Clerk (native Vercel Marketplace), Descope, and Auth0 setup for Next.js applications. Covers middleware auth patterns, sign-in/sign-up flows, and Marketplace provisioning. Use when implementing user authentication.

    Also in 4 projects that use this

  • wrsmith108Skill

    docker

    Container-based development for isolated, reproducible environments. Use when running npm commands, installing packages, executing code, or managing project dependencies. Trigger phrases include "npm install", "run the build", "start the server", "install package", or any code execution request.

    Also in 9 projects that use this

  • OpenAISkill

    observability

    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 13 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 26 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check: python3 SKILL_DIR/scripts/check_workflows.py [files] (YAML, actionlint when installed, the conventions below).

    line 21
  2. Very specific:

    Read the current list and versions in the docker-image repository (~/personal_delivery/other/docker-image, else gh repo clone …

    line 36
  3. Very specific:

    Every job: runs-on: ${{ vars.RUNNER }}, defaults: run: shell: bash, container: image: ....

    line 68
  4. Very specific:

    Every multi-line run: starts with set -euo pipefail (set -e at least), named steps, timeout-minutes on builds and tests, errors as …

    line 71
  5. Distinctive:

    Never publish from a pull request.

    line 101

“Common” is measured: kept by at least 6 in 10 of the 26 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

CI / CD

SKILL_DIR = the directory of this file. Templates: CI templates/style.yml (xstyle), templates/python.yml (pytest); CD templates/release.yml (GitHub release from the CHANGELOG section of the tag), templates/pypi.yml (trusted publishing), templates/container.yml (image on ghcr.io, docker-image way), templates/dispatch-repository.yml (repository_dispatch to another repository); the C/C++ build / tests / packages / dispatch / release / docs workflows are those of cpp_project_template (.github/workflows/ of a project made by cpp-project, already there; for another C++ project: copied from the local clone ~/personal_delivery/cpp/cpp_project_template or its GitHub repository, then template / TEMPLATE_ / Core renamed and the # Don't run on template repository condition removed, like its setup.sh; section 5 of cpp-project says what each one does).

Called by the project setup skills (cpp-project, python-project) when the project is a GitHub repository (git remote -v shows github.com, or the user creates it with gh repo create): they hand over the CI/CD step here. Check: python3 SKILL_DIR/scripts/check_workflows.py [files] (YAML, actionlint when installed, the conventions below).

1. Ask first, always (AskUserQuestion, French)

Even when the request looks clear, confirm what the CI/CD must do (multiSelect), with the project's obvious choices pre-selected in the description. The popup takes 4 options per question and 4 questions per call (interactive-questions): the CI is one question, the CD two (publication: Release · Packages · Image · PyPI; then Docs · Dispatch · none):

  • CI: Build (compile check, executables present) · Tests unitaires · Style (xstyle) · Coverage
  • CD: Release GitHub sur tag (notes = section du CHANGELOG) · Packages RPM/DEB (+ gh-pages repository) · Image de conteneur (ghcr.io) · PyPI (Python) · Docs (html-doc on gh-pages) · Dispatch vers d'autres repos (which repository, which event: repository_dispatch type) Then, in the fourth question (or a second call) when not obvious: déclencheurs (push main, pull requests, tags v*, manual workflow_dispatch, commit keywords [build] / [release] / [ignore] of git-conventions) and runner (${{ vars.RUNNER }}, the self-hosted runner of the user: default; ubuntu-latest only if asked).

2. Images: the user's first, else the smallest that fits

Read the current list and versions in the docker-image repository (~/personal_delivery/other/docker-image, else gh repo clone TsukiNi22/docker-image): README.md (tools table), *.Dockerfile, CHANGELOG.md.

NeedImage
C / C++ build (clang, cmake, ccache, libutils + debug/asan, openssl, python3, xstyle)ghcr.io/tsukini22/ci:latest
C / C++ unit tests (ci + GTest / GMock)ghcr.io/tsukini22/unit-tests:latest
RPM / DEB packages, signatures, repositoriesghcr.io/tsukini22/package:latest
git / curl only (dispatch, tags, API calls)ghcr.io/tsukini22/git:latest
style check (xstyle)ghcr.io/tsukini22/ci:latest (xstyle from ci v2.1.0)
Pythonpython:<version>-slim (pip included); -alpine only without compiled wheels
Rustrust:<version>-slim
Node / webnode:lts-alpine
anything elsethe official -slim / -alpine image of the tool, or no container at all for pure gh / curl steps
Pinned version (ci:v2.1.0) instead of latest only if the user asks for reproducible builds.

A tool is missing in one of the user's images

Propose (AskUserQuestion) to add it to the image instead of installing it in every run. If yes, in the docker-image repository:

  1. the *.Dockerfile: the package in the matching commented group of dnf install (or a build block like xstyle's in ci.Dockerfile), dnf clean all kept last;
  2. the version: VERSION of .github/workflows/build-image-<image>.yml (minor for an added tool, patch for a fix, major for a base change);
  3. CHANGELOG.md: ## [<image>:vX.Y.Z] - <date> with ### Added / ### Fixed / ### Changed under [<image>:Unreleased], and the link line [<image>:vX.Y.Z]: .../commits/<image>/vX.Y.Z/<image>.Dockerfile;
  4. README.md: the tools table;
  5. a local commit only, like the other commits of that repository (feat(ci-image): add <tool> ..., fix(package): ...), without co-author / AI attribution and never pushed: tell the user to push (the push builds and publishes the image). Optionally build it locally first: podman build -f <image>.Dockerfile -t test ..

3. Conventions (from the user's workflows)

  • name: <Name> - <Kind> / <Name> (CI) / (CD) / (CI/CD) (CI - Executables, Unit Tests - Libraries (CI), Dispatch (CI/CD), Build Image - CI); file names kebab-case.yml.
  • Every job: runs-on: ${{ vars.RUNNER }}, defaults: run: shell: bash, container: image: ....
  • actions/checkout@v5 with fetch-depth: 1 (0 when the history / a base branch is needed), actions/cache@v5 for ccache (/github/home/.cache/ccache, key on the hashes of the sources + CMakeLists.txt) then ccache -s.
  • Every multi-line run: starts with set -euo pipefail (set -e at least), named steps, timeout-minutes on builds and tests, errors as annotations echo "::error title=<Title>,file=<file>::<message>", ✓ <thing> ok on success.
  • Dispatch chain: dispatch.yml decides ([build] -> pre-release packages, tag vX.Y.Z -> stable, [ignore] -> nothing) and triggers the other workflows with workflow_dispatch through the API (curl + secrets.GITHUB_TOKEN); another repository: repository_dispatch with secrets.GIT_TOKEN (templates/dispatch-repository.yml, the receiving workflow listens with on: repository_dispatch: types: [<event>], like build-image-ci.yml with libutils-released).
  • Secrets / variables are never created by the skill: list them for the user (gh variable set RUNNER --body ..., gh secret set GIT_TOKEN, GPG secrets of the packages: see cpp-project).

4. Style check (xstyle)

templates/style.yml: on a pull request only the lines it changes (--diff-ref origin/<base>), on a push the whole project; --fail-on {{FAIL_ON}} (major by default: ask), the Markdown report appended to the job summary. A project that is not clean yet: start with --fail-on unforgivable or the PR-only trigger, and say so.

5. CD (deployment)

  • Versions: one tag per release (vX.Y.Z, vX.Y.Z-pre for a pre-release; <image>/vX.Y.Z for an image of a multi-image repository), the version in the sources bumped with the CHANGELOG in the same commit (git-conventions).
  • GitHub release (release.yml): on a v* tag, the notes are the section of the tag in CHANGELOG.md (the git-conventions format: ## vX.Y.Z - date, ## [vX.Y.Z-pre] - date; the job fails without it), a tag with a suffix (vX.Y.Z-pre, -rc1...) is a pre-release, {{ASSETS}} = files to attach (binaries, dist/*, packages) or empty. A C++ project of the template already has its own release.yml (run by dispatch.yml after the packages).
  • Packages RPM/DEB (C/C++): the dispatch / build-packages workflows of cpp_project_template (Linux and Windows mingw64-*, stable on a vX.Y.Z tag, pre-release on [build] or a vX.Y.Z-<suffix> tag), signed and published in the gh-pages repository when the project has one (GPG secrets, Pages: see cpp-project), else artifacts of the run.
  • Container image (container.yml): the docker-image pattern (version in the workflow, <image>/vX.Y.Z tag pushed by the job, latest + version tags, GHA cache).
  • PyPI (pypi.yml): trusted publishing (the project configured on pypi.org with this repository / workflow / environment pypi, no token), the version of dist/ checked against the tag.
  • Docs: html-doc pages on the gh-pages branch (an actions/deploy-pages job, or the existing gh-pages workflow).
  • Never publish from a pull request; secrets / environments / pypi.org settings are listed for the user, never created.

6. Check and hand over

python3 SKILL_DIR/scripts/check_workflows.py .github/workflows/*.yml (+ xstyle --rtk .github for the generic rules), then list for the user: the workflows written, the images used, the secrets / variables to create, what triggers what. Commits follow git-conventions (feat(ci): ...); nothing is pushed without a request.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.