worktree-setup
Original:🇺🇸 English
Translated
Set up a new git worktree for parallel development. Creates the worktree, copies .env files, installs dependencies, generates Prisma client, and optionally starts the app (with port conflict resolution) or runs tests. TRIGGER when user asks to set up a worktree, work on a branch in isolation, or needs a separate environment for a branch or PR.
2installs
Added on
NPX Install
npx skill4agent add significant-gravitas/autogpt worktree-setupTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Worktree Setup
Preferred: Use Branchlet
The repo has a config — it handles env file copying, dependency installation, and Prisma generation automatically.
.branchlet.jsonbash
npm install -g branchlet # install once
branchlet create -n <name> -s <source-branch> -b <new-branch>
branchlet list --json # list all worktreesManual Fallback
If branchlet isn't available:
git worktree add ../<RepoName><N> <branch-name>- Copy files:
.env,backend/.env,frontend/.env,autogpt_platform/.envdb/docker/.env - Install deps:
cd autogpt_platform/backend && poetry install && poetry run prisma generatecd autogpt_platform/frontend && pnpm install
Running the App
Free ports first — backend uses: 8001, 8002, 8003, 8005, 8006, 8007, 8008.
bash
for port in 8001 8002 8003 8005 8006 8007 8008; do
lsof -ti :$port | xargs kill -9 2>/dev/null || true
done
cd <worktree>/autogpt_platform/backend && poetry run appCoPilot Testing Gotcha
SDK mode spawns a Claude subprocess — won't work inside Claude Code. Set in to use baseline mode.
CHAT_USE_CLAUDE_AGENT_SDK=falsebackend/.env