ワンクリックで
troubleshoot-worktree
Troubleshoot git worktree, branch, and refname issues
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Troubleshoot git worktree, branch, and refname issues
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Use when creating PRs, linking issues, managing PR comments, or creating GitHub issues
Use when creating or editing GitHub Actions workflows that call reusable workflows (uses: OWNER/repo/.github/workflows/...) — org owner references must be the literal current org, and shared-CI homes are under dryvist.
Emit a paste-ready two-part handoff for a fresh session: a `## Goal statement` hard-capped under 4000 characters (measured with wc -c, never estimated) that pastes straight into Claude Code's /goal Stop hook, plus an unbounded `## Full prompt` carrying cwd, ordered reading list, hard rules, pitfalls, and deliverables. Use when forking work to a new session, spinning up an orchestrator, or when wrap-up needs a next-session prompt with a real goal and not just a task list.
Analyzes current session state and repository status without any cleanup. Full mode (default): resolves the active plan file, reads plan checklist + TaskList, gathers unfinished work/issues from conversation history, checks git status, and emits a /handoff-built next-session prompt. Mid-session mode (`/session-status mid`): a fast plain-language 'done vs remaining' snapshot for mid-flight orientation, skipping the history scan, triage, and handoff.
End-of-session handler that first checks whether the current session's plan is actually complete. If complete: refresh repo, run quick retrospective, clean gone branches, and emit a forward-looking follow-up prompt. If incomplete: skip cleanup and emit one or more `cd`-into-worktree blocks paired with ready-to-paste resume prompts so the unfinished work can be picked up cold in a new session.
Automatically finalize pull requests for merge by resolving CodeQL violations, review threads, merge conflicts, and CI failures. Handles single PR (current branch or by number), all open PRs in the repo, or all open PRs across the org. Includes bot-authored PRs in all modes.
SOC 職業分類に基づく
| name | troubleshoot-worktree |
| description | Troubleshoot git worktree, branch, and refname issues |
Diagnose and fix worktree, branch, and reference issues.
Always run first:
git worktree list
git branch -a
git status
pwd
Never assume paths - always discover with git worktree list. The first
column is the path; the bracketed name is the branch checked out there.
Warning: warning: refname 'origin/main' is ambiguous
Means TWO things named origin/main:
refs/heads/origin/main - LOCAL branch (bad)refs/remotes/origin/main - remote tracking (good)Diagnose: git show-ref origin/main
Fix: git branch -D origin/main then verify only 1 line remains with git show-ref origin/main.
The same ambiguity can occur for any branch name, not just main — on a
git-flow repo (default branch develop) watch for origin/develop too.
Substitute the branch name in the diagnose/fix commands above.
git fetch origin --force
git branch -a | grep -i "<branch>"
git add . && git commit -m "WIP" # Commit
git stash push -m "before operation" # Stash (temporary)
git checkout -- . # Discard (DESTRUCTIVE)
git rm --cached <folder>
echo "<folder>/" >> .gitignore