Skip to content
cccskills
FreePublished on GitHubEnglish overview

setup-repo

Prepare a repository for parallel development with Git worktrees, separate folders for different branches. Create review and numbered work branches, copy environment files and branchlet configuration, and install dependencies for each workspace.

OriginalShow the original description

Initialize a worktree-based repo layout for parallel development. Creates a main worktree, a reviews worktree for PR reviews, and N numbered work branches. Handles .env creation, dependency installation, and branchlet config. TRIGGER when user asks to set up the repo from scratch, initialize worktrees, bootstrap their dev environment, "setup repo", "setup worktrees", "initialize dev environment", "set up branches", or when a freshly cloned repo has no sibling worktrees.

Run score Not tested

See how to install

Good for

  • Set up a freshly cloned repository
  • Prepare workspaces for parallel development
  • Create a dedicated workspace for PR reviews
  • Copy environment settings into each workspace

Overview

What it does

Uses Git worktrees to prepare separate folders for multiple branches of the same repository. Beside the existing main checkout, it creates a reviews workspace for PR reviews and as many numbered workspaces as you request, named branch1 through branchN. It also places environment files, copies .branchlet.json, and installs dependencies.

When it helps

Use it to prepare a development environment just after cloning a repository, or to keep several changes and PR reviews in separate folders. It checks for existing branches and workspace folders and skips creating ones that are already present.

Example requests

  • “Set up four work branches and a review workspace.”
  • “Initialize worktrees based on origin/dev.”

You choose the number of work branches and the base branch interactively. At the end, it reports how many workspaces were created, any missing environment files, and errors.

Notes

The procedure assumes the directory structure under autogpt_platform and uses Git, Poetry, and pnpm. Environment files created from templates may need editing. Installing dependencies takes time.

This overview was written by AI (OpenAI Codex) from the public SKILL.md. Check the original below for the exact behavior.

Document check

AI checked the SKILL.md for operations that need care and for setup requirements. The score comes only from actually running the skill (hands-on test).

SafetyAre sending data, deleting files, and running commands disclosed?
BPartly lackingIt copies environment files with cp but provides no confirmation before overwriting existing destination files.
Easy setupDoes it need few tools or API keys, and are they documented?
BPartly lackingGit, Poetry, pnpm, and a specific directory structure are required, but tool installation instructions are absent.

Not counted in the score. Rated by AI (OpenAI Codex) as of Oct 23, 2026. Treat it as a guide and read the original before installing.

Disagree? Request a re-evaluation

Tell us which point is wrong and why. No login needed. We will check it against the SKILL.md, redo the evaluation, and show the result here.

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

Files included (1)

  • SKILL.md6.2 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Repository Setup

This skill sets up a worktree-based development layout from a freshly cloned repo. It creates:

  • A main worktree (the primary checkout)
  • A reviews worktree (for PR reviews)
  • N work branches (branch1..branchN) for parallel development

Step 1: Identify the repo

Determine the repo root and parent directory:

ROOT=$(git rev-parse --show-toplevel)
REPO_NAME=$(basename "$ROOT")
PARENT=$(dirname "$ROOT")

Detect if the repo is already inside a worktree layout by counting sibling worktrees (not just checking the directory name, which could be anything):

# Count worktrees that are siblings (live under $PARENT but aren't $ROOT itself)
SIBLING_COUNT=$(git worktree list --porcelain 2>/dev/null | grep "^worktree " | grep -c "$PARENT/" || true)
if [ "$SIBLING_COUNT" -gt 1 ]; then
  echo "INFO: Existing worktree layout detected at $PARENT ($SIBLING_COUNT worktrees)"
  # Use $ROOT as-is; skip renaming/restructuring
else
  echo "INFO: Fresh clone detected, proceeding with setup"
fi

Step 2: Ask the user questions

Use AskUserQuestion to gather setup preferences:

  1. How many parallel work branches do you need? (Options: 4, 8, 16, or custom)
    • These become branch1 through branchN
  2. Which branch should be the base? (Options: origin/master, origin/dev, or custom)
    • All work branches and reviews will start from this

Step 3: Fetch and set up branches

cd "$ROOT"
git fetch origin

# Create the reviews branch from base (skip if already exists)
if git show-ref --verify --quiet refs/heads/reviews; then
  echo "INFO: Branch 'reviews' already exists, skipping"
else
  git branch reviews <base-branch>
fi

# Create numbered work branches from base (skip if already exists)
for i in $(seq 1 "$COUNT"); do
  if git show-ref --verify --quiet "refs/heads/branch$i"; then
    echo "INFO: Branch 'branch$i' already exists, skipping"
  else
    git branch "branch$i" <base-branch>
  fi
done

Step 4: Create worktrees

Create worktrees as siblings to the main checkout:

if [ -d "$PARENT/reviews" ]; then
  echo "INFO: Worktree '$PARENT/reviews' already exists, skipping"
else
  git worktree add "$PARENT/reviews" reviews
fi

for i in $(seq 1 "$COUNT"); do
  if [ -d "$PARENT/branch$i" ]; then
    echo "INFO: Worktree '$PARENT/branch$i' already exists, skipping"
  else
    git worktree add "$PARENT/branch$i" "branch$i"
  fi
done

Step 5: Set up environment files

Do NOT assume .env files exist. For each worktree (including main if needed):

  1. Check if .env exists in the source worktree for each path
  2. If .env exists, copy it
  3. If only .env.default or .env.example exists, copy that as .env
  4. If neither exists, warn the user and list which env files are missing

Env file locations to check (same as the /worktree skill — keep these in sync):

  • autogpt_platform/.env
  • autogpt_platform/backend/.env
  • autogpt_platform/frontend/.env

Note: This env copying logic intentionally mirrors the /worktree skill's approach. If you update the path list or fallback logic here, update /worktree as well.

SOURCE="$ROOT"
WORKTREES="reviews"
for i in $(seq 1 "$COUNT"); do WORKTREES="$WORKTREES branch$i"; done

FOUND_ANY_ENV=0
for wt in $WORKTREES; do
  TARGET="$PARENT/$wt"
  for envpath in autogpt_platform autogpt_platform/backend autogpt_platform/frontend; do
    if [ -f "$SOURCE/$envpath/.env" ]; then
      FOUND_ANY_ENV=1
      cp "$SOURCE/$envpath/.env" "$TARGET/$envpath/.env"
    elif [ -f "$SOURCE/$envpath/.env.default" ]; then
      FOUND_ANY_ENV=1
      cp "$SOURCE/$envpath/.env.default" "$TARGET/$envpath/.env"
      echo "NOTE: $wt/$envpath/.env was created from .env.default — you may need to edit it"
    elif [ -f "$SOURCE/$envpath/.env.example" ]; then
      FOUND_ANY_ENV=1
      cp "$SOURCE/$envpath/.env.example" "$TARGET/$envpath/.env"
      echo "NOTE: $wt/$envpath/.env was created from .env.example — you may need to edit it"
    else
      echo "WARNING: No .env, .env.default, or .env.example found at $SOURCE/$envpath/"
    fi
  done
done

if [ "$FOUND_ANY_ENV" -eq 0 ]; then
  echo "WARNING: No environment files or templates were found in the source worktree."
  # Use AskUserQuestion to confirm: "Continue setup without env files?"
  # If the user declines, stop here and let them set up .env files first.
fi

Step 6: Copy branchlet config

Copy .branchlet.json from main to each worktree so branchlet can manage sub-worktrees:

if [ -f "$ROOT/.branchlet.json" ]; then
  for wt in $WORKTREES; do
    cp "$ROOT/.branchlet.json" "$PARENT/$wt/.branchlet.json"
  done
fi

Step 7: Install dependencies

Install deps in all worktrees. Run these sequentially per worktree:

for wt in $WORKTREES; do
  TARGET="$PARENT/$wt"
  echo "=== Installing deps for $wt ==="
  (cd "$TARGET/autogpt_platform/autogpt_libs" && poetry install) &&
  (cd "$TARGET/autogpt_platform/backend" && poetry install && poetry run prisma generate) &&
  (cd "$TARGET/autogpt_platform/frontend" && pnpm install) &&
  echo "=== Done: $wt ===" ||
  echo "=== FAILED: $wt ==="
done

This is slow. Run in background if possible and notify when complete.

Step 8: Verify and report

After setup, verify and report to the user:

git worktree list

Summarize:

  • Number of worktrees created
  • Which env files were copied vs created from defaults vs missing
  • Any warnings or errors encountered

Final directory layout

parent/
  main/              # Primary checkout (already exists)
  reviews/           # PR review worktree
  branch1/           # Work branch 1
  branch2/           # Work branch 2
  ...
  branchN/           # Work branch N

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

open-pr

FreeSummary

Create a pull request that follows the project's template and title conventions. Check existing behavior and test coverage, document testing limits, and coordinate self-review or bot review with follow-up on reported issues.

  • Create a PR using the project's required template
  • Check regression tests and coverage for new behavior
  • Request bot review when local testing is limited
Significant-Gravitas/AutoGPT187.7KUpdated Oct 23, 2026

orchestrate

FreeSummary

Coordinate multiple Claude Code agents in separate Git worktrees and tmux windows. Assign tasks, inspect progress, help stalled agents resume, and verify PR checks and review feedback before treating work as complete.

  • Assign separate development tasks to multiple agents
  • Check agent progress and available worktrees
  • Help stalled or crashed agent sessions resume
Significant-Gravitas/AutoGPT187.7KUpdated Oct 23, 2026

perf-compare

FreeSummary

Compare performance across releases, environments, or time windows using Sentry data. Report request counts, latency percentiles, and failure rates, with statistical checks that distinguish faster or slower behavior from noise and flag insufficient data.

  • Compare performance before and after a release
  • Compare a preview deployment with a control
  • Check other operations for performance regressions
Significant-Gravitas/AutoGPT187.7KUpdated Oct 23, 2026

pr-address

FreeSummary

Work through PR review feedback by fixing code, pushing commits, replying to reviewers, and resolving addressed threads. Monitor automated checks, merge conflicts, and new comments until checks pass and the review work is complete.

  • Fix code based on PR review feedback
  • Reply to human and bot reviewers
  • Investigate failed CI checks after a push
Significant-Gravitas/AutoGPT187.7KUpdated Oct 23, 2026

pr-polish

FreeSummary

Prepare a pull request for merging by repeatedly reviewing changes and addressing feedback. Verify resolved discussions, passing automated checks, and mergeability, then check twice for late comments after the checks finish.

  • Preparing a pull request for merging
  • Repeating review and fixes until no new issues remain
  • Following up on delayed review bot feedback
Significant-Gravitas/AutoGPT187.7KUpdated Oct 23, 2026

pr-review

FreeSummary

Review a pull request, a proposed code change, for correctness, security, design, and test coverage. Check its explanation and existing feedback, then post findings on relevant code lines with severity labels.

  • Checking a pull request before merging
  • Reviewing security risks in code changes
  • Finding missing edge-case tests
Significant-Gravitas/AutoGPT187.7KUpdated Oct 23, 2026

See all skills by Significant-Gravitas

Report a problem with this skill