Official agent skill

Worktree

by microsoft in microsoft/service-fabric-dotnet

Create, reuse or clean up a dedicated git worktree for working on a pull request or a private branch.

OfficialCustom licenceAuto-check passedDevelopment

Install Worktree

skills CLI
$ npx skills add microsoft/service-fabric-dotnet --skill worktree -a claude-code

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

GitHub CLI
$ gh skill install microsoft/service-fabric-dotnet worktree --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/microsoft/service-fabric-dotnet.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/worktree .claude/skills/worktree && 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
GitHub stars
277
Token cost
~334 tokens
SKILL.md length
47 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
Custom licence

At a glance

Create, reuse or clean up a dedicated git worktree for working on a pull request or a private branch.

  • Tasks that involve Git worktrees
  • SKILL.md covers Set Up and Tear Down
  • Calls git and gh
  • Tasks that involve Pull requests

What it does

Worktree is an agent skill from microsoft/service-fabric-dotnet, published by the product's own GitHub organization. Create, reuse or clean up a dedicated git worktree for working on a pull request or a private branch. Use from any PR-scoped workflow that needs an isolated checkout to keep current code and build output untouched.

Its SKILL.md is about 330 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 and Pull requests. It works with Git. The repository describes itself as: Service Fabric .NET Libraries.

When your agent uses it

  • Tasks that involve Git worktrees
  • Tasks that involve Pull requests

Example prompts

  • “/worktree”

What it can do on your machine

Read from SKILL.md and the folder at commit 4c8ce57. 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
    • gh

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

  • Network

    No URLs in SKILL.md. Its commands use git and gh, 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 loads about 334 tokens when it runs. Until then it costs about 56 tokens; SKILL.md has 47 words of instructions outside code blocks.

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

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 passed

The automated check found no risky patterns in SKILL.md.

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

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 47 words (~334 tokens).

“Reuse the existing worktree if present, otherwise create one. Run subsequent steps from the worktree directory.”

— opening of SKILL.md by microsoft, Custom licence
name
worktree
argument-hint
PR #N

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .github/skills/worktree of microsoft/service-fabric-dotnet.

Open the folder on GitHubat commit 4c8ce57

Compare with similar skills

Worktree 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 compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Worktree this skillmicrosoft/service-fabric-dotnet277—~334Automated safety check: PassCustom licence
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Pre-Release PR Triagejamiepine/voicebox57k—~3.1kAutomated safety check: PassMIT
Cap Feature Building WorkflowCapSoftware/Cap23k—~2.5kAutomated safety check: WarnCustom licence
Clean Complete Branchesjtenniswood/espcontrol1.1k—~820Automated safety check: PassCustom licence
BackportDependencyTrack/frontend172—~1.9kAutomated safety check: NotesApache-2.0

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.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    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 yesterday
    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
  • Clean Complete Branches

    jtenniswood/espcontrol

    Clean up completed Git branches and worktrees for this repository both locally and on GitHub.

    1.1k GitHub stars~820 tokensUpdated today
    DevelopmentAuto-check passed
  • Backport

    DependencyTrack/frontend

    Backports a merged pull request from main onto a patch-release branch, e.g.

    172 GitHub stars~1.9k tokensUpdated 2 days ago
    DevelopmentAuto-check: notes
  • Swamp

    swamp-club/swamp

    Swamp CLI — create and run models, build and validate workflows, query and manage data, store and retrieve vault secrets, develop and publish extensions, initialize repos, run reports, file issues…

    644 GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed

More from microsoft/service-fabric-dotnet

  • Nuget

    microsoft/service-fabric-dotnet

    Official

    Upgrade, add, remove, or review NuGet package references and dependencies in this repo.

    277 GitHub stars~2.6k tokensUpdated 14 days ago
    Auto-check passed
  • PR Review

    microsoft/service-fabric-dotnet

    Official

    Review a pull request for correctness, approach, completeness, and consistency with instructions in this repo.

    277 GitHub stars~1.8k tokensUpdated 14 days ago
    Auto-check passed
  • Review

    microsoft/service-fabric-dotnet

    Official

    Review code for correctness, approach, completeness, and consistency with instructions in this repo.

    277 GitHub stars~980 tokensUpdated 14 days ago
    Auto-check passed

Works with

Categories

Questions about Worktree

What does Worktree do?

Create, reuse or clean up a dedicated git worktree for working on a pull request or a private branch. Worktree is an agent skill from microsoft/service-fabric-dotnet, published by the product's own GitHub organization. Create, reuse or clean up a dedicated git worktree for working on a pull request or a private branch.

When should I use Worktree?

Worktree fits situations like: tasks that involve Git worktrees; tasks that involve Pull requests.

How do I install Worktree in Claude Code?

Run `npx skills add microsoft/service-fabric-dotnet --skill worktree -a claude-code`. Or copy the skill folder (.github/skills/worktree in microsoft/service-fabric-dotnet) into .claude/skills/worktree in your project. Claude Code loads it when a task matches its description.

How do I install Worktree in Codex?

Run `npx skills add microsoft/service-fabric-dotnet --skill worktree -a codex`. Or copy the skill folder (.github/skills/worktree in microsoft/service-fabric-dotnet) into .agents/skills/worktree in your project. Codex loads it when a task matches its description.

Can I use Worktree 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 microsoft/service-fabric-dotnet --skill worktree -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, .gemini/skills/worktree, .github/skills/worktree and .opencode/skills/worktree in your project.

What does Worktree need to run?

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

Does Worktree access the network?

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

Is Worktree safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Worktree use?

Worktree has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Worktree use?

About 334 tokens (SKILL.md is roughly 1.3k 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?

Skills that share tags, products or a category with Worktree: Finishing a Development Branch (obra/superpowers, 296k stars), Pre-Release PR Triage (jamiepine/voicebox, 57k stars), Cap Feature Building Workflow (CapSoftware/Cap, 23k stars) and Clean Complete Branches (jtenniswood/espcontrol, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Worktree?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/service-fabric-dotnet, which has 277 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on September 23, 2026.

Source: microsoft/service-fabric-dotnet on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.