Skip to content
cccskills
FreePublished on GitHub

cascade-merge

Cascade merge changes through a chain of dependent branches. Use when updating stacked/chained PRs, propagating changes from a parent branch to all downstream branches, or when the user mentions "cascade merge", "propagate changes", "update dependent branches", or "merge to downstream branches".

The English summary is being prepared. Showing the original description.

Works withGitHub
See how to install

Files included (1)

  • SKILL.md2.6 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Cascade Merge

Propagate changes from a source branch through all dependent branches in a PR chain.

Workflow

1. Identify Downstream Branches

gh pr list --state open --json number,title,headRefName,baseRefName --limit 50 | jq -r '.[] | "\(.baseRefName)\t\(.headRefName)"'

Build the dependency chain by finding PRs where baseRefName matches the current branch, then recursively find PRs based on those branches.

2. Merge and Push Each Branch

Fetch first, then for each downstream branch in order:

git fetch origin
git checkout <downstream-branch>
git merge origin/<upstream-branch> --no-edit
git push origin <downstream-branch>

A hook allows git merge only for the remote-tracking branch of the PR's base, so merge origin/<upstream-branch>, not the local branch. Pushing the upstream branch updates origin/<upstream-branch> before the next downstream merge.

Do not cherry-pick into a downstream branch, even when the merge is blocked or only one commit is needed. A cherry-picked commit gets a new hash, so git cannot tell it is the same change as the upstream commit. Every later change upstream has to be picked again by hand, and each round leaves duplicate commits and conflicts in the downstream history. When the PR targets a branch other than the default branch, a hook blocks git cherry-pick of any commit that an upstream branch already holds. Upstream branches are the base, its own PR bases up the chain, and the default branch. If the merge you need is blocked, report it to the user instead of looking for another route.

3. Handle Conflicts

If a merge conflict occurs:

  1. Report the conflict to the user
  2. Ask how to proceed (resolve manually, skip branch, or abort)

Example

Given this PR chain:

main
 └── feature-1
      └── feature-2
           └── feature-3

When feature-1 is updated, cascade merge will:

  1. Merge feature-1 into feature-2, push
  2. Merge feature-2 into feature-3, push

Output

Report results as a table:

BranchMerged FromStatus
feature-2feature-1Done
feature-3feature-2Done

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Use by any agent before writing specs, editing code, or changing workflow files when the change could add compatibility behavior, aliases, silent fallbacks, or default-value fallbacks.

The English summary is being prepared. Showing the original description.

ogadra/dotfiles3Updated Oct 19, 2026

Interview the user in rounds until no branch of the design tree stays open.

The English summary is being prepared. Showing the original description.

ogadra/dotfiles3Updated Oct 19, 2026

外部のスキルをこのリポジトリにコピーして自分のスキルにする。ユーザーがスキルのURLやリポジトリ名を渡して「入れたい」「導入したい」と言ったとき、「上流を参照せずコピーしたい」と言ったとき、またはユーザーが `/import-skill` と打ったときに使う。Vendors an external Claude skill into this repository.

The English summary is being prepared. Showing the original description.

ogadra/dotfiles3Updated Oct 19, 2026

Forces the laziest solution that actually works, simplest, shortest, most minimal. Channels a senior dev who has been paged at 3am for a factory class that wrapped one function: question whether the task needs to exist at all, reach for the standard library before custom code, native platform features before dependencies, one line before fifty. Supports intensity levels: lite, full, ultra. The default is full. Use on ANY coding task: writing, adding, refactoring, fixing, reviewing, or designing code, and choosing libraries or dependencies. Also use whenever the user says "ponytail", "be lazy", "lazy mode", "simplest solution", "minimal solution", "yagni", "do less", or "shortest path", or complains about over-engineering, bloat, boilerplate, or unnecessary dependencies. Do NOT use for non-coding requests such as general knowledge, prose, translation, summaries, recipes.

The English summary is being prepared. Showing the original description.

ogadra/dotfiles3Updated Oct 19, 2026

PRを作る、または既存PRのbodyを直す。ユーザーが「PRを作る」「PR出して」「PRのbodyを直して」と言ったとき、ユーザーが `/pr-create` と打ったとき、または `gh pr create` や `gh pr edit --body` がhookにブロックされたときに使う。Creates or edits a pull request with a three-line body.

The English summary is being prepared. Showing the original description.

ogadra/dotfiles3Updated Oct 19, 2026

Review a GitHub pull request from multiple perspectives in parallel, output only findings, then let the user pick which to fix in the same session. Use when the user asks to review a PR by number, mentions "PRレビュー" / "PR review" with a number, or invokes `/pr-review <number>`. Fans out subagents for absolute-rules, stop-slop, security, architecture, code-quality, testing, and ai-antipattern.

The English summary is being prepared. Showing the original description.

ogadra/dotfiles3Updated Oct 19, 2026

See all skills by ogadra

Report a problem with this skill