一键导入
git-rebase-main
Safely rebase the current feature branch on top of the latest origin/main. Use when preparing a branch for PR, UAT, or release.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Safely rebase the current feature branch on top of the latest origin/main. Use when preparing a branch for PR, UAT, or release.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Minimum-requirements checklist for any change — code or docs-only. Run this before every PR creation or push to avoid CI failures on the first attempt.
Generate PNG screenshots for release notes using the repository's HtmlRenderer and ScreenshotGenerator tools. Use when asked to add screenshots to release notes or documentation.
Determine the next available issue number across all change types (feature, fix, workflow) by checking both local docs and remote branches, then reserve it by pushing an empty branch.
Convert the mermaid diagram in docs/agents.md to a blueprint-styled SVG for the website. Use when the workflow diagram in agents.md is updated and needs to be reflected on the website.
Run a focused accessibility pass for website changes (WCAG 2.1 AA-oriented).
Create and update interactive examples for the Eleventy website using page entrypoints and src/examples fragments.
| name | git-rebase-main |
| description | Safely rebase the current feature branch on top of the latest origin/main. Use when preparing a branch for PR, UAT, or release. |
Ensure the current feature branch includes all the latest changes from main before proceeding with code review, UAT, or release. This prevents merge conflicts and ensures tests run against the latest codebase.
main before rebasing.# Ensure we're not on main
current_branch=$(git branch --show-current)
if [[ "$current_branch" == "main" ]]; then
echo "ERROR: Cannot rebase main onto itself. Switch to a feature branch first."
exit 1
fi
# Ensure working directory is clean
if [[ -n "$(scripts/git-status.sh --porcelain)" ]]; then
echo "ERROR: Working directory has uncommitted changes. Commit or stash them first."
exit 1
fi
git fetch origin
git rebase origin/main
If the rebase fails due to conflicts:
git rebase --continue.After a successful rebase, the branch history has changed. Ask the user before force-pushing:
git push --force-with-lease origin HEAD
$ git fetch origin && git rebase origin/main
First, rewinding head to replay your work on top of it...
Applying: feat: add new formatting option
$ git push --force-with-lease origin HEAD