from-branch

Attaches a Claude Code web session to an existing branch or PR and dispatches follow-up work.

Updated Nov 17, 2025
One-click install
npx skills add https://github.com/vzakharov/vovazakharov.com --skill from-branch-vzakharov
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: from-branch
Source: https://github.com/vzakharov/vovazakharov.com/tree/main/.claude/skills/from-branch
Command: npx skills add https://github.com/vzakharov/vovazakharov.com --skill from-branch-vzakharov

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Claude Code web sessions start on a fresh auto-created branch, which fragments work when you actually want to continue an existing branch or address PR feedback. This Skill discards the empty auto-branch and re-points the session at the intended branch or PR head so work continues in the right place. ## Core Features & Use Cases - Branch and PR attachment: Resolves a branch name, #NNN PR number, or any PR deep link (review, comment, or /files URLs) to the correct head branch, including cross-repository forks via gh pr checkout. - Safe auto-branch cleanup: Verifies the auto-branch is empty before deleting it locally and remotely, stopping to ask the user if unexpected commits or changes exist. - Follow-up dispatch: After attaching, runs a free-form instruction, executes a plan left under docs/plans/ via go/implement/execute, or chains into another skill like /finalize. - Use Case: A reviewer leaves inline comments on PR #123. You launch a session with /from-branch https://github.com/owner/repo/pull/123#pullrequestreview-999 and the session checks out the PR branch, reads that review's comments, and addresses the feedback. ## Quick Start Invoke /from-branch with a branch name, PR number, or PR URL, optionally followed by an instruction such as go or /finalize.

Frequently Asked Questions about from-branch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I continue work on an existing branch in a Claude Code web session?

Invoke /from-branch with the branch name, PR number, or PR URL. The skill checks out the target branch, deletes the empty auto-created session branch, and treats the target as the working branch for all subsequent commits and pushes.

How do I address PR review comments in a new Claude Code session?

Pass the review deep link to /from-branch, such as a URL ending in #pullrequestreview-<id>. The skill extracts the PR number, checks out its head branch, fetches the review's inline comments via gh api, and treats that feedback as the follow-up task.

Can /from-branch handle PRs from forked repositories?

Yes. When gh pr view reports isCrossRepository as true, the skill uses gh pr checkout, which sets up the fork remote automatically and leaves you on the PR head with upstream configured.

What happens if the auto-branch has uncommitted changes or commits?

The skill stops and asks the user rather than discarding anything. It verifies the auto-branch is zero commits ahead of origin/main with a clean tree before deleting it, since unexpected work signals abnormal usage.

Why does the skill prefer gh CLI over GitHub MCP tools?

The GitHub MCP tools are scoped to a narrow allowlist and refuse branch-level actions like checking out PR heads or fetching arbitrary refs. The gh CLI with the GH_TOKEN environment variable performs these operations without restriction.