Skip to content
Back to skills

Cast Worktree

ASecurity

Move this work into an isolated worktree with its own env files, ports and setup, so it cannot collide with other sessions in the shared checkout. Use before parallel work, before a risky change, when another session is editing the same files, or when asked to work in a worktree.

  • 34 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 23, 2026
ai-agentsshellbashgit

Security analysis

A100/100

Scanned September 23, 2026

npx -y skills add codecast-sh/codecast --skill cast-worktree --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cast Worktree?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cast Worktree
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/codecast-sh-cast-worktree/badge)](https://www.skillsdirectory.com/skills/codecast-sh-cast-worktree)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cast-worktree
description: Move this work into an isolated worktree with its own env files, ports and setup, so it cannot collide with other sessions in the shared checkout. Use before parallel work, before a risky change, when another session is editing the same files, or when asked to work in a worktree.
argument-hint: "<name> [destroy]"
---

Two sessions in one checkout race on the index and on every shared file.
A worktree gives each its own tree; codecast's version also copies the
gitignored env files, runs the project's setup, and allocates ports so two
dev servers do not fight.

```bash
cast ws acquire <name>              # create or attach; prints the path
cd "$(cast ws path <name>)"         # a binary cannot cd the shell, so this is explicit
cast ws status <name>               # ports, env, contract checks
```

Use a name that says what the work is (`fix-auth-race`, a task id). If the
repository has no `.codecast/workspace.toml`, run `cast ws init` once from
the root so ports and setup are detected.

Work there. Before landing: `git fetch origin main && git rebase
origin/main` in the worktree, resolve, then commit on its branch. Return
with `cd "$(git worktree list | head -1 | awk '{print $1}')"`.

With `destroy`: `cast ws destroy <name>` once the branch is merged. Never
destroy a worktree with uncommitted work in it; `git -C "$(cast ws path
<name>)" status -sb` first.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.