Start a task in a Git worktree under .worktrees/ from freshly fetched origin/main, implement and validate it, then use commit-push-pr to open or update a PR.

Apache-2.0Auto-check: notesDevelopment

Install Worktree PR

skills CLI
$ npx skills add converge-ai-labs/agent-foundation --skill worktree-pr -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install converge-ai-labs/agent-foundation worktree-pr --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/converge-ai-labs/agent-foundation.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/worktree-pr .claude/skills/worktree-pr && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
worktree-pr
GitHub stars
171
Token cost
~1.2k tokens
SKILL.md length
641 words
Files
1
Skills in repo
5
Repo updated
First seen
Licence
Apache-2.0

At a glance

Start a task in a Git worktree under .worktrees/ from freshly fetched origin/main, implement and validate it, then use commit-push-pr to open or update a PR.

  • Works in 4 steps: Confirm origin is the intended… → Choose a short descriptive branch and… → Ensure /.worktrees/ is ignored in the… → …
  • The user requests worktree-based development
  • SKILL.md covers Select and Create the Worktree, Work in the Selected Worktree, Hand Off to commit-push-pr and After an Authorized Merge
  • Calls git and make

What it does

Worktree PR is an agent skill from converge-ai-labs/agent-foundation. Start a task in a Git worktree under .worktrees/ from freshly fetched origin/main, implement and validate it, then use commit-push-pr to open or update a PR. Use when the user requests worktree-based development or an isolated task-to-PR workflow; continue follow-ups in the same worktree.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git worktrees. It works with Git. The repository describes itself as: a13n - An open-source library and self-hosted platform for building and running your own agent systems—with managed agents, memory, sandboxes, computer use, and durable… The licence is Apache-2.0.

When your agent uses it

  • The user requests worktree-based development
  • An isolated task-to-PR workflow
  • Continue follow-ups in the same worktree

Example prompts

  • “/worktree-pr”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Confirm origin is the intended repository and fetch it with git fetch origin. Use the updated origin/main, not local main or the current…
  2. Choose a short descriptive branch and /.worktrees/ path within the Environment's accessible files and shell scope. Keep all task worktrees…
  3. Ensure /.worktrees/ is ignored in the primary checkout. The repository's .gitignore owns this rule. For an older checkout without it, add…
  4. Create the worktree and record its starting commit

What it can do on your machine

Read from SKILL.md and the folder at commit 03de0fe. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • make

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Worktree PR loads about 1.2k tokens when it runs. Until then it costs about 75 tokens; SKILL.md has 641 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~75
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:37
    work; do not automatically copy private `.env` files or link another checkout's `.venv` or `node_modules`. Service work

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from converge-ai-labs/agent-foundation at commit 03de0fe, republished under its Apache-2.0 licence (© converge-ai-labs). 641 words, ~1,238 tokens.

Download SKILL.mdSave it as .claude/skills/worktree-pr/SKILL.md (or your agent's skills folder).
name
worktree-pr
description
Start a task in a Git worktree under .worktrees/ from freshly fetched origin/main, implement and validate it, then use commit-push-pr to open or update a PR. Use when the user requests worktree-based development or an isolated task-to-PR workflow; continue follow-ups in the same worktree.

Worktree to Pull Request

Own workspace preparation and continuity; commit-push-pr owns the Git/GitHub handoff. Follow AGENTS.md and CONTRIBUTING.md. Keep implementation with the current agent unless parallel work is requested.

A request to complete a task in a worktree and open a PR covers preparation, implementation, validation, commit, push, and PR creation. A workspace-only request stops after preparation. Preserve authorization across follow-ups; opening a PR does not authorize merging it.

Select and Create the Worktree

Inspect git status --short --branch, git remote -v, and git worktree list --porcelain. Identify the primary checkout and any existing worktree for this task. Keep its path and branch in the task context so follow-ups reuse it rather than starting over.

For a new task:

  1. Confirm origin is the intended repository and fetch it with git fetch origin. Use the updated origin/main, not local main or the current branch. If fetching fails, report the blocker rather than silently using a stale base.

  2. Choose a short descriptive branch and <primary>/.worktrees/<task-slug> path within the Environment's accessible files and shell scope. Keep all task worktrees under the primary checkout, even when starting from another worktree. If the branch or path already exists, inspect it and reuse it only when it belongs to this task; otherwise choose a distinct name.

  3. Ensure /.worktrees/ is ignored in the primary checkout. The repository's .gitignore owns this rule. For an older checkout without it, add the same rule to the common Git info/exclude without changing unrelated entries.

  4. Create the worktree and record its starting commit:

    bash
    git worktree add --no-track -b <branch> <primary>/.worktrees/<task-slug> origin/main
    git -C <primary>/.worktrees/<task-slug> rev-parse HEAD

Unrelated changes in the original checkout can stay in place. Do not stash, reset, or copy them into the new worktree. If this task depends on existing uncommitted work or commits outside origin/main, agree on how to carry them over before proceeding.

Work in the Selected Worktree

Use the selected worktree explicitly for file paths, command working directories, validation, and Git/GitHub operations. A shell cd does not change later tool calls. Read the checkout's applicable guidance before editing.

Implement the requested task and validate according to Local Validation. Prepare only the dependencies needed for the work; do not automatically copy private .env files or link another checkout's .venv or node_modules. Service work follows its development guide, including make dev-status for checkout-specific URLs and ports.

Show full SKILL.md (262 more words)Show less

Hand Off to commit-push-pr

Read and follow commit-push-pr in the same worktree. Carry forward the selected path, branch, starting commit, intended repository, PR base main, change scope, validation results, and authorized stages. Reuse valid checks rather than repeating them for handoff.

That skill owns staging, commit messages, push, PR content, and CI reporting. Do not duplicate those rules here or create another agent just to execute them.

Report the worktree path alongside the commit and PR result. Leave the worktree and branch available for follow-up changes; PR creation does not require cleanup or synchronization of the primary checkout.

After an Authorized Merge

When the user explicitly authorizes merging this PR, use gh and the repository's merge policy without bypassing required checks. Confirm that the PR is actually merged before synchronizing; queued or auto-merge-enabled is not merged.

As part of that authorized merge workflow, help bring the primary checkout up to date:

  1. Fetch origin and inspect the primary checkout's status and branch again. A clean checkout has no staged, unstaged, or untracked changes; ignored worktrees and local caches do not make it dirty.
  2. If it is clean and on main, fast-forward it with git -C <primary> merge --ff-only origin/main.
  3. If it is on another branch, confirm switching to main unless already authorized; do not merge origin/main into an unrelated task branch. If it is dirty or local main cannot fast-forward, preserve it and report what blocks synchronization rather than stashing, resetting, or rebasing it.

Report the merge and synchronization outcomes separately. Keep worktrees and branches unless their removal is requested.

© converge-ai-labs, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/worktree-pr of converge-ai-labs/agent-foundation.

Open the folder on GitHubat commit 03de0fe

Compare with similar skills

Worktree PR next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Worktree PR compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Worktree PR this skillconverge-ai-labs/agent-foundation171—~1.2kAutomated safety check: NotesApache-2.0
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Finishing A Development Branchfarm-fe/farm5.6k34 repos~1.8kAutomated safety check: PassMIT
Git Worktree Cleanuplobehub/lobehub83k—~2.8kAutomated safety check: PassCustom licence
Pre-Release PR Triagejamiepine/voicebox57k—~3.1kAutomated safety check: PassMIT
Ccmanager Configkbwo/ccmanager1.3k—~1.5kAutomated safety check: PassMIT

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • A skill your agent uses when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for…

    5.6k GitHub starsUsed in 34 repos~1.8k tokens
    DevelopmentAuto-check passed
  • Git Worktree Cleanup

    lobehub/lobehub

    Audits stale Git worktrees and branches with a bundled script, classifies each one, and deletes only after you approve the exact candidates.

    83k GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Pre-Release PR Triage

    jamiepine/voicebox

    Sorts a backlog of open pull requests into must-merge, candidate, superseded and deferred, writes a triage doc and works the merge loop before a release.

    57k GitHub stars~3.1k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Ccmanager Config

    kbwo/ccmanager

    Set up, review, or repair a CCManager config — .ccmanager.json at a git repository root, or the global ~/.config/ccmanager/config.json.

    1.3k GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Builds a Cap feature in an isolated Git worktree with disposable dev resources, verification, a recorded demo and a neutral pull request, started with /building.

    23k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check: warnings

More from converge-ai-labs/agent-foundation

  • Spec Writing

    converge-ai-labs/agent-foundation

    Author, review, or reorganize accepted technical contracts under spec/, including domain models, lifecycles, APIs, protocols, ownership, security, and compatibility.

    171 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Audit Repository Consistency

    converge-ai-labs/agent-foundation

    Audit a repository or revision range for spec-code gaps, inconsistent shared concepts, semantic duplication, and removable code.

    171 GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Commit Push PR

    converge-ai-labs/agent-foundation

    Prepare focused commits, push branches, and create or update GitHub pull requests when requested.

    171 GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Uiux Polish

    converge-ai-labs/agent-foundation

    Build and refine frontend pages and interactions with strong visual taste, proactive polish, and lightweight iteration.

    171 GitHub stars~580 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Worktree PR

What does Worktree PR do?

Start a task in a Git worktree under .worktrees/ from freshly fetched origin/main, implement and validate it, then use commit-push-pr to open or update a PR. Worktree PR is an agent skill from converge-ai-labs/agent-foundation.worktrees/ from freshly fetched origin/main, implement and validate it, then use commit-push-pr to open or update a PR.

When should I use Worktree PR?

Worktree PR fits situations like: the user requests worktree-based development; an isolated task-to-PR workflow; continue follow-ups in the same worktree.

How do I install Worktree PR in Claude Code?

Run `npx skills add converge-ai-labs/agent-foundation --skill worktree-pr -a claude-code`. Or copy the skill folder (.agents/skills/worktree-pr in converge-ai-labs/agent-foundation) into .claude/skills/worktree-pr in your project. Claude Code loads it when a task matches its description.

How do I install Worktree PR in Codex?

Run `npx skills add converge-ai-labs/agent-foundation --skill worktree-pr -a codex`. Or copy the skill folder (.agents/skills/worktree-pr in converge-ai-labs/agent-foundation) into .agents/skills/worktree-pr in your project. Codex loads it when a task matches its description.

Can I use Worktree PR in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add converge-ai-labs/agent-foundation --skill worktree-pr -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/worktree-pr, .gemini/skills/worktree-pr, .github/skills/worktree-pr and .opencode/skills/worktree-pr in your project.

What does Worktree PR need to run?

Going by SKILL.md and its folder, Worktree PR needs the command-line tools its instructions call (git and make).

Does Worktree PR access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Worktree PR safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Worktree PR use?

Worktree PR is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Worktree PR use?

About 1.2k tokens (SKILL.md is roughly 5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Worktree PR?

Skills that share tags, products or a category with Worktree PR: Finishing a Development Branch (obra/superpowers, 297k stars), Finishing A Development Branch (farm-fe/farm, 5.6k stars), Git Worktree Cleanup (lobehub/lobehub, 83k stars) and Pre-Release PR Triage (jamiepine/voicebox, 57k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Worktree PR?

converge-ai-labs (a GitHub organization) maintains it in converge-ai-labs/agent-foundation, which has 171 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 10, 2026.

Source: converge-ai-labs/agent-foundation on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.