Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

multirepo-ci-cd

БесплатноБез исполняемых скриптовНе проверен

Diagnose a CI failure or roll a workflow out across many repos. Use when debugging a red check in a multi-repo org, promoting a shared reusable-*.yml, or…

laurigatesот laurigates★ 61 звезда на GitHub

Об этом скилле

Multi-Repo CI/CD Discipline

Org-agnostic lessons for working across a portfolio of repos that share reusable workflows. The org-specific workflow catalogs live in the child rules (*/.claude/rules/ci-cd-workflows.md).

When to Use This Skill

Use this skill when... Use something else when...
Diagnosing a red check, or rolling a shared reusable-*.yml out, across a multi-repo portfolio The red check is a Claude-powered AI review that failed or flaked → github-actions-plugin:ai-review-max-turns
Re-triggering a PR after a @main reusable-workflow fix

Diagnosing a CI Failure — Fetch First

Before investigating why a workflow failed, git fetch and compare local HEAD against origin/main. In a multi-repo portfolio, local checkouts go stale, and the failing workflow file (or its config — release-please-config.json, the manifest, a new .yml) may have been added in commits you haven't pulled. It won't exist in your local tree, so you'll search for a "missing" file that CI is actively running. One git fetch + git log --oneline HEAD..origin/main shows the gap; git pull --ff-only syncs it. Diagnose against what CI actually ran, not a stale snapshot.

Rolling a Workflow Out to a Repo Class

When promoting a self-contained workflow into a shared reusable-*.yml and adding a thin caller to every repo of a class, three things bite if missed:

  1. IaC feature flags are the source of truth for the repo set. Don't hand-list repos — derive the class from the gitops/Terraform definitions (e.g. release_please = true entries in repositories.tf are the membership list). Extract them rather than guessing which repos qualify:
    awk '/^    "[^"]+" = \{/ { match($0, /"[^"]+"/); name=substr($0, RSTART+1, RLENGTH-2) } /release_please[ ]*=[ ]*true/ { print name }' repositories.tf
    
  2. Land the reusable workflow on the .github repo's main first. Callers pin uses: <owner>/.github/...@main, which resolves at dispatch time — a caller merged or dispatched before the reusable workflow exists on main fails. Merge the .github PR before opening (or at least before merging) the callers. workflow_dispatch-only callers are harmless until triggered, so they can be opened in parallel, but the .github change is the prerequisite.
  3. Bulk-create callers via the GitHub API, not local clones. The caller body is identical across repos, and some repos may not be checked out locally. Creating the branch + file + PR through the API is uniform and immune to local working-tree state (stale checkouts, wrong branch, uncommitted changes):
    sha=$(gh api repos/<owner>/$r/git/ref/heads/main --jq .object.sha)
    gh api -X POST repos/<owner>/$r/git/refs -f ref=refs/heads/$BRANCH -f sha=$sha
    gh api -X PUT repos/<owner>/$r/contents/$PATH -f message=$MSG -f content=$B64 -f branch=$BRANCH
    gh pr create -R <owner>/$r --base main --head $BRANCH -a laurigates --title "$MSG" --body "$BODY"
    
    Loop sequentially (not a parallel batch — siblings cancel on the first non-zero exit), and skip a repo if the file already exists on main. Title the caller PR ci: so release-please does not cut a version bump for a CI-only change. When the running gh user is the repo owner, omit --add-reviewer (self-review is rejected 422).

Bulk-Read Through the API Too — a Stale Checkout Produces Wrong Findings

The API-not-clones rule above is usually framed as a write discipline. It is equally a read discipline: a portfolio-wide rg/grep over local checkouts answers a question about whatever each clone last fetched, not about the repos. In a side-by-side layout where most clones are touched rarely, that answer is confidently wrong — and wrong in the direction of "this pattern isn't used anywhere," because a checkout predating an adoption simply lacks it.

Evidence (2026-07, ubuntu-slim runner sweep): a local grep -rl concluded 0 repos called reusable-release-please.yml and all 29 inlined googleapis/release-please-action directly. That statement was made to the user as fact. pal-mcp-server had migrated to the reusable on the remote weeks earlier; the local clone was stale. Nothing about the grep output looked suspicious.

  • Read each file from origin in the same pass that patches it: gh api repos/<owner>/<repo>/contents/<path> --jq .content | base64 -d. One fetch per repo is cheap and makes the finding and the edit agree.
  • Use the local checkouts only to generate candidates, never to state conclusions. Enumerate broadly locally (it's fast), then confirm every claim against the remote before reporting or acting on it.
  • Make the patch function assert its precondition and raise. The stale pal-mcp-server clone was caught only because the sweep's patcher demanded a runs-on: inside the named job and raised *"no runs-on found inside release-please j
Полный SKILL.md на GitHub

Установить multirepo-ci-cd в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash(git fetch *)
Bash(git log *)
Bash(git pull *)
Bash(gh repo list *)
Bash(gh api *)
Bash(base64 *)
Bash(awk *)
Bash(gh pr create *)
Bash(gh pr update-branch *)
Read
Grep
Glob
TodoWrite

FAQ

Что делает скилл multirepo-ci-cd?

Diagnose a CI failure or roll a workflow out across many repos. Use when debugging a red check in a multi-repo org, promoting a shared reusable-*.yml, or re-triggering a PR after a @main fix.

Как установить скилл multirepo-ci-cd?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл multirepo-ci-cd запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить multirepo-ci-cd с