/ci-optimizer:ci-optimizerfrom CI Optimizer: Faster GitHub Actions and GitLab CI
Analyzes GitHub Actions and GitLab CI pipelines to find missing caches, wasted runs, unsafe settings, and slowest jobs. Reports speed, cost, and safety issues with file-level findings.
Ships in CI Optimizer: Faster GitHub Actions and GitLab CI. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Scripts: ${CLAUDE_SKILL_DIR} is the folder that contains this file. If your agent does not define it, use the folder where this SKILL.md is located.
Make CI pipelines faster, cheaper and safer, based on the real workflow files and real run times.
python3 ${CLAUDE_SKILL_DIR}/scripts/ci_check.py # .github/workflows and .gitlab-ci.yml
python3 ${CLAUDE_SKILL_DIR}/scripts/ci_check.py .github/workflows/ci.yml
Each finding has a file, line, category and fix:
npm install instead of npm ci, no concurrency with cancel-in-progress, no paths filters, full-history clones, Docker builds without layer cache, GitLab jobs without cache, needs or interruptiblepermissions block, untrusted PR text expanded inside run:, pull_request_target that checks out PR code, unpinned imagesThe checks read text, so confirm each one in context before changing it. For example, fetch-depth: 0 is right when a step needs tags or history.
If the gh CLI is installed and logged in, get real numbers instead of guessing:
gh run list --workflow <file.yml> --limit 20 --json databaseId,conclusion,createdAt,updatedAt,event,headBranch
gh run view <run-id> --json jobs --jq '.jobs[] | {name, conclusion, startedAt, completedAt, steps: [.steps[] | {name, startedAt, completedAt}]}'
Compute the duration of each job and step from the timestamps, and the median over recent successful runs. Report the critical path: the longest chain of jobs that must run one after another, since that sets the wall-clock time.
For GitLab, use glab ci list and glab ci view if installed, or ask the user for pipeline durations.
With gh:
gh run list --workflow <file.yml> --limit 50 --json databaseId,conclusion,headSha,attempt
Runs on the same headSha that failed and then passed on a re-run point to flakiness. Open the failed attempt's log (gh run view <id> --log-failed) and collect which test failed. A test that fails on unrelated commits and passes on retry is flaky. Look in the test for timing (sleep, fixed timeouts), shared state between tests, order dependence, real network calls, unseeded random data and dates.
Apply changes in this order, because the first ones are cheap and safe:
cache: npm in setup-node, cache: pip, actions/cache keyed on the lockfile hash) and npm ci.concurrency with cancel-in-progress: true for pull requests, and paths / paths-ignore filters.timeout-minutes on every job and retention-days on artifacts.matrix with the test runner's sharding (jest --shard=${{ matrix.shard }}/4, vitest --shard, playwright test --shard, pytest-split), and run independent jobs in parallel instead of in one long job.docker/build-push-action with cache-from: type=gha and cache-to: type=gha,mode=max, Turborepo or Nx remote cache if the repo already uses them.permissions, actions pinned to a version tag or SHA, untrusted input passed through env:.Keep behaviour the same: do not remove jobs, checks or deployments to save time. Show the diff of each workflow change and, when there are run times, the expected saving based on the measured step durations. Do not quote saving percentages without measurements.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub petrovicistefan/claude-code-plugins --plugin ci-optimizerOther plugins' skills for the same job