Skill
  • Claude Code
  • Codex
  • OpenCode
  • Grok
  • OpenClaw
  • Antigravity
  • Kimi Code
  • Qwen Code
  • +27more agents

Gh pr merge worktree checkout trap

wan-huiyan/agent-traffic-control

Diagnose and bypass `gh pr merge --squash --delete-branch` failing with "failed to run git: fatal: 'main' is already used by worktree at .…

A skill in “E-commerce and sales”. Ready commands for Claude Code, Codex, OpenCode and 32 more agents.

Full description

Diagnose and bypass `gh pr merge --squash --delete-branch` failing with "failed to run git: fatal: 'main' is already used by worktree at ..." when another git worktree has main checked out. Use when: (1) you run gh pr merge and see this exact error, (2) you have multiple worktrees in the repo (e.g. `.claude/worktrees/*`), (3) the error appears even though the GitHub merge itself looks fine. The merge SUCCEEDED on GitHub — only gh's local-side effect (post-merge `git checkout main`) failed. Verify via `gh pr view N --json state,mergedAt`; if state=MERGED, you're done. This also applies to `gh pr checkout` and any other `gh` subcommand that tries to touch the local main branch while another worktree has it claimed. v1.2.0 (2026-05-26) adds the sequential-error variant: if you re-run from the main-repo worktree after the first error, you can then hit "cannot delete branch <feature-branch> used by worktree at <feature-worktree>" — same one-checkout-per-branch invariant, this time applied to the feature branch. Cleanup order: `git worktree remove` BEFORE `git branch -D`. v1.3.0 (2026-05-27) adds the `--auto --delete-branch` enable-time variant: when checks are still pending, `gh pr merge N --auto --squash --delete-branch` fails locally (same "main is already used by worktree" message) BEFORE the auto-merge intent is registered server-side — `gh pr view N --json autoMergeRequest` returns null. Workaround: drop `--delete-branch` (`gh pr merge N --auto --squash`), then `git worktree remove` + `git branch -D` manually after the merge lands. The post-merge variant in v1.0-1.2 succeeds the merge first then chokes on cleanup; this v1.3 variant chokes BEFORE the server-side enable, so verifying with `--json autoMergeRequest` (not just `state`) is required.

  • Skill
  • E-commerce and sales
  • 35 agents
  • 5 stars
  • MIT

This entry comes from the GitSkills open dataset (CC-BY-4.0). ANG did not run or audit this skill; check the source before installing.

Install

Pick your program and the command types itself.

git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control

Then copy the plugins/agent-traffic-control/skills/gh-pr-merge-worktree-checkout-trap folder into .claude/skills.

Commands are generated from the publisher’s registry data; ANG skills has not run or audited them.

Agent support

Which agents can read this entry, and which cannot.

Supported 35

  • Claude CodeReady command. Claude Code supports SKILL.md.Source
  • CodexReady command. Codex supports SKILL.md.Source
  • OpenCodeReady command. OpenCode supports SKILL.md.Source
  • GrokReady command. Grok supports SKILL.md.Source
  • OpenClawReady command. OpenClaw supports SKILL.md.Source
  • AntigravityReady command. Antigravity supports SKILL.md.Source
  • Kimi CodeReady command. Kimi Code supports SKILL.md.Source
  • Qwen CodeReady command. Qwen Code supports SKILL.md.Source
  • Gemini CLIReady command. Gemini CLI supports SKILL.md.Source
  • PiReady command. Pi supports SKILL.md.Source
  • GooseReady command. Goose supports SKILL.md.Source
  • AmpReady command. Amp supports SKILL.md.Source
  • Factory DroidReady command. Factory Droid supports SKILL.md.Source
  • Mistral VibeReady command. Mistral Vibe supports SKILL.md.Source
  • CrushReady command. Crush supports SKILL.md.Source
  • Hermes AgentReady command. Hermes Agent supports SKILL.md.Source
  • CodebuffReady command. Codebuff supports SKILL.md.Source
  • Rovo DevReady command. Rovo Dev supports SKILL.md.Source
  • QoderReady command. Qoder supports SKILL.md.Source
  • TRAEReady command. TRAE supports SKILL.md.Source
  • MiniMax CodeReady command. MiniMax Code supports SKILL.md.Source
  • MiMo CodeReady command. MiMo Code supports SKILL.md.Source
  • CursorReady command. Cursor supports SKILL.md.Source
  • GitHub CopilotReady command. GitHub Copilot supports SKILL.md.Source
  • KiroReady command. Kiro supports SKILL.md.Source
  • ClineReady command. Cline supports SKILL.md.Source
  • Kilo CodeReady command. Kilo Code supports SKILL.md.Source
  • JunieReady command. Junie supports SKILL.md.Source
  • Augment CodeReady command. Augment Code supports SKILL.md.Source
  • ZedReady command. Zed supports SKILL.md.Source
  • CodeBuddyReady command. CodeBuddy supports SKILL.md.Source
  • BLACKBOX AIReady command. BLACKBOX AI supports SKILL.md.Source
  • DevinReady command. Devin supports SKILL.md.Source
  • OpenHandsReady command. OpenHands supports SKILL.md.Source
  • Replit AgentReady command. Replit Agent supports SKILL.md.Source

Not documented 8

  • AiderNo SKILL.md support documented for Aider.Source
  • PlandexNo SKILL.md support documented for Plandex.Source
  • CodeGPTNo SKILL.md support documented for CodeGPT.Source
  • SWE-agentNo SKILL.md support documented for SWE-agent.Source
  • mini-SWE-agentNo SKILL.md support documented for mini-SWE-agent.Source
  • JulesNo SKILL.md support documented for Jules.Source
  • Open SWENo SKILL.md support documented for Open SWE.Source
  • GitLab DuoNo SKILL.md support documented for GitLab Duo.Source

Support comes from each agent’s official docs on SKILL.md and MCP; ANG has not run this entry on every agent.

In plain words

No tech background needed.

What is it?
A skill is a pack of instructions you load into your agent (like Claude Code or Codex). It is like installing an app on your phone: install it once and the agent knows how to do that job.
What is it for?
Used for “E-commerce and sales” work. In the publisher’s words: Diagnose and bypass `gh pr merge --squash --delete-branch` failing with "failed to run git: fatal: 'main' is already used by worktree at ..." when another gi…
Example request
“Update the product descriptions in the store.”
Agents
Ready commands for Claude Code, Codex, OpenCode and 32 more agents.
Can I trust it?
5 GitHub stars · MIT. Check the source before installing.

Usage

Last 30 days, on the site and in agents.

A field score needs at least 20 users and 50 tasks from the ANG app; now 0 users, 0 tasks. Until then the power score is estimated from listing data.

Benchmark

How strong is it on each agent?

46power · 35 agents

Tracking just started Open chart
  • Claude Code46
  • Codex46
  • OpenCode46
  • Grok46
  • OpenClaw46
  • Antigravity46
  • Kimi Code46
  • Qwen Code46
  • Gemini CLI46
  • Pi46
  • Goose46
  • Amp46
  • Factory Droid46
  • Mistral Vibe46
  • Crush46
  • Hermes Agent46
  • Codebuff46
  • Rovo Dev46
  • Qoder46
  • TRAE46
  • MiniMax Code46
  • MiMo Code46
  • Cursor46
  • GitHub Copilot46
  • Kiro46
  • Cline46
  • Kilo Code46
  • Junie46
  • Augment Code46
  • Zed46
  • CodeBuddy46
  • BLACKBOX AI46
  • Devin46
  • OpenHands46
  • Replit Agent46

How is the score calculated?

In the community

Ask, share how you used it.

Start a topic about this skill

Similar

From E-commerce and sales.

Codified expertise for demand forecasting, safety stock optimization, replenishment planning, a…Click to install

Skill315.8KGitHub stars

Inventory demand planning

affaan-m/ecc

  • Claude Code
  • Codex
  • +33: OpenCode, Grok, OpenClaw, Antigravity, Kimi Code, Qwen Code, Gemini CLI, Pi, Goose, Amp, Factory Droid, Mistral Vibe, Crush, Hermes Agent, Codebuff, Rovo Dev, Qoder, TRAE, MiniMax Code, MiMo Code, Cursor, GitHub Copilot, Kiro, Cline, Kilo Code, Junie, Augment Code, Zed, CodeBuddy, BLACKBOX AI, Devin, OpenHands, Replit Agent

Reference-product ecommerce image workflow for generating a compact set of product-faithful mai…Click to install

Skill110.9KGitHub stars

Ecommerce image workflow

nexu-io/open-design

  • Claude Code
  • Codex
  • +33: OpenCode, Grok, OpenClaw, Antigravity, Kimi Code, Qwen Code, Gemini CLI, Pi, Goose, Amp, Factory Droid, Mistral Vibe, Crush, Hermes Agent, Codebuff, Rovo Dev, Qoder, TRAE, MiniMax Code, MiMo Code, Cursor, GitHub Copilot, Kiro, Cline, Kilo Code, Junie, Augment Code, Zed, CodeBuddy, BLACKBOX AI, Devin, OpenHands, Replit Agent

Breaks work into ordered tasks.Click to install

Skill122.4KGitHub stars

Planning and task breakdown

addyosmani/agent-skills

  • Claude Code
  • Codex
  • +33: OpenCode, Grok, OpenClaw, Antigravity, Kimi Code, Qwen Code, Gemini CLI, Pi, Goose, Amp, Factory Droid, Mistral Vibe, Crush, Hermes Agent, Codebuff, Rovo Dev, Qoder, TRAE, MiniMax Code, MiMo Code, Cursor, GitHub Copilot, Kiro, Cline, Kilo Code, Junie, Augment Code, Zed, CodeBuddy, BLACKBOX AI, Devin, OpenHands, Replit Agent

Audit Amazon Ads profiles, regions, Sponsored Products, Sponsored Brands, Sponsored Display, DS…Click to install

Skill11.5KGitHub stars

Ads amazon

agricidaniel/claude-ads

  • Claude Code
  • Codex
  • +33: OpenCode, Grok, OpenClaw, Antigravity, Kimi Code, Qwen Code, Gemini CLI, Pi, Goose, Amp, Factory Droid, Mistral Vibe, Crush, Hermes Agent, Codebuff, Rovo Dev, Qoder, TRAE, MiniMax Code, MiMo Code, Cursor, GitHub Copilot, Kiro, Cline, Kilo Code, Junie, Augment Code, Zed, CodeBuddy, BLACKBOX AI, Devin, OpenHands, Replit Agent

Ready to install?Install