version
3.6.0
GitHub stars
13

Install

/plugin install git@pickled-claude-plugins

Run it inside Claude Code after adding the marketplace with /plugin marketplace add technicalpickles/pickled-claude-plugins.

Contents

Discovered from source

Skills 9

Git Checkout

Check out a PR, branch, or ref into an isolated worktree, with the context needed to start work or review.

Accepts a PR URL, {repo}#{number}, #{number} or a bare number (infer owner/repo from the git remote), a branch name, or a SHA/tag.

PRs

  1. gh pr view <number> --json title,body,author,state,baseRefName,headRefName,url,reviews,reviewRequests
  2. git fetch origin <headRefName> before creating the worktree.
  3. Create the worktree with superpowers:using-git-worktrees, which picks the directory and honors the user's worktree tool. Name it pr-<number>-<2-3-word-description> (e.g. pr-1234-add-oauth).
  4. Report: title, author, head -> base, full URL, a 1-3 sentence summary of the PR body, changed files grouped by directory, review status (existing reviews, requested reviewers), and the worktree path.

Branches and refs

Create the worktree the same way (new branch if it doesn't exist yet) and report the path and branch.

Related

  • git:inbox to find PRs awaiting review, code-review for the review itself.

Git Commit

Preferences and best practices for interacting with a git repository.

git add

Stage the files you changed by path. git add . and git add -A sweep in whatever else is in the working tree, including files another session left there.

Ask before staging files that look like agent configuration or planning docs.

git commit

PREFER writing the commit message to a file under $TMPDIR, named for what is being committed, then commit with git commit -F "$TMPDIR/path-to-message.txt".

Use -F (--file), NEVER -t (--template). A template opens the message in an editor and git aborts if it comes back unchanged (Aborting commit; you did not edit the message.). Agent shells run with a no-op editor, so -t always aborts. The abort comes after pre-commit hooks run, so the failure looks like a hook problem. It isn't; don't reach for --no-verify.

Put any trailers your instructions require (e.g. Co-Authored-By:) at the end of the message file. Writing the message to a file first makes these easy to forget.

taskwarrior trailers

When the work tracks a taskwarrior task, end the message with a trailer naming the task by its full UUID (task _get <id>.uuid), never the integer ID, which gets reused:

  • Closes <uuid> when this commit finishes the task.
  • Refs <uuid> when it moves the task along without finishing it.

A task reconciler reads these trailers to decide which tasks to close. Never run task <id> done yourself on the strength of a commit.

scope the commit to your paths

PREFER git commit -F <file> -- <path>... over a bare git commit. A bare commit takes everything currently staged, including files another session or tool staged in the same working tree between your git add and your git commit. Naming the paths commits only what you meant to.

Path-limited commits take the working-tree version of those files, so skip -- <path> when you deliberately staged only some hunks of a file.

signing

Commit signing is set up. Never bypass it (--no-gpg-sign, -c commit.gpgsign=false, switching keys). If signing fails, read the actual error and report it to the user; on a Mac with Automic Vault, the automic-vault:automic-vault-credentials skill covers agent signing failures.

hooks

pre-commit failures

When pre-commit checks fail, read what failed and fix it. Ask the user when the right fix is unclear.

DO NOT follow sorbet's autocorrection advice. DO NOT skip verification without confirmation from the user.

prepare-commit-msg and post-commit

git: 'duet-prepare-commit-msg' is not a git command comes from leftover git-duet hooks in .git/hooks/ (we no longer use git-duet). Remove the hook files that call it.

Git worktrees

Use whichever worktree tool the user prefers. If none is stated and wt (worktrunk) is on PATH, lean toward it: it has non-interactive flags and lifecycle hooks the others lack.

Create

Branch from origin/<default>, not local main. When local main is ahead of origin, the first push drags unpushed commits into the PR.

  • git worktree add -b <branch> <path> origin/<default>
  • wt: wt switch --create <branch> --base origin/<default> --yes --no-cd --format=json, then cd to .path. A trailing "has no upstream information" error after creation is harmless; check git worktree list before retrying.
  • EnterWorktree: it already branches from origin/<default>, so check git log origin/main..main for local-only commits first. Its guard rejects &&, $(...) and multi-line commands.

Remove after merge

Once a worktree's PR merges, remove it in the same session without asking, and report it as done. Cleanup is not a step to hand back to the user.

  • Keep it only when the user said they're still using it, or it is the root of a live session (a desktop-app worktree session, this one included), since removing that breaks the session. Say which exception applied.
  • git fetch first. After a squash-merge, stale refs make removal tools think the branch is unmerged.
  • cd out of the worktree before removing it.
  • Never force. Removal refuses a dirty worktree, and that refusal is the safety net. Read what it refused on and report it instead of passing -f or -D.

By tool:

  • git worktree remove <path>, then git branch -d <branch> if the branch isn't needed.
  • wt: wt remove <branch> -y. It keeps an unmerged branch on its own.
  • A worktree this session entered with EnterWorktree: ExitWorktree with the remove action.

Sandbox

Under the command sandbox, Operation not permitted in a worktree is usually the path denylist (.claude/agents/*, .claude/commands/*, .mcp.json, .git/hooks/*, rc files), not the worktree location. If creating one fails that way partway through, the branch may already exist; retry without creating it (wt switch <branch>, or git worktree add <path> <branch>) unsandboxed.

Git Inbox

Overview

Show PRs awaiting your review across repositories. Surfaces what needs your attention with context to prioritize.

Announce: "Using git:inbox to check PRs awaiting your review..."

When to Use

  • Starting your day - "what needs my attention?"
  • User asks about PRs to review
  • User says "inbox", "review queue", "what's waiting on me?"

Workflow

1. Fetch PRs Awaiting Review

# PRs where you're requested reviewer
gh search prs --review-requested=@me --state=open --json repository,number,title,author,createdAt,url

# PRs where you're assigned
gh search prs --assignee=@me --state=open --json repository,number,title,author,createdAt,url

2. Enrich with Review Status

For each PR, get review state:

gh pr view {number} --repo {owner}/{repo} --json reviews,reviewRequests

3. Present Inbox

Format as actionable list:

## PRs Awaiting Your Review

### {repo} #{number}: {title}
- **Author:** @{author}
- **Age:** {days} days
- **URL:** {full_url}
- **Status:** {review_status}

---

{N} PRs need your attention. Check out a PR for local review?

Important:

  • Always show full PR URL (clickable/copy-pasteable)
  • Sort by age (oldest first) or priority
  • Show review status (no reviews yet, changes requested, approved by others)

4. Offer Next Action

Use AskUserQuestion:

Which PR would you like to check out for review?
(A) #{number} - {title}
(B) #{number} - {title}
(C) #{number} - {title}
(D) None right now

If user picks one → invoke git:checkout with the PR.

Quick Reference

CommandPurpose
gh search prs --review-requested=@me --state=openPRs requesting your review
gh pr view {n} --repo {r} --json reviewsGet review status

Related

  • git:checkout - Check out a PR for local review
  • code-review - Guide the actual review process (separate skill)

Git Pull Feedback

Overview

Pulls review feedback on a PR the user authored into a working doc with per-thread triage slots. The point is rigor: every unresolved thread gets a tentative verdict (valid / invalid / nice-to-have / needs-clarification) with reasoning and a plan, so the user can work through feedback deliberately instead of rubber-stamping.

Announce: "Using git:pull-feedback to pull and triage feedback on PR #N."

Workflow

1. Fetch

./fetch.sh [ref]

ref accepts a bare number, #N, owner/repo#N, a PR URL, or nothing (auto-detects from current branch). The script writes a skeleton doc to .scratch/pr-reviews/<N>/threads.md with _pending triage_ placeholders and prints counts on stdout. Use this output location — don't invent your own filename.

2. Orient only if context is cold

Add a ## Summary section (1-2 sentences on what the PR does + state of the review) only if you don't already know the PR. If the user has been discussing it in conversation or the branch name tells you, skip — guessing wastes tokens and risks confabulation.

3. Triage each unresolved thread (shallow pass)

Each thread has a unique <!-- thread: N --> anchor. If a reviewer left feedback as a review body instead of (or in addition to) inline comments, it appears in its own ## Review comments section with a <!-- review: N --> anchor per review — triage those the same way. Use targeted Edit calls to fill three slots per thread or review:

  • Verdict (tentative): pick one, based on whether the reviewer is right:
    • ✅ Valid — reviewer has a point, code needs to change
    • ❌ Invalid — disagree for a concrete technical reason (not because the fix is inconvenient)
    • 💡 Nice-to-have — reasonable suggestion, but out of scope for this PR
    • ❓ Needs clarification — comment is ambiguous; ask the reviewer instead of guessing
  • Reasoning: 1-3 sentences. Reference the comment body or the code, not vibes. Severity ≠ verdict — a "should-fix" can still be Invalid if the reviewer is wrong.
  • Plan: concrete next step — fix inline, deep-dive first, reply-and-defer, ask reviewer.

Keep the (tentative) label. It's the shallow-pass signal; it invites deep-dive on anything non-obvious.

4. Deep-dive on request

When the user asks to dig into a specific thread ("verify the race condition claim", "dig into thread 3"):

  1. Read the referenced file at current HEAD
  2. Check surrounding code for context the reviewer may not have seen
  3. Re-evaluate, then upgrade **Verdict (tentative):** → **Verdict:**

Shallow pass catches obvious cases (typos, renames, style). Deep-dive is where the hard judgment lives — reserve it for threads with real technical substance.

5. Apply rigor to Invalid verdicts

For any Invalid, apply superpowers:receiving-code-review: verify the reviewer's claim is actually wrong (don't just disagree because fixing is annoying), acknowledge the concern even when disagreeing, and plan a reply that explains the reasoning. That skill was written for agent reviews; the core rigor applies equally to humans.

6. Report back

Summarize counts and offer a next step:

7 threads triaged: 4 valid, 2 invalid, 1 nit. Doc at .scratch/pr-reviews/603/threads.md. Walk through them, or dig deeper on specific ones?

Then stop. Addressing threads, making code changes, and replying are normal work from there — not this skill's job.

Stay in Scope

This skill is about review threads, not PR health. Do NOT drift into:

  • Merge conflicts, CI status, approval gates, mergeable state
  • Whether the PR needs a rebase
  • Whether another reviewer should be added

If the user asks "catch me up on my PR", they mean the review feedback. Other PR state belongs to other tools (gh pr view, gh pr checks, git:pull-request).

Reviewer scoping: If the user asks specifically about one reviewer ("what did alice say?"), scope the doc to that reviewer's threads. Other reviewers' threads can be omitted or deferred — don't force all-threads mode.

When Not to Use

  • PRs awaiting the user's review → git:inbox
  • Writing PR body, description, or replies → git:pull-request
  • Reviewing someone else's PR → pr-review-toolkit:review-pr or code-review:code-review
  • Marking threads resolved, posting replies, or pushing commits — outside this skill's scope

Quick Reference

ActionCommand
Fetch for current branch's PR./fetch.sh
Fetch for specific PR./fetch.sh 123 or ./fetch.sh owner/repo#123
Deep-dive on thread NRead the file, update verdict + reasoning via Edit
Run internal tests./tests/run-tests.sh

Common Mistakes

  • Severity in place of verdict. "Should-fix" is urgency, not validity. A Should-fix comment can still be Invalid if the reviewer is wrong about the code. Keep the two axes separate.
  • Filling ## Summary without real context. If you don't actually know what the PR does, either read enough to find out or leave the section off. Don't confabulate.
  • Scope drift to PR health. Merge conflicts and CI aren't review feedback. Stay on threads.
  • Confirming verdicts without deep-diving. The (tentative) marker isn't decoration — keep it until you've read the code for that thread.
  • Addressing threads in the same turn as triaging. The skill ends at the filled doc. Code changes are a separate step; forcing both into one pass rushes both.

Overview

Authoring PR communication that respects busy reviewers. All bodies and comments are drafted to .scratch/pr-bodies/ first. For creation the draft is the audit record, written then used immediately; for updates and comments it's also a review checkpoint. Manual edits are detected before overwriting.

Operations

OperationTypical phrasinggh command at end
Create"create/draft/open/file a PR", "push and PR it"gh pr create --body-file
Update body"update the PR body", "rewrite the PR description"gh pr edit --body-file
Comment"comment on the PR", "reply to review feedback"gh pr comment --body-file

Always pass --body-file, never an inline --body (shell escaping, and no draft on disk).

Routing ambiguous requests

"update the PR" is ambiguous:

  • No PR exists: error and offer to create
  • PR has no reviews: update body
  • PR has reviews: ask whether to update body or add a comment

Prefer body update when there are no reviews yet, the user says "update the description", or scope changed. Prefer comment when reviews are in, the user is responding to feedback, or they want to notify watchers (comments generate notifications, body updates do not).

Content principles

Follow repo conventions first

Check for a PR template (.github/pull_request_template.md, .github/PULL_REQUEST_TEMPLATE.md, .github/PULL_REQUEST_TEMPLATE/*.md) and CONTRIBUTING.md (also .github/CONTRIBUTING.md, docs/CONTRIBUTING.md). If a template exists, follow it exactly.

Default body structure (no template)

## Summary

- Material impact point 1
- Material impact point 2 (2-4 bullets total)

## Test plan

- How to verify (only if non-obvious)

<attribution footer, if your environment requires one>

Optional sections based on context: ## Breaking changes, ## Migration notes, ## Follow-up work.

If your instructions require an attribution footer on PR bodies (for example a "Generated with ..." line), append it as the last line of the body. It isn't a section; don't give it a heading.

Voice and style

If a voice or writing-style skill is available for prose written under the user's name, load it and follow it for the body and comments. No em-dashes in titles, bodies, or comments: outbound em-dash checks reject them at send time, so fix the draft before running gh.

What goes in the body

Lead with material impact and why it matters. If a reviewer can see it in the diff or CI output, leave it out unless it is the central focus: metrics (test counts, files changed, coverage), implementation narration ("created a new Foo class", "added error handling"), technology lists, and "following best practices". No H1 (GitHub shows the title).

Workflow: Create PR

  1. Check for existing PR: gh pr list --head <branch> --state open. If one exists, route to update; if more than one (rare), ask which.
  2. Gather: git log <base>..HEAD, PR template, CONTRIBUTING.md.
  3. Draft body to .scratch/pr-bodies/drafts/<slug>.md.
  4. Create: gh pr create --title "..." --body-file <draft-path> (add --draft if the user asked for a draft). No approval pause on the routine case: being asked to create a PR is itself the go-ahead; the draft file is the record, not a checkpoint. Don't add a confirmation pause back in "to be safe": skipping that round-trip is the point. Do stop and confirm first if something's off the routine path: no commits ahead of base, an open PR already exists for this branch, or the title/scope is genuinely ambiguous.
  5. Archive: move the draft to .scratch/pr-bodies/<number>/<timestamp>-body.md and write metadata.json with the body hash.

Workflow: Update body

  1. Load: gh pr view --json number,body,title,state. Load metadata.json if present. Warn if closed or merged.
  2. Detect manual edits: hash the current body (shasum -a 256) and compare to last_generated_hash. If different and the diff is more than whitespace, ask: overwrite, merge, or cancel. Never overwrite manual edits silently.
  3. Check for material change: re-analyze <base>..HEAD. If scope is unchanged from last generation, skip the update and say "description still accurate".
  4. Draft to .scratch/pr-bodies/<number>/<timestamp>-body.md. Show the diff (current vs proposed) and confirm.
  5. Update: gh pr edit <number> --body-file <file>. Update metadata.json (new hash, timestamp).

Workflow: Comment

  1. Load: gh pr view --json number,title,reviews,comments.
  2. Determine content from recent commits: responding to review feedback, noting significant additions, or summarizing a batch of changes.
  3. Draft to .scratch/pr-bodies/<number>/<timestamp>-comment.md. Show the draft and confirm.
  4. Post: gh pr comment <number> --body-file <file>.

Unlike create, update and comment always get the user's review first: they can overwrite manual edits or ping reviewers.

Storage layout

.scratch/pr-bodies/
  drafts/
    <slug>.md                # Pre-creation drafts
  <pr-number>/
    metadata.json             # See schema below
    <timestamp>-body.md       # Timestamped body versions
    <timestamp>-comment.md    # Timestamped comments

metadata.json:

{
  "pr_number": 123,
  "branch": "feature/foo",
  "base": "main",
  "title": "Add foo",
  "created_at": "2025-11-07T10:30:00Z",
  "last_generated_hash": "abc123...",
  "last_updated_at": "2025-11-07T16:45:30Z",
  "manual_edits_detected": false
}

File timestamps use ISO 8601 with hyphens (2025-11-07T10-30-00). Keep metadata.json, the last five timestamped files, and any in-progress draft; delete the draft after creation.

Git Push

Preferences for git push, especially diagnosing failures.

Reading push failure output

When git push exits non-zero, output mixes three layers:

  • SSH/transport (key offered, accepted)
  • Hook driver header (lefthook, husky, pre-commit, etc.)
  • Hook output (test/lint/coverage walls)

Identify the failed layer before debugging:

  • lefthook or hook: pre-push → pre-push hook failed; transport was fine
  • Permission denied (publickey) → SSH auth refused
  • ! [rejected] / non-fast-forward → push needs rebase

A wall of test or coverage output is NOT an SSH problem. The hook ran tests, the tests failed, the push was blocked.

pre-push hook failures

Same rules as pre-commit failures in the commit skill: analyze the failures, autofix when possible, ask the user when unclear. Do NOT skip with --no-verify without explicit confirmation.

Debugging SSH

Before adding -v to debug an SSH issue, check whether core.sshCommand is configured:

git config --get core.sshCommand

If it returns nothing, GIT_SSH_COMMAND="ssh -v" git push origin <branch> is fine.

If it returns anything (custom IdentityFile, IdentityAgent, deploy-key flags, etc.), DO NOT use GIT_SSH_COMMAND="ssh -v". It REPLACES core.sshCommand entirely, dropping every flag. Output will look like the wrong keys are being offered, because they are, but only because you removed the constraint.

Append -v to the existing command instead:

GIT_SSH_COMMAND="$(git config core.sshCommand) -v" git push origin <branch>

Background push gotcha

If you started a push with run_in_background and then ran a foreground retry (e.g., because the first looked stuck), the background push may have already succeeded. Before re-investigating "why is push failing":

  1. git -C <worktree> log --oneline origin/<branch>..HEAD. Empty output means the push went through.
  2. Verify retry's cwd: pwd and git rev-parse --show-toplevel.
  3. gh pr view <pr> to see if the commit landed.

Don't escalate to "SSH might be broken" before confirming the push didn't already complete.

Git Triage

Inventory git work in progress (worktrees, stashes, local branches, uncommitted work) with enough context to decide what to resume, review, or clean up. The user can scope it to worktrees, stash, or branches; default is everything.

For each item, find

  • Worktree: branch, associated PR (gh pr list --head <branch> --state all) with state and a full URL, matching plan file under docs/plans/, uncommitted changes summarized by what they appear to do (infer from the diff, don't just count files), and unpushed commit subjects.
  • Stash: age, source branch and whether it still exists, files touched.
  • Branch: last commit age, PR and its state, whether the remote branch is gone. Judge "merged" by the PR state: squash merges don't show up in git branch --merged.

Present

Group by worktrees, stashes, branches. Give every item a recommendation with its reason: resume (PR approved, needs a push), review (stash on a live branch, may be superseded), or safe to delete (PR merged, source branch gone, PR closed and remote deleted). End with a one-line count per group.

Act

Offer the cleanup choices: individual items, "all safe-to-delete items", or nothing. Never auto-delete. For a bulk cleanup, list exactly what will be deleted and confirm before deleting anything.

Related

  • git:checkout to resume a worktree, git:inbox for PRs awaiting your review, superpowers:finishing-a-development-branch after finishing work.

Git Update

Bring the current branch up to date with its base branch, resolving conflicts by intent.

  • Merge, never rebase, to preserve history.
  • Resolve autonomously, then present the resolution for approval before committing.

Find the base branch

  1. PR base: gh pr view --json baseRefName -q .baseRefName, merged as origin/<base>.
  2. No PR: the remote's default branch, git symbolic-ref --short refs/remotes/origin/HEAD.
  3. Neither works: ask which branch to merge from.

Don't use @{upstream}: for a pushed feature branch it is the branch's own remote copy, not the base, and agent branches often have no upstream at all.

Merge

git fetch origin, then git merge origin/<base> --no-edit. Nothing to merge: say "already up to date" and stop. Clean merge: push and report how many commits came in.

If the branch belongs to someone else (gh pr view --json author), say so and confirm before pushing to it. If a merge is already in progress, offer to continue or abort it.

Resolve conflicts

For each conflicted file, read both sides and the commit messages that produced them (git log --format='%s%n%b' <merge-base>..HEAD -- <file> and the same for origin/<base>) to learn what each side was trying to do. Then:

ConflictResolution
Independent (different parts)Keep both
Overlapping (same area, different purposes)Re-apply this branch's intent on top of the newer approach, usually upstream's (if upstream refactored a function, adapt the branch's additions to the new shape)
Contradictory (mutually exclusive)Don't auto-resolve; present both options with context
Binary, submodule, or too tangledFlag for manual resolution with what you understood

Present, then commit

Before committing, show per file: what this branch's changes did, what upstream's did, how you resolved it, and the key hunk. Confirm no conflict markers remain and the file still parses. Ask: commit and push, adjust manually, or show more context.

On approval, commit only the resolved files with a message like Merge origin/<base> into <branch> listing them, push, and report the files resolved.

Sponsors

Details

Marketplace
technicalpickles/pickled-claude-plugins
Source
plugins/git
Category
Community

More from technicalpickles/pickled-claude-plugins

All 26