.claude/skills/git-prev-next/SKILL.md
Walk through git commit history using git prev/next for interactive editing. Use when you need to amend multiple commits in a stack (e.g., adding Differential Revision lines, fixing commit messages, or making small edits across a commit series).
npx skillsauth add alexpopov/dots git-prev-nextInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
git prev and git next are custom scripts (in ~/.local/bin/) that let you
walk backward and forward through a commit stack, pausing at each commit in an
editable state. Under the hood they manage an interactive rebase automatically.
This is simpler and safer than manually running git rebase -i when you need
to amend multiple commits in sequence.
git prev — moves HEAD to the parent commit (goes backward in history).
If not already in an interactive rebase, starts one automatically.git next — moves HEAD to the next commit (goes forward in history).
Only works when already in an interactive rebase (started by git prev).git prev 3 moves back 3 commits.git rebase --continue to finish replaying remaining commits.git prev..git/rebase-apply).For example, adding Differential Revision: lines to 5 commits:
# Start at the top of your stack
git log --oneline -5
# Walk to the bottom commit you want to edit (use count to skip multiple)
git prev 4 # go back 4 commits at once
# At each commit, amend the message using the temp file approach
git log -1 --format=%B > /tmp/commitmsg.txt
echo "" >> /tmp/commitmsg.txt
echo "Differential Revision: https://phabricator.intern.facebook.com/DXXXXXXX" >> /tmp/commitmsg.txt
git commit --amend -F /tmp/commitmsg.txt
rm /tmp/commitmsg.txt
# Move forward to next commit
git next
# Amend that one too (same temp file pattern)
git log -1 --format=%B > /tmp/commitmsg.txt
# ... edit /tmp/commitmsg.txt ...
git commit --amend -F /tmp/commitmsg.txt
rm /tmp/commitmsg.txt
# Repeat git next + amend for each commit, then finish
git rebase --continue
git prev 2 # walk back 2 commits
# make your edits...
git add <files>
git commit --amend --no-edit # fold changes into this commit
git next # move forward (may need conflict resolution)
git rebase --continue # finish
git status often to remind yourself you're in a rebase. It's easy
to forget, especially across tool calls or context switches. git status
will show interactive rebase in progress when you're mid-walk.git prev uses git reset --hard HEAD^ internally — ensure your work tree
is clean before using it.git next calls git rebase --continue internally — conflicts may arise
if your amendments change code that later commits touch.git rebase --continue to replay any
remaining commits. If you forget, you'll be left in a detached HEAD state
with a .git/rebase-merge directory..git/rebase-merge/git-rebase-todo.
This file shows what's queued but do NOT edit it directly — use git prev,
git next, and git rebase --continue to control the flow.git prev from a non-rebase state starts a new interactive rebase on HEAD^.
git next from a non-rebase state prints "At top" and exits.development
Backfill EXIF on Alp's film-scan JPEGs — camera, lens, sequenced DateTimeOriginal, and GPS — so they sort and identify correctly when imported into Photos.app. Use when the user wants to set/fix camera, lens, date, or location on a folder of images (typically under `~/Library/Mobile Documents/com~apple~CloudDocs/Pictures/To Import/`).
devops
Retroactively edit location, date, or timezone on photos that already live inside macOS Photos.app (and iCloud Photos) — including applying a GPX track. Use when the user wants to geotag, fix a wrong-TZ camera clock, shift timestamps, or apply GPS coordinates to photos that are NOT loose files but are inside Photos.app. Distinct from the `photo-exif` skill, which edits loose JPEG/RAW files before import.
tools
Use when the user says "open", "show me", "nvr", "open in editor", "open in nvr", "open in neovim", or wants to view a file in their editor rather than in the CLI. Also use proactively after creating or editing a file the user will want to review.
tools
Use this skill when working with the token-based Notion MCP servers (e.g. `mcp__notion-wife__API-*`) that wrap the raw Notion REST API — distinct from the OAuth `mcp__notion__*` server covered by notion-tricks. Covers native API JSON property shapes, the two-step page-then-content creation flow, and using `curl` with the `NOTION_TOKEN_*` env var to bypass MCP entirely for bulk/precise operations.