'Rebase a tree of dependent branches (including siblings) after upstream changes. Auto-detects downstream branches and rebases each in order. Triggers
npx skills add https://github.com/brave/brave-core --skill rebase-downstream
Rebase a tree of dependent branches after upstream changes have been made.
Auto-detects the downstream branch tree (including sibling branches), rebases
each branch in order, resolves conflicts when possible, and runs preflight
checks on each branch.
git branch --show-currentgit status --shortGet the current branch name. This is the branch that was just modified and whose
changes need to propagate downstream.
git branch --show-current
Run the detect-chain.sh helper script to find all downstream branches:
bash .claude/skills/rebase-downstream/detect-chain.sh <current-branch>
The script outputs branch:parent per line in rebase order (depth-first
pre-order). This handles both linear chains and trees with sibling branches.
Display the detected chain to the user and ask for confirmation before
proceeding.
If no downstream branches are detected, report this to the user and stop.
If branches are detected, show the tree visually:
<current-branch>
→ <child1>
→ <grandchild1>
→ <child2> (sibling)
Ask the user to confirm before rebasing. If the user declines, stop.
For each downstream branch (closest to the current branch first):
git checkout <downstream-branch>
branch:parent output): git rebase --fork-point <parent-branch>
--fork-point uses the parent branch's reflog to find the actual fork point,
so only the branch's own commits are replayed. Without it, if the parent was
rebased/amended, git replays already-applied parent commits with different
SHAs, causing duplicate commits and false conflicts.
The parent for each branch is provided by the detect script. For sibling
branches, both share the same parent.
git add <resolved-files>
git rebase --continue
git rebase --abort
Report which branch and files had unresolvable conflicts, then stop
entirely. Do NOT continue to the next branch.
/preflight on this branch. Thisincludes format, gn_check, presubmit, build, and tests. If preflight fails,
stop and report. Do NOT continue to the next branch.
After all branches are rebased successfully, checkout the original starting
branch:
git checkout <original-branch>
Summarize the results:
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take brave/rebase-downstream from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.