一键导入
mojo-rebase
Interactive rebase, fixup, and commit message rewriting patterns
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Interactive rebase, fixup, and commit message rewriting patterns
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Backlog.md task management — use when reading or updating project tasks
Session completion checklist — fires when unpushed work remains
Initialize session with repo state and available work
Atomic commit workflow with conventional commit format
Minimal-editing instruction injected at the first edit of each commit cycle
PR creation, status, and review feedback workflow
基于 SOC 职业分类
| name | mojo-rebase |
| description | Interactive rebase, fixup, and commit message rewriting patterns |
| triggers | [{"event":"tool.execute.before","tool":"bash","command":"git rebase"}] |
git rebase -i <ref> is safe to use. GIT_SEQUENCE_EDITOR halts with a break, prints the todo path.
Moving changes to an earlier commit:
# Mark the target commit as `edit` in the rebase todo
git rebase -i <ref>
# At the edit stop, stage the changes you want in this commit
git add -u .
git rebase --continue
# The later commit that originally had these lines becomes a no-op and is dropped
Rewriting commit messages:
To change a commit message further back in history, use amend! commits:
# Get the subject line of the commit to reword
git log --format="%s" -1 <commit-hash>
# Create amend commit (subject = "amend! <original-subject>", body = new full message)
git commit --allow-empty -m "amend! <original-subject>" -m "<new-full-message-including-subject>"
# Apply via autosquash
git rebase --autosquash origin/${DEFAULT_BRANCH}
Example:
git commit --allow-empty -m "amend! feat(foo): add bar" -m "feat(foo): add bar
New body explaining why without outdated details.
Authored-By: claude-code (claude-3.7-sonnet)"
git rebase --autosquash origin/${DEFAULT_BRANCH}