Agent skill

Wt Switch Create

by goern in goern/forgejo-mcp

Create a new worktrunk worktree (optionally in another repo) and switch this session's working directory into it.

MITAuto-check passedDevelopment

Install Wt Switch Create

skills CLI
$ npx skills add goern/forgejo-mcp --skill wt-switch-create -a claude-code

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

GitHub CLI
$ gh skill install goern/forgejo-mcp wt-switch-create --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/goern/forgejo-mcp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/wt-switch-create .claude/skills/wt-switch-create && 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
wt-switch-create
GitHub stars
140
Used in
1 other repo
Token cost
~1.6k tokens
SKILL.md length
872 words
Files
2
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

Create a new worktrunk worktree (optionally in another repo) and switch this session's working directory into it.

  • Works in 3 steps: Pick the branch name if none was given:… → With no repo argument, create and enter… → Otherwise create it with wt and enter by…
  • Launching a session that should work in its own worktree
  • SKILL.md covers What to do, Cleanup and Scope
  • Calls git

What it does

Wt Switch Create is an agent skill from goern/forgejo-mcp. Create a new worktrunk worktree (optionally in another repo) and switch this session's working directory into it. Use when launching a session that should work in its own worktree.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `rationale.md`). Compatibility notes: Requires the wt CLI (https://worktrunk.dev)

It sits in Development, covering Git worktrees. The repository describes itself as: MIRROR ONLY!! This Model Context Protocol (MCP) server provides tools and resources for interacting with the Forgejo (specifically Codeberg.org) REST API. The licence is MIT.

When your agent uses it

  • Launching a session that should work in its own worktree
  • Tasks that involve Git worktrees

Example prompts

  • “/wt-switch-create”

Requirements

  • Compatibility (from SKILL.md): Requires the `wt` CLI (https://worktrunk.dev)

Workflow steps

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

  1. Pick the branch name if none was given: short, from the task and
  2. With no repo argument, create and enter in one call
  3. Otherwise create it with wt and enter by path. Two cases reach here: a

What it can do on your machine

Read from SKILL.md and the folder at commit 64a14bc. 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

    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.

  • Compatibility

    Requires the `wt` CLI (https://worktrunk.dev)

    From compatibility in the SKILL.md frontmatter.

Context cost

Wt Switch Create loads about 1.6k tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 872 words of instructions outside code blocks.

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

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

The full file from goern/forgejo-mcp at commit 64a14bc, republished under its MIT licence (© goern). 872 words, ~1,605 tokens.

Download SKILL.mdSave it as .claude/skills/wt-switch-create/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
wt-switch-create
description
Create a new worktrunk worktree (optionally in another repo) and switch this session's working directory into it. Use when launching a session that should work in its own worktree.
compatibility
Requires the `wt` CLI (https://worktrunk.dev)
argument-hint
[<branch>] [<repo>] [-- <task>]
license
MIT OR Apache-2.0

Arguments: $ARGUMENTS. Grammar: [<branch>] [<repo>] [-- <task>].

  • branch — optional; the branch name for the new worktree. When omitted, pick one (step 1 below).
  • repo — optional path; create the worktree in this repo instead of the session's current one.
  • task — optional; what to do inside the new worktree. No task means enter the worktree and wait.

Tokens before the -- are the branch and/or repo: a path-shaped token (starting with /, ~, ./, or ../) is the repo; any other token is the branch (docs is a branch name, never the docs/ directory). More than one branch-shaped token before a -- doesn't fit the grammar — ask. Without a --, judge where the task starts: leading tokens that read as a branch name (fix-auth) or a repo path are consumed as such, and the rest is the task; otherwise the whole input is the task (fix the parser bug has no branch-shaped lead — all task).

/wt-switch-create my-feature -- fix the parser bug
/wt-switch-create -- fix the parser bug
/wt-switch-create my-feature ~/workspace/other-repo -- fix the parser bug
/wt-switch-create my-feature

What to do

Creating the worktree comes first on every invocation, before any other work. The invocation is itself the explicit request to create it; a research or read-only task gets one all the same.

<!-- Maintainers: rationale.md (same directory) covers the harness rules and
design choices behind this — read it before re-adding guards or routes. -->
  1. Pick the branch name if none was given: short, from the task and consistent with existing worktree names, or, mid-session, from the work being moved; with nothing to derive from, ask.

  2. With no repo argument, create and enter in one call: EnterWorktree({name: "<branch>"}). Worktrunk's WorktreeCreate hook runs wt switch --create, so the result is an ordinary wt worktree in the default layout, and the user sees no confirmation prompt. On success, do the task (or, with no task text, confirm it's ready and wait).

    Mid-session, carry uncommitted work across: git stash push -u before the EnterWorktree call, then git stash pop after — the call re-roots the session into the new worktree, and the stash is shared across worktrees.

  3. Otherwise create it with wt and enter by path. Two cases reach here: a repo argument, which step 2 can't target, and a failed step 2, whose error says which — ✗ Branch <branch> already exists, or Already in a worktree session. Create with a Bash call (omit -C <repo> for this repo):

    wt -C <repo> switch --create <branch> --no-cd --format=json

    Stdout is JSON whose path field is the worktree's absolute path (status lines go to stderr). On Branch <branch> already exists: if the user named the branch, rerun without --create (it enters the branch, creating its worktree if missing); if step 1 picked the name, pick another and rerun. Any other failure (not a git repo, invalid name): report it and stop.

    Then call EnterWorktree({path: "<path from the JSON>"}).

    • Accepted → the session is re-rooted in the worktree. Do the task (or, with no task text, confirm it's ready and wait).
    • Tool error — the tool ran and returned an error (Cannot enter worktree: …) → graceful; nothing moved, and one recovery covers them all. Common causes: the cwd resolves to no git repo (e.g. a non-git parent like ~/workspace that only holds repos, as in a background job) or to a different repo than the target; or the session is already rooted in a worktree (or is a pinned agent), which limits entry to the current repo's .claude/worktrees/ and excludes even a same-repo wt sibling. The recovery test is whether you can cd into the worktree, which works when it's inside an allowed directory. So cd <path> and read the result:
      • no Shell cwd was reset notice → it stuck; the worktree is reachable. Work there, but a bare cd is not a tracked re-root, so the cwd can revert to the session's launch worktree across turns (and in spawned subagents); pin commands with git -C <path> / wt -C <path> rather than trusting the cd to persist.
      • Shell cwd was reset → not reachable. Stop and ask the user to make it reachable: add the repo, or a parent like ~/workspace, to permissions.additionalDirectories (durable, every session), or run /add-dir <path> (this session). Then continue. Don't grind through absolute paths with cd resetting on every command.
    • Denied — the call itself was refused, with no tool error → however the denial is worded, it is the user's answer to the confirmation Claude Code shows for entering a worktree outside .claude/worktrees/, unless there was no user to ask (the denial says the session couldn't prompt), which decides nothing — take the recovery above. On the user's answer: the worktree wt just created still exists; only the entry didn't happen. Report its path and ask how to proceed, since reaching it through cd would override that answer.
Show full SKILL.md (134 more words)Show less

Cleanup

The worktree is a normal worktrunk worktree: it shows up in wt list and is merged or removed with wt merge / wt remove <branch> like any other. Don't remove it unprompted.

A worktree from step 2 that the session never touched — no changed files, no commits — is cleaned up when the session ends, branch included; anything written into it keeps it. A worktree from step 3 always stays. If the user asks to leave mid-session, ExitWorktree({action: "keep"}) returns the session to its original directory; ExitWorktree cannot remove a worktree entered by path, so removing one of those is always wt remove <branch>.

Scope

The command's mandate is ONE worktree (in the named repo, if one was given) and the requested task inside it. Commits, pushes, and merges still each require explicit user permission.

© goern, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .agents/skills/wt-switch-create of goern/forgejo-mcp.

  • SKILL.md
  • rationale.md

Open the folder on GitHubat commit 64a14bc

Used in 1 other repository

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in goern/forgejo-mcp, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Wt Switch Create 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.

Wt Switch Create compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Wt Switch Create this skillgoern/forgejo-mcp1401 repos~1.6kAutomated safety check: PassMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Migrate Core Code to Submodulestinyhumansai/openhuman41k—~2.6kAutomated safety check: PassGPL-3.0
Finishing A Development Branchfarm-fe/farm5.6k33 repos~1.8kAutomated safety check: PassMIT
Git Worktree Cleanuplobehub/lobehub83k—~2.8kAutomated safety check: PassCustom licence
Keep Codex Fastvibeforge1111/keep-codex-fast1.6k—~3.1kAutomated 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.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    41k GitHub stars~2.6k tokensUpdated today
    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 33 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
  • Keep Codex Fast

    vibeforge1111/keep-codex-fast

    A skill your agent uses when Codex feels slow or bloated, when local sessions/logs/worktrees/config have grown over time, or when a user wants safe maintenance for Codex Desktop/CLI state.

    1.6k GitHub stars~3.1k tokensUpdated 5 mo ago
    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 today
    DevelopmentAuto-check passed

More from goern/forgejo-mcp

All 15 skills in this repo
  • Release Openspec

    goern/forgejo-mcp

    A skill your agent uses when releasing OpenSpec: audit merged work and changeset coverage, decide whether a catch-up changeset PR is needed, prepare or resume the Changesets Version Packages PR, cut…

    140 GitHub starsUsed in 1 repo~3.2k tokens
    Auto-check passed
  • Unified Notifications

    goern/forgejo-mcp

    Fetch and display notifications from both GitHub and Codeberg in a unified markdown view with clickable links.

    140 GitHub stars~802 tokensUpdated yesterday
    Auto-check passed
  • Caveman Compress

    goern/forgejo-mcp

    Compress a memory file such as CLAUDE.md or a todo list into caveman format to save input tokens, keeping a readable backup.

    140 GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check: notes
  • Draft Openspec Docs

    goern/forgejo-mcp

    Collaborative page-drafting mode for the OpenSpec docs. An agent skill from goern/forgejo-mcp.

    140 GitHub starsUsed in 1 repo~815 tokens
    Auto-check passed
  • Verify Openspec Docs

    goern/forgejo-mcp

    Fact-checks OpenSpec user documentation with a fresh-context subagent that re-runs commands and checks claims against source.

    140 GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Caveman Help

    goern/forgejo-mcp

    Quick-reference card for caveman modes, skills and commands.

    140 GitHub stars~564 tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Wt Switch Create

What does Wt Switch Create do?

Create a new worktrunk worktree (optionally in another repo) and switch this session's working directory into it. Wt Switch Create is an agent skill from goern/forgejo-mcp. Create a new worktrunk worktree (optionally in another repo) and switch this session's working directory into it.

When should I use Wt Switch Create?

Wt Switch Create fits situations like: launching a session that should work in its own worktree; tasks that involve Git worktrees.

How do I install Wt Switch Create in Claude Code?

Run `npx skills add goern/forgejo-mcp --skill wt-switch-create -a claude-code`. Or copy the skill folder (.agents/skills/wt-switch-create in goern/forgejo-mcp) into .claude/skills/wt-switch-create in your project. Claude Code loads it when a task matches its description.

How do I install Wt Switch Create in Codex?

Run `npx skills add goern/forgejo-mcp --skill wt-switch-create -a codex`. Or copy the skill folder (.agents/skills/wt-switch-create in goern/forgejo-mcp) into .agents/skills/wt-switch-create in your project. Codex loads it when a task matches its description.

Can I use Wt Switch Create 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 goern/forgejo-mcp --skill wt-switch-create -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/wt-switch-create, .gemini/skills/wt-switch-create, .github/skills/wt-switch-create and .opencode/skills/wt-switch-create in your project.

What does Wt Switch Create need to run?

Going by SKILL.md and its folder, Wt Switch Create needs the command-line tools its instructions call (git). Compatibility (from SKILL.md): Requires the `wt` CLI (https://worktrunk.dev).

Does Wt Switch Create 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 Wt Switch Create 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 Wt Switch Create use?

Wt Switch Create is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Wt Switch Create use?

About 1.6k tokens (SKILL.md is roughly 6.4k 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 Wt Switch Create?

Skills that share tags, products or a category with Wt Switch Create: Finishing a Development Branch (obra/superpowers, 296k stars), Migrate Core Code to Submodules (tinyhumansai/openhuman, 41k stars), Finishing A Development Branch (farm-fe/farm, 5.6k stars) and Git Worktree Cleanup (lobehub/lobehub, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Wt Switch Create?

goern (a GitHub user) maintains it in goern/forgejo-mcp, which has 140 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 6, 2026.

Source: goern/forgejo-mcp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.