timgent

Merge Worktree Approvals — Git skill for Claude Code

Git community

Merge the Claude auto-approval permissions from a worktree into the main repo.

How to install Merge Worktree Approvals

Installs to ~/.claude/skills/timgent-claude-code-config-merge-worktree-approvals/SKILL.md

Terminal
mkdir -p ~/.claude/skills/timgent-claude-code-config-merge-worktree-approvals && curl -fsSL https://raw.githubusercontent.com/timgent/claude-code-config/HEAD/commands/merge-worktree-approvals.md -o ~/.claude/skills/timgent-claude-code-config-merge-worktree-approvals/SKILL.md

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

What Merge Worktree Approvals does

Merge the Claude auto-approval permissions from a worktree into the main repo.

Worktrees live at `trees//` relative to a shared parent. The main repo lives at `` relative to that same parent.

The argument `$ARGUMENTS` may be a worktree path. If not provided, use `$PWD`.

Steps

1. Determine paths

From the worktree path, derive:

  • repo_name = basename of the worktree's parent directory (i.e. basename(dirname(worktree_path)))
  • base_dir = 3 leve

Alternatives in Git

  • OSS PR — Commit + PR workflow for open source contributions: auto-creates a user-prefixed branch when on main/master, t 19.7k ★
  • Merge Command — Finalize worktree work: update docs, commit, merge to main, clean up 1.3k ★
  • Maestro Merge — Merge session worktree branch back to main 530 ★

Full documentation available on GitHub

View Source Repository