Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Git:Worktree

ASecurity

Create and manage git worktrees for parallel development and testing

302 stars
0 votes
0 copies
0 views
Added 9/20/2026
devopsbashtestinggit

Security Analysis

A100/100

Scanned 9/20/2026

Install to Claude Code

$npx -y skills add rossoctl/rossoctl --skill git:worktree --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Git:Worktree?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Git:Worktree
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/rossoctl-git-worktree/badge)](https://www.skillsdirectory.com/skills/rossoctl-git-worktree)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: git:worktree
description: Create and manage git worktrees for parallel development and testing
---

# Git Worktree Skill

Manage git worktrees for parallel development workflows.

## When to Use

- Need to work on multiple branches simultaneously
- Testing features in isolation
- Reviewing PRs without switching branches
- Running CI-like tests locally

## Quick Start

### Create Worktree

```bash
# New branch from main
git worktree add .worktrees/<name> -b <branch-name> main

# Existing branch
git worktree add .worktrees/<name> <existing-branch>

# Specific commit
git worktree add .worktrees/<name> <commit-sha>
```

### List Worktrees

```bash
git worktree list
```

### Remove Worktree

```bash
# Normal remove
git worktree remove .worktrees/<name>

# Force remove (discards changes)
git worktree remove --force .worktrees/<name>

# Prune stale references
git worktree prune
```

## Recommended Workflow

### 1. Create Feature Worktree

```bash
# Create worktree for new feature
git worktree add .worktrees/feature-auth -b feature-auth main
cd .worktrees/feature-auth
```

### 2. Work in Worktree

```bash
# Make changes, commit, push
git add .
git commit -m "Add auth feature"
git push -u origin feature-auth
```

### 3. Deploy and Test from Worktree

```bash
# Source environment
source ~/.rossoctl-hypershift-env.sh

# Deploy from worktree to cluster
KUBECONFIG=$HOSTED_KUBECONFIG scripts/ocp/setup-rossoctl.sh

# Or use local-setup scripts
./.github/scripts/local-setup/kind-full-test.sh --skip-cluster-destroy
```

### 4. Clean Up

```bash
# Return to main
cd /path/to/main/repo

# Remove worktree
git worktree remove .worktrees/feature-auth

# Delete branch if merged
git branch -d feature-auth
```

## Directory Structure

Keep worktrees organized:

```
rossoctl/                    # Main worktree (main branch)
├── .worktrees/             # Feature worktrees
│   ├── feature-auth/       # Auth feature
│   ├── fix-keycloak/       # Bug fix
│   └── pr-review-123/      # PR review
└── ...
```

Add to `.git/info/exclude`:
```
.worktrees/
```

## Using with TODO Docs

Point worktree work to a TODO document in the main repo:

```bash
# Create worktree for TODO item
git worktree add .worktrees/todo-phoenix -b todo-phoenix main
cd .worktrees/todo-phoenix

# Reference TODO from main repo
cat /path/to/main/repo/docs/TODO_PHOENIX.md

# Implement based on TODO
# ...

# Test deployment
./.github/scripts/local-setup/hypershift-full-test.sh --skip-cluster-destroy
```

## Using with HyperShift

Test worktree code on HyperShift clusters:

```bash
# Create worktree
git worktree add .worktrees/my-feature -b my-feature main
cd .worktrees/my-feature

# Source environment (shared kubeconfig)
source ~/.rossoctl-hypershift-env.sh

# Deploy to existing cluster
KUBECONFIG=$HOSTED_KUBECONFIG scripts/ocp/setup-rossoctl.sh

# Or create new cluster with this code
./.github/scripts/local-setup/hypershift-full-test.sh --skip-cluster-destroy
```

## Using with Kind

Test worktree code on local Kind cluster:

```bash
# Create worktree
git worktree add .worktrees/my-feature -b my-feature main
cd .worktrees/my-feature

# Full test cycle
./.github/scripts/local-setup/kind-full-test.sh --skip-cluster-destroy

# Access UI
./.github/scripts/kind/access-ui.sh
```

## Best Practices

1. **Use .worktrees/ directory**: Keep worktrees in one place
2. **Name descriptively**: `feature-auth`, `fix-keycloak`, `pr-123`
3. **Share kubeconfigs**: Store in `$HOME`, not in worktree
4. **Clean up regularly**: Remove merged worktrees
5. **Prune stale refs**: Run `git worktree prune` periodically

## Troubleshooting

### Branch already checked out

```bash
# Find which worktree has the branch
git worktree list | grep <branch-name>
```

### Worktree already exists

```bash
# Remove existing worktree
git worktree remove .worktrees/<name>
# Or force if changes exist
git worktree remove --force .worktrees/<name>
```

### Stale worktree references

```bash
# Prune after manually deleting worktree directories
git worktree prune
```

## Related Skills

- **tdd:ci**: CI-driven TDD workflow (auto-creates worktree from upstream/main for GH issues/PRs)
- **kind:cluster**: Local Kind cluster management
- **hypershift:cluster**: HyperShift cluster management
- **rossoctl:operator**: Deploy Rossoctl platform

Attribution

rossoctlrossoctl
View sourceMore from rossoctl →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Terraform Module Library

Build reusable Terraform modules for AWS, Azure, and GCP infrastructure following infrastructure-as-code best practices. Use when creating infrastructure modules, standardizing cloud provisioning, or implementing reusable IaC components.

393431 votes

sematext-otel

Wire a service's OpenTelemetry output to Sematext Cloud. Walks through region, App-type, instrumentation flow (managed OTLP endpoint vs Sematext Agent), and signal selection (traces/metrics/logs), then produces the exact env-var block and points at a runnable reference example in this repo. Invoke when instrumenting a new app for Sematext.

01 votes

Deployment Patterns

Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications. Use when setting up deployment infrastructure or planning releases.

2459130 votes

Babysit

Watch a pull request or review cycle until it is ready to merge. Use when asked to babysit, monitor, or keep checking PR comments, reviews, and CI until all actionable issues are resolved.

929660 votes

V7 Roster

Interact with the Paperclip control plane API for task coordination and governance. Use when checking assignments, updating issue status, posting comments, delegating work, managing routines, or calling Paperclip API endpoints.

805540 votes
View all in devops →