一键导入
absorb
Automatically fold staged changes into the right commits using git-absorb. Stages fixes, runs absorb with dry-run preview, and optionally rebases.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Automatically fold staged changes into the right commits using git-absorb. Stages fixes, runs absorb with dry-run preview, and optionally rebases.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Consult external coding agents (OpenAI Codex, Google Antigravity/agy) for a second opinion, code review, or any custom question. Runs them via CLI and reports back. Use when the user says consult, second opinion, external review, ask codex/antigravity/agy, or mentions /consult.
Format and create git commits. ALWAYS use this skill when making git commits. TRIGGER: Any time you are about to run `git commit`.
基于 SOC 职业分类
| name | absorb |
| version | 1.0.0 |
| description | Automatically fold staged changes into the right commits using git-absorb. Stages fixes, runs absorb with dry-run preview, and optionally rebases. |
| allowed-tools | ["Bash","Read","Grep","Glob","AskUserQuestion"] |
You are running the /absorb workflow. This uses git-absorb to automatically create fixup commits that target the correct parent commits, then optionally squash them via autosquash rebase.
--fixup SHA hunting or interactive rebasegit absorb --version
If not installed, tell the user to install it (brew install git-absorb, cargo install git-absorb, etc.) and stop.
Run these in parallel:
git status --short
git log --oneline -20
Identify:
If there are no staged or unstaged changes, tell the user there's nothing to absorb and stop.
If there are unstaged changes but nothing staged, ask the user what to stage:
git add -Agit add <files>If changes are already staged, proceed directly.
Always preview first:
git absorb --dry-run --verbose
Show the user what absorb plans to do — which hunks map to which commits. If absorb can't match any hunks, explain why (changes may not commute with any recent commit, or may be new code that doesn't modify existing lines).
Ask the user to confirm, presenting these options:
git absorb --and-rebase (creates fixup commits and squashes them immediately)git absorb (creates fixup commits for manual review before rebasing)Run the chosen command.
git log --oneline -15
Show the resulting commit history. If fixup commits were created without rebase, remind the user they can squash with:
git rebase -i --autosquash <base>
Pass these through when the user requests them:
| Flag | Use when |
|---|---|
--base <ref> | Branch has many commits; set explicit base (e.g., --base main) |
--force | Skip all safety checks (non-author commits, detached HEAD) |
--one-fixup-per-commit | Prefer one fixup per target commit instead of per-hunk |
--whole-file | Match by file rather than hunk (use with care) |
If something went wrong after absorb:
git reset --soft PRE_ABSORB_HEAD
This restores the pre-absorb state. The ref is created automatically by git-absorb.
[absorb] maxStack in .gitconfig or --base)--force or --force-author is passed-i (interactive) flags — not supported in this environment