ck:worktree

Create isolated git worktrees with prefixed branches for parallel development.

Updated Mar 7, 2026
One-click install
npx skills add https://github.com/MinhHoangDono/antigravity-kit --skill ck-worktree-minhhoangdono
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ck:worktree
Source: https://github.com/MinhHoangDono/antigravity-kit/tree/main/.agent/skills/worktree
Command: npx skills add https://github.com/MinhHoangDono/antigravity-kit --skill ck-worktree-minhhoangdono

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill solves the problem of slowing down development when you need to work on multiple features or fixes at the same time without polluting your main working directory.

Core Features & Use Cases

  • Isolated worktrees for parallel development: Creates a dedicated git worktree and a properly prefixed branch for the requested feature, enabling side-by-side work.
  • Smart handling for monorepos and submodules: Detects repo type and places worktrees under a safe, organized location (superproject > monorepo internal > sibling).
  • Branch naming, safety checks, and cleanup readiness: Automatically derives branch prefixes (feat/fix/docs/test/chore/refactor/perf) from intent, sanitizes feature names into valid branch segments, prevents duplicates, and can copy relevant environment templates into the new worktree.

Use case: You want to fix a production bug while continuing feature work—create a worktree for the bug with a fix/... branch prefix, switch to that worktree, and keep your ongoing development untouched.

Quick Start

Ask your assistant to create a worktree for "login bug" with the fix prefix and a dry run so you can confirm the planned branch and path before changes are made.

Frequently Asked Questions about ck:worktree

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a git worktree for parallel development without losing my current changes?

Git worktrees for parallel development allow you to create an isolated working directory and a dedicated feature branch, enabling side-by-side work without overwriting changes in your main directory.

How does git worktree management work in a monorepo or submodule context?

Git worktree management in monorepos and submodules detects the repository type and automatically resolves a safe worktree root location, organizing paths by superproject, monorepo internal structure, or sibling directories.

Can I automatically apply branch naming conventions when creating a new git worktree?

Yes, you can automatically apply branch naming conventions when creating a git worktree by deriving prefixes like feat, fix, or docs from your task intent, with feature names sanitized into valid branch segments.

What is the best way to preview a git worktree creation before committing changes?

The best way to preview git worktree creation is using a dry-run mode, which outputs the planned branch name and target file path in JSON format so you can safely confirm the configuration before any changes are made.

Does git worktree automation support copying environment templates into the new branch?

Yes, git worktree automation supports copying environment templates into the new worktree directory, ensuring your isolated branch has the necessary local configuration files ready for immediate parallel development.

When should I not use git worktrees for branch automation?

You should avoid using git worktrees for branch automation if your task lacks a clear intent prefix like fix or feat, or if you need to work directly within the main working directory without creating isolated environments.