---
title: "cicd-pipelines skill"
canonical: "https://mrbogomips.github.io/eng-skills/skills/cicd-pipelines/"
author: "MrBogomips"
published: "2026-12-02T00:00:00.000Z"
modified: "2026-12-02T00:00:00.000Z"
lang: "en"
license: "CC-BY-4.0"
code-license: "MIT"
---

---
summary: Designs and optimizes CI/CD pipelines, GitHub Actions first, for faster pull request feedback and fewer billed minutes, measured on the real runs when history exists.
---


Designs a new CI/CD pipeline or optimizes an existing one, GitHub Actions first, for pull request feedback
time and then billed minutes. You get a design proposal with its trade-offs, the workflows, a measure of
the recent runs when the repository has history, and a security audit that follows the policy your project
chose.

## Why

Pipelines get slow and costly in ways a quick rewrite does not catch: a path filter that runs nothing for a
folder nobody listed, caches saved from every pull request, gains claimed without a measure. This skill
measures the real runs first, scopes jobs to the changed paths only when the repository needs it and fails
open on unknown paths, writes caches only from the integration branch, and says when the pipeline is worth
looking at again.

## Usage

Ask in your own words; Claude Code picks the skill:

```text
We spend too many GitHub Actions minutes on this repo.
Set up CI/CD for this repo.
Review our GitHub Actions workflows for efficiency.
```

On first use the skill records the project's settings and asks you once for what the repository does not
show. It proposes the design (which changes run which jobs, the trade-offs, the expected gain) and writes the
workflows once you approve. When it cannot ask you, its reply carries the proposal with the workflows it
wrote, and each open choice is marked as an assumption.

## Inputs and outputs

- **Tailoring file**: `.eng-skills/cicd-pipelines.md`, or the path the project's `AGENTS.md` / `CLAUDE.md`
  gives, created on first use: security policy (`enforce`, `report` or `ignore`; `report` when you do not
  choose), cost context, required checks, platforms. Only known values are written.
- **Run metrics**: the bundled `ci_metrics.py` script reads the repository's recent runs (50 by default)
  through `gh` and reports job durations, queue time, minutes estimated from job durations, duplicate runs,
  and jobs skipped on a pull request that failed after merge. The "before" report goes into the proposal
  and into the pull request description or commit message, so a later session can compare against it. The
  "after" measure reruns the script with the same options, once the new pipeline has as many runs; until
  then you get the command to run later.
- **Workflows**: the new or revised files under `.github/workflows/`, and a change detector when the
  repository needs one.

## Requirements

Python 3 for the metrics script (standard library only). The GitHub CLI `gh`, authenticated, to measure runs;
without it the design rests on reading the workflows, and the gains are marked as estimates.

## Limitations

- Run metrics come from GitHub only: on another platform the skill applies the same rules, and every gain is
  an estimate.
- It does not diagnose why a particular run failed, and it does not review the security of application code.
