with one click
stack-fix
Absorb staged changes into the correct commits in the current stack
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Absorb staged changes into the correct commits in the current stack
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | stack-fix |
| description | Absorb staged changes into the correct commits in the current stack |
| argument-hint | [--dry-run] |
Absorb code review feedback or fixes into the correct commits in the stack. This routes each hunk to the commit it logically belongs to.
Check branchless init:
if [ ! -d ".git/branchless" ]; then git branchless init; fi
Check for staged changes:
git diff --cached --stat
If nothing is staged, check for unstaged changes and ask the user what to
stage. Suggest git add -p for selective staging.
Preview absorption (dry run first):
git absorb --dry-run
Show the user which hunks will be absorbed into which commits. If any hunks can't be absorbed (they commute with all commits), warn that those will remain staged.
Confirm with the user that the mapping looks correct. If $ARGUMENTS
contains --dry-run, stop here.
Absorb and rebase:
git absorb --and-rebase
Verify the result with git sl to show the updated stack.
Check for leftover changes:
git diff --cached --stat
git diff --stat
If hunks remain (couldn't be absorbed), inform the user and suggest:
git prev to navigate,
git amend, then git next -aRun tests if a test command is readily identifiable:
git test run -x '<test-command>' 'stack()'
Report any regressions introduced by the absorption.
Fetch and distill a repo's wiki, docs, and issues into a focused reference doc
Restructure a range of commits into a clean, atomic stack ordered by concern
Break a large commit into a reviewable stack of small atomic commits
Sync stack with main, run tests, and submit all branches to remote
Run tests or formatters across all commits in a stack