nandofarias

Jj Finish — Git skill for Claude Code

Git community

Clean up after a PR at the bottom of the stack has been merged.

How to install Jj Finish

Installs to ~/.claude/commands/nandofarias-dotfiles-jj-finish.md

Terminal
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/nandofarias/dotfiles/HEAD/.claude/commands/jj-finish.md -o ~/.claude/commands/nandofarias-dotfiles-jj-finish.md

Restart Claude Code, or start a new session, for it to be picked up.

What Jj Finish does

Clean up after a PR at the bottom of the stack has been merged.

Steps

  1. **Fetch latest (to get the merge):**

    jj git fetch
  2. **Identify merged bookmarks:** Look for bookmarks that were in the stack but are now on trunk (merged):

    jj bookmark list --all -T 'if(name.starts_with("ffarias/"), name ++ " " ++ if(tracking_present, "tracked", "local") ++ "\n")'

    Also check which bookmarks were deleted from remote (these were merged + branch deleted):

Alternatives in Git

  • Clean Worktrees (Automatic) — Automatically remove all worktrees for branches merged into master 25.5k ★
  • Fullstack Dev Skills — by jeffallan - A comprehensive Claude Code plugin with 65 specialized skills covering full-stack development a 7k ★
  • Container Use — by dagger - Development environments for coding agents 3.6k ★

Full documentation available on GitHub

View Source Repository