Finishing a Development Branch
obra/superpowers
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.
Create an isolated git worktree + branch + port for this session so concurrent kube-coder sessions and builds don't conflict.
$ npx skills add imran31415/kube-coder --skill worktree -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install imran31415/kube-coder worktree --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/imran31415/kube-coder.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/worktree .claude/skills/worktree && rm -rf skills-srcUse ~/.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/
Install the "worktree" agent skill from https://github.com/imran31415/kube-coder/tree/main/.claude/skills/worktree into .claude/skills/worktree/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "worktree", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/imran31415/kube-coder/tree/main/.claude/skills/worktreeType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add imran31415/kube-coder --skill worktree -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install imran31415/kube-coder worktree --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/imran31415/kube-coder.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/worktree .agents/skills/worktree && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "worktree" agent skill from https://github.com/imran31415/kube-coder/tree/main/.claude/skills/worktree into .agents/skills/worktree/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "worktree", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add imran31415/kube-coder --skill worktree -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install imran31415/kube-coder worktree --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/imran31415/kube-coder.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/worktree .cursor/skills/worktree && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "worktree" agent skill from https://github.com/imran31415/kube-coder/tree/main/.claude/skills/worktree into .cursor/skills/worktree/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "worktree", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/imran31415/kube-coder.git --path .claude/skills/worktree--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add imran31415/kube-coder --skill worktree -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install imran31415/kube-coder worktree --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/imran31415/kube-coder.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/worktree .gemini/skills/worktree && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "worktree" agent skill from https://github.com/imran31415/kube-coder/tree/main/.claude/skills/worktree into .gemini/skills/worktree/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "worktree", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install imran31415/kube-coder worktreeInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add imran31415/kube-coder --skill worktree -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/imran31415/kube-coder.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/worktree .github/skills/worktree && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "worktree" agent skill from https://github.com/imran31415/kube-coder/tree/main/.claude/skills/worktree into .github/skills/worktree/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "worktree", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add imran31415/kube-coder --skill worktree -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install imran31415/kube-coder worktree --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/imran31415/kube-coder.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/worktree .opencode/skills/worktree && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "worktree" agent skill from https://github.com/imran31415/kube-coder/tree/main/.claude/skills/worktree into .opencode/skills/worktree/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "worktree", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
worktreeCreate an isolated git worktree + branch + port for this session so concurrent kube-coder sessions and builds don't conflict.
Worktree is an agent skill from imran31415/kube-coder. Create an isolated git worktree + branch + port for this session so concurrent kube-coder sessions and builds don't conflict. Use at the START of any change you want isolated, when two sessions touch the same repo, or before running a dev server/build that would collide on ports or output dirs. Also lists and tears down worktrees.
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 `worktree.sh`).
It sits in Development, covering Git worktrees. It works with Git. The repository describes itself as: helm chart for a isolated dev coding environment pod in kubernetes. The licence is MIT.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit f5da764. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
BashReadFrom allowed-tools in the SKILL.md frontmatter.
Ships script files (Shell), which the agent can run.
Shell commands in SKILL.md call:
bashgitjqnpmpython3From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git and npm, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Worktree loads about 1.6k tokens when it runs. Until then it costs about 85 tokens; SKILL.md has 751 words of instructions outside code blocks.
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.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
allowed-tools: Bash, ReadAutomated 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.
The full file from imran31415/kube-coder at commit f5da764, republished under its MIT licence (© imran31415). 751 words, ~1,630 tokens.
.claude/skills/worktree/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.kube-coder isolates sessions at the terminal level (each task gets its own
tmux session + ~/.claude-tasks/<id>/) but everything still runs in the same
/home/dev filesystem. So two sessions on the same repo collide three ways:
./dist, ./build; Kaniko reads its context from the shared pathEADDRINUSE on :3000 (ports are per-pod, not per-session)This skill fixes all three for the current session with no infra change: it
gives you a dedicated git worktree (own checkout + branch) at a path outside
the repo, and leases a free port for any server you start. Worktrees share the
main clone's object store, so they're cheap on disk — only working files are
duplicated.
The helper is worktree.sh next to this file. Invoke it as
bash "$CLAUDE_SKILL_DIR/worktree.sh" … (or with its absolute path under
/home/dev/kube-coder/.claude/skills/worktree/).
Run from inside the repo you want to work on (cd there first). $ARGUMENTS
is an optional human slug; if omitted it derives one from the current task id
(KC_TASK_ID) or a random token, so it's always unique.
WT=/home/dev/kube-coder/.claude/skills/worktree/worktree.sh
eval "$(bash "$WT" new "$ARGUMENTS")" # creates worktree+branch+port, sets KC_WT / PORT
cd "$KC_WT" # <-- this cd PERSISTS across your Bash callsAfter this, do all work for the change from $KC_WT. The human summary
(path / branch / port / preview URL) is printed to stderr — note the port,
because exported env vars do not survive between separate Bash tool calls (the
cd does). The worktree also records everything in $KC_WT/.kc-worktree.json,
so you can re-read the port later:
jq -r .port "$KC_WT/.kc-worktree.json" # or read .branch / .path/home/dev/.worktrees/<repo>/<slug>/kc/<slug> (branched from current HEAD, or a base-ref: new <slug> <base>)new with a slug that already exists reuses that worktree (same path,
branch and port) instead of failingBind the leased port explicitly (env doesn't persist between calls), then open it through the app-proxy — no port config in the dashboard needed:
PORT=$(jq -r .port "$KC_WT/.kc-worktree.json")
cd "$KC_WT" && PORT=$PORT npm run dev # or: python -m http.server "$PORT", etc.
# preview at: /api/app-proxy/<port>/Because the worktree is its own path, docker-build (Kaniko) and local build
output (./dist, ./build) no longer collide with other sessions. Run builds
with the worktree as context — e.g. docker-build -t img:tag "$KC_WT".
bash "$WT" list # worktrees + leased ports for the current repo
bash "$WT" rm <slug> # remove the worktree DIR; the branch is KEPT
bash "$WT" rm <slug> --force # also drop uncommitted changes in itrm deliberately keeps kc/<slug> — that branch is your change. Push/PR it as
usual, then delete with the git branch -D line rm prints. rm refuses to
delete a dirty worktree unless you pass --force.
cd persists, env does not. In this harness the working directory
survives between Bash calls but exported vars don't. Rely on cd "$KC_WT"
and re-read the port from .kc-worktree.json when you need it; don't assume
$PORT is still set in a later call..git, but a fresh node_modules / .venv /
build tree per worktree is not shared and can fill the 20–50Gi PVC. Keep a
handful live at once; rm ones you're done with..git/worktrees. Don't rm -rf a worktree dir by hand — use rm (which runs
git worktree remove + prune) so git's bookkeeping stays consistent.start.sh does
git pull --ff-only origin main on /home/dev/kube-coder at boot. Working in
a kc/<slug> worktree keeps main clean so that pull still fast-forwards —
which is the point. Don't check out main inside a worktree.A Build can now be launched isolated without this skill: the New Build
form's Isolated worktree toggle, a Board run's Isolated worktree per item,
create_task(isolate=true) from the dashboard MCP, and spawn_agent(isolate= true) for sub-agents. All of them — and this script — share one
implementation, charts/workspace/worktrees.py (in the pod at
/tmp/browser/worktrees.py): the same /home/dev/.worktrees/<repo>/<slug>
layout, the same .kc-worktree.json manifest, the same port lease and the same
lock. So a worktree made here shows up in Settings → Worktrees, counts
toward KC_MAX_WORKTREES, and its port is never handed out twice.
When /tmp/browser/worktrees.py is present this script delegates to it
(override with KC_WORKTREES_PY); otherwise it falls back to its own bash
implementation, which takes the same flock and writes the same manifest.
A worktree you make by hand has no owning Build, so the dashboard's cleanup
sweep only removes it once it is pristine (nothing committed, nothing dirty)
and older than KC_WORKTREE_GC_DAYS (7). Anything with work in it is yours
to remove.
Sanity-check the helper before relying on it:
bash -n /home/dev/kube-coder/.claude/skills/worktree/worktree.sh
python3 /tmp/browser/worktrees.py --api-version© imran31415, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in .claude/skills/worktree of imran31415/kube-coder.
Open the folder on GitHubat commit f5da764
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Worktree this skillimran31415/kube-coder | 388 | — | ~1.6k | Automated safety check: Notes | MIT | |
| Finishing a Development Branchobra/superpowers | 296k | 5 repos | ~1.9k | Automated safety check: Pass | MIT | |
| Finishing A Development Branchfarm-fe/farm | 5.6k | 33 repos | ~1.8k | Automated safety check: Pass | MIT | |
| Git Worktree Cleanuplobehub/lobehub | 83k | — | ~2.8k | Automated safety check: Pass | Custom licence | |
| Pre-Release PR Triagejamiepine/voicebox | 57k | — | ~3.1k | Automated safety check: Pass | MIT | |
| Ccmanager Configkbwo/ccmanager | 1.3k | — | ~1.5k | Automated safety check: Pass | MIT |
obra/superpowers
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.
farm-fe/farm
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…
lobehub/lobehub
Audits stale Git worktrees and branches with a bundled script, classifies each one, and deletes only after you approve the exact candidates.
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.
kbwo/ccmanager
Set up, review, or repair a CCManager config — .ccmanager.json at a git repository root, or the global ~/.config/ccmanager/config.json.
CapSoftware/Cap
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.
imran31415/kube-coder
Safely edit the workspace pod's boot scripts (start.sh, the entrypoint/ssh-server configmaps) in kube-coder.
imran31415/kube-coder
Spin up an isolated agent to work a GitHub issue of kube-coder or any other repo checked out in the workspace.
imran31415/kube-coder
Capture desktop + mobile, dark + light screenshots of the kube-coder dashboard SPA for visual QA of a UI change.
imran31415/kube-coder
Commit local changes and open a pull request against kube-coder from inside a workspace pod.
imran31415/kube-coder
Launch a Claude task on a remote kube-coder workspace, check task status, or attach to a running session.
imran31415/kube-coder
Run kube-coder's full CI suite locally before pushing — helm lint + unit tests, server.py tests, dashboard + controller SPA builds + vitest, and shell syntax checks.
Works with
Categories
Create an isolated git worktree + branch + port for this session so concurrent kube-coder sessions and builds don't conflict. Worktree is an agent skill from imran31415/kube-coder. Create an isolated git worktree + branch + port for this session so concurrent kube-coder sessions and builds don't conflict.
Worktree fits situations like: tasks that involve Git worktrees.
Run `npx skills add imran31415/kube-coder --skill worktree -a claude-code`. Or copy the skill folder (.claude/skills/worktree in imran31415/kube-coder) into .claude/skills/worktree in your project. Claude Code loads it when a task matches its description.
Run `npx skills add imran31415/kube-coder --skill worktree -a codex`. Or copy the skill folder (.claude/skills/worktree in imran31415/kube-coder) into .agents/skills/worktree in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add imran31415/kube-coder --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.
Going by SKILL.md and its folder, Worktree needs a shell for the scripts in its folder and the command-line tools its instructions call (bash, git, jq, npm and python3). Our summary lists: Python 3; A Bash shell; Docker. Its frontmatter pre-approves these tools: Bash, Read.
SKILL.md contains no URLs. Its commands use git and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Worktree is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.6k tokens (SKILL.md is roughly 6.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Worktree: Finishing a Development Branch (obra/superpowers, 296k 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.
imran31415 (a GitHub user) maintains it in imran31415/kube-coder, which has 388 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 3, 2026.
Source: imran31415/kube-coder on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.