# Create Git Worktrees for Isolated Tasks

Developers need isolated branches without copying repositories manually. This skill creates or reuses a Git worktree and prepares a basic local environment.

## Install

```bash
npx skillstore add akabanakk/create-git-worktree
```

## Metadata

- Status: approved
- Slug: akabanakk-create-git-worktree
- Skillstore revision: r1
- Version status: missing
- Tree hash: bbf2f9deea8dfc02b0ed5be2f5ac7f1b4c20f12388e8006989d7793f932a3c34
- Author: AKABANAKK
- GitHub username: AKABANAKK
- License: MIT
- Repository: https://github.com/AKABANAKK/claude-code-marketplace/tree/main/akb7/skills/create-git-worktree
- Ref: 6eec4a59f63ff83440a84c18d1aef79743bc714e
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: confirmation\_required
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, filesystem
- Quality score: 38
- Quality tier: warning
- Public page: https://skillstore.pages.dev/skills/akabanakk-create-git-worktree
- Manifest: https://skillstore.pages.dev/api/skills/akabanakk-create-git-worktree/manifest

## Capabilities

- Runs a Bash script to create a Git worktree for a named branch.
- Uses the current branch as the base unless --from is provided.
- Normalizes slashes in branch names for the worktree directory name.
- Creates a sibling worktrees directory when it does not exist.
- Reuses an existing worktree path instead of creating a duplicate.
- Copies the repository .env file into the new worktree when present.

## Use Cases

- Start Feature Work: Create a separate workspace for a feature branch while keeping the main checkout available.
- Review Branches in Parallel: Open another branch for testing or review without stashing current work.
- Prepare a Hotfix Workspace: Start a hotfix worktree from a selected release or main branch.

## Prompt Templates

### Create a Basic Worktree

```
Create a worktree for branch feature/profile-page.
```

### Choose a Base Branch

```
Create a worktree for bugfix/login-timeout from main using this skill.
```

### Reuse Existing Worktree

```
Create or reuse a worktree for feature/search-filter and tell me which path is used.
```

### Check Risk Before Running

```
Before creating release/2.4-hotfix from release/2.4, tell me the target path and whether .env will be copied.
```

## Limitations

- Requires Bash and Git in a repository working tree.
- Runs git checkout and git pull before creating the worktree.
- Copies .env by default, which can duplicate local secrets.
- The script does not install npm dependencies despite the skill description.

## Best Practices

- Review the target path before running the script.
- Use --from when the base branch matters.
- Remove copied secrets from worktrees that do not need them.

## Anti Patterns

- Run the skill in a repository with uncommitted changes without checking status.
- Use it when .env contains secrets that should not be duplicated.
- Assume npm dependencies are installed by this script.

## Security Audit

- Audited at: 2026-07-05T02:20:03.672\+00:00
- Summary: Most shell and SKILL.md entropy detections are benign for a Git worktree helper. The script still has real risk because it creates sibling directories, changes and pulls the base branch, and copies .env into the new worktree. No prompt injection or malicious exfiltration intent was found.

## Stats

- Views: 193
- Downloads: 8
- Favorites: 0
- Popularity score: 0
