Skill

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 .…

「EC と販売」分野のスキルです。Claude Code, Codex, OpenCode ほか 32 エージェント 向けのコマンドがあります。

詳細な説明

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
  • EC と販売
  • 35 エージェント
  • 5 スター
  • MIT

このエントリーは GitSkills のオープンデータセットから集計しました (CC-BY-4.0)。ANG はこのスキルを実行も監査もしていません。インストール前にソースを確認してください。

インストール

プログラムを選ぶと、コマンドが自動で入力されます。

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

次に plugins/agent-traffic-control/skills/gh-pr-merge-worktree-checkout-trap フォルダーを .claude/skills にコピーしてください。

コマンドは公開者のレジストリデータから生成されています。ANG skills は実行も監査もしていません。

エージェントの対応状況

このエントリーを読み取れるエージェントと、読み取れないエージェント。

対応 35

  • Claude Codeコマンドあり。Claude Code は SKILL.md に対応しています。ソース
  • Codexコマンドあり。Codex は SKILL.md に対応しています。ソース
  • OpenCodeコマンドあり。OpenCode は SKILL.md に対応しています。ソース
  • Grokコマンドあり。Grok は SKILL.md に対応しています。ソース
  • OpenClawコマンドあり。OpenClaw は SKILL.md に対応しています。ソース
  • Antigravityコマンドあり。Antigravity は SKILL.md に対応しています。ソース
  • Kimi Codeコマンドあり。Kimi Code は SKILL.md に対応しています。ソース
  • Qwen Codeコマンドあり。Qwen Code は SKILL.md に対応しています。ソース
  • Gemini CLIコマンドあり。Gemini CLI は SKILL.md に対応しています。ソース
  • Piコマンドあり。Pi は SKILL.md に対応しています。ソース
  • Gooseコマンドあり。Goose は SKILL.md に対応しています。ソース
  • Ampコマンドあり。Amp は SKILL.md に対応しています。ソース
  • Factory Droidコマンドあり。Factory Droid は SKILL.md に対応しています。ソース
  • Mistral Vibeコマンドあり。Mistral Vibe は SKILL.md に対応しています。ソース
  • Crushコマンドあり。Crush は SKILL.md に対応しています。ソース
  • Hermes Agentコマンドあり。Hermes Agent は SKILL.md に対応しています。ソース
  • Codebuffコマンドあり。Codebuff は SKILL.md に対応しています。ソース
  • Rovo Devコマンドあり。Rovo Dev は SKILL.md に対応しています。ソース
  • Qoderコマンドあり。Qoder は SKILL.md に対応しています。ソース
  • TRAEコマンドあり。TRAE は SKILL.md に対応しています。ソース
  • MiniMax Codeコマンドあり。MiniMax Code は SKILL.md に対応しています。ソース
  • MiMo Codeコマンドあり。MiMo Code は SKILL.md に対応しています。ソース
  • Cursorコマンドあり。Cursor は SKILL.md に対応しています。ソース
  • GitHub Copilotコマンドあり。GitHub Copilot は SKILL.md に対応しています。ソース
  • Kiroコマンドあり。Kiro は SKILL.md に対応しています。ソース
  • Clineコマンドあり。Cline は SKILL.md に対応しています。ソース
  • Kilo Codeコマンドあり。Kilo Code は SKILL.md に対応しています。ソース
  • Junieコマンドあり。Junie は SKILL.md に対応しています。ソース
  • Augment Codeコマンドあり。Augment Code は SKILL.md に対応しています。ソース
  • Zedコマンドあり。Zed は SKILL.md に対応しています。ソース
  • CodeBuddyコマンドあり。CodeBuddy は SKILL.md に対応しています。ソース
  • BLACKBOX AIコマンドあり。BLACKBOX AI は SKILL.md に対応しています。ソース
  • Devinコマンドあり。Devin は SKILL.md に対応しています。ソース
  • OpenHandsコマンドあり。OpenHands は SKILL.md に対応しています。ソース
  • Replit Agentコマンドあり。Replit Agent は SKILL.md に対応しています。ソース

記載なし 8

  • AiderAider の SKILL.md 対応は記載されていません。ソース
  • PlandexPlandex の SKILL.md 対応は記載されていません。ソース
  • CodeGPTCodeGPT の SKILL.md 対応は記載されていません。ソース
  • SWE-agentSWE-agent の SKILL.md 対応は記載されていません。ソース
  • mini-SWE-agentmini-SWE-agent の SKILL.md 対応は記載されていません。ソース
  • JulesJules の SKILL.md 対応は記載されていません。ソース
  • Open SWEOpen SWE の SKILL.md 対応は記載されていません。ソース
  • GitLab DuoGitLab Duo の SKILL.md 対応は記載されていません。ソース

対応状況は、各エージェントの公式ドキュメントにある SKILL.md と MCP の情報に基づいています。ANG がこのエントリーをすべてのエージェントで実行したわけではありません。

かんたんに言うと

技術の知識は不要です。

これは何?
スキルは、エージェント(Claude Code や Codex など)に読み込ませる指示のパックです。スマホにアプリを入れるのと同じで、一度入れればエージェントはその仕事のやり方を覚えます。
何に使うの?
「EC と販売」の作業に使います。公開者の説明: 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…
リクエスト例
“ストアの商品説明を更新して。”
エージェント
Claude Code, Codex, OpenCode ほか 32 エージェント 向けのコマンドがあります。
信頼できますか?
GitHub スター 5 · MIT。インストール前にソースを確認してください。

利用状況

過去 30 日間、サイトとエージェントでの利用。

実利用スコアには ANG アプリから 20 人以上のユーザーと 50 件以上のタスクが必要です。現在 0 人、0 件。それまでは強さのスコアを掲載データから推定します。

ベンチマーク

各エージェントでの強さは?

46パワー · 35 エージェント

トラッキング開始直後 グラフを開く
  • 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

スコアはどう計算されますか?

コミュニティで

質問したり、使い方を共有したりできます。

このスキルについてトピックを作成

類似

EC と販売 分野から。

Codified expertise for demand forecasting, safety stock optimization, replenishment planning, a…クリックしてインストール

Skill315.8KGitHub スター

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…クリックしてインストール

Skill110.9KGitHub スター

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.クリックしてインストール

Skill122.4KGitHub スター

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…クリックしてインストール

Skill11.5KGitHub スター

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

インストールの準備はできましたか?インストール