AgentSkillsCN

rebase-branches

使用 Mermaid 图表生成层次化的架构文档。当您需要记录架构、创建系统图,或阐释代码库结构时,可选用此方法。

SKILL.md
--- frontmatter
name: rebase-branches
description: Rebase all challenge branches on the latest main branch to propagate changes

Rebase All Challenge Branches

Rebases all challenge branches on the latest main branch to propagate changes.

Usage

code
/rebase-branches

Instructions

When this command is invoked:

  1. Check that the repository is in a clean state (no uncommitted changes)
  2. Execute the rebase script: .claude/skills/rebase-branches/scripts/rebase-all-branches.sh
  3. Report the results to the user:
    • List successfully rebased branches
    • List any branches that had conflicts
    • Provide instructions for manually resolving conflicts if needed
    • Suggest push commands with --force-with-lease if rebases succeeded

Context

This repository uses a branch-based structure where:

  • The main branch contains only documentation in .claude/
  • Each challenge branch contains a complete debugging challenge
  • When .claude/README.md is updated, all challenge branches should be rebased to include those changes

The rebase script automates this process, handling conflicts gracefully and providing clear feedback.