Skip to content
cccskills
FreePublished on GitHub

move-to-worktree

After /start-task: park the current clean, pushed feature branch in its own issue-numbered nested worktree (.worktrees/<issue#>) and return the primary checkout to current main, so the next parallel lane can start. Use when the user says to move the branch or task to a worktree or open a parallel lane.

The English summary is being prepared. Showing the original description.

See how to install

Files included (2)

  • SKILL.md3.2 KB
  • move-to-worktree.sh5.4 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Move-to-Worktree

Companion to /start-task for parallel Phase 4 lanes. /start-task leaves the primary checkout on the new feature branch; this skill moves that branch into its own worktree and puts the primary back on the default branch — one worktree + one branch + one agent session per in-flight issue.

Run (1 bash call)

bash {base_directory}/move-to-worktree.sh

No arguments — it operates on the branch currently checked out. The script:

  1. Hard-stops unless run in the primary checkout, on a task branch ({type}/{issue#}/{slug}), with a clean tree and its upstream set to origin/<branch> literally (not a fork-style upstream remote) — i.e. exactly the state /start-task leaves behind. Also hard-stops unless .worktrees/ is gitignored: the worktree is nested inside the repo, so an unignored one gets staged by any git add -A as an embedded gitlink, committing this lane's HEAD onto another branch. Remedy is one line in .gitignore; the script never edits it for you.
  2. Fetches origin/<branch> so the behind-check reflects reality, then pushes any local-only commits and checks out the default branch (this must happen before the worktree is created — git refuses to check out a branch in two places).
  3. git worktree add .worktrees/<issue#> <branch> — nested inside the repo root, never a ../ sibling. The context file specs/context/<issue#>.md travels with the branch (it's committed). If this step fails, the script returns the primary checkout to the feature branch rather than stranding it on the default branch with no lane created.
  4. Fast-forwards the default branch after the lane is parked. A failure here is reported as a warning, not an error — the move already succeeded.

Non-zero exit → hard-stop, print stderr verbatim.

Report

The script's summary block (worktree path, branch), plus: "Prepare the worktree as your project requires (install dependencies, configure ports, etc.), then open a new agent session there and continue the pipeline (/plan-architecture / /implement → /review → /commit → PR with Closes #N)."

When the PR has squash-merged, /finish-worktree <issue#> (run back in the primary) does the teardown.

You Must NOT

  • Run the underlying git commands yourself — the script owns all mutation.
  • Stash, discard, or commit anything to satisfy the clean-tree check — hard-stop instead.
  • Edit .gitignore yourself to satisfy the gitignore check — report the remedy and stop.
  • Move a branch whose upstream is ahead or does not match origin/<branch>.
  • Create the worktree while the primary is still on the feature branch.
  • Install dependencies, write port configuration, or otherwise touch the project's toolchain — that's the developer's job once the worktree exists.

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

Retire a closed issue's working artifacts out of specs/ into the GitHub wiki. Use only when the user asks to archive a finished issue, empty out specs/ for a done task, or move an issue's requirements/architecture/tasks/review/QA docs to the wiki.

The English summary is being prepared. Showing the original description.

foyzulkarim/skills43Updated Sep 4, 2026

commit

Free

One-shot conventional commit; bundled scripts adaptively gather diff context, draft the message, and stage+commit — pass `ask` to confirm first or add a hint for the title. Use only when the user asks for a commit.

The English summary is being prepared. Showing the original description.

foyzulkarim/skills43Updated Sep 4, 2026

Executes a QA specification (specs/qa/QA-<N>-<slug>.md) written by /plan-qa: drives every step with the plan's drivers, verifies each Expected line mechanically ([assert]) or by evidence-backed judgment against the plan's written criterion ([judge]), pauses at named operator handoffs, and writes the results artifact QA-RESULTS-<N>-<slug>.md. Use only when the user asks to run or execute a QA plan — never trigger automatically.

The English summary is being prepared. Showing the original description.

foyzulkarim/skills43Updated Sep 4, 2026

After an issue's PR has squash-merged on GitHub and its issue has closed: fast-forward the default branch, remove the issue-numbered nested worktree (.worktrees/<issue#>), and delete the local feature branch. Use when the user says to finish, tear down, or clean up a lane or worktree for a merged issue.

The English summary is being prepared. Showing the original description.

foyzulkarim/skills43Updated Sep 4, 2026

Phase 3 of 5 — slices the ARCH doc into verification-ready task specs (tdd/test-after/ui/checklist), emitted as a separate TASKS-<N>-<slug>.md file alongside ARCH for the implement skill. Use only when the user asks to run Phase 3 or generate tasks from an ARCH doc — never trigger automatically.

The English summary is being prepared. Showing the original description.

foyzulkarim/skills43Updated Sep 4, 2026

Phase 4 of 5 — implements tasks from TASKS-<N>-<slug>.md (with ARCH-<N>-<slug>.md as architecture-only context) using mode-appropriate verification (tdd, test-after, ui, checklist); pass 'auto' to run without stepping. Use only when the user asks to run Phase 4 or implement tasks from an ARCH doc — never trigger automatically from a coding request.

The English summary is being prepared. Showing the original description.

foyzulkarim/skills43Updated Sep 4, 2026

See all skills by foyzulkarim

Report a problem with this skill