Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

worktrees

verified

Git worktree management for isolated task development

View on GitHub

Marketplace

pokayokay

srstomp/pokayokay

Plugin

pokayokay

productivity

Repository

srstomp/pokayokay
2stars

plugins/pokayokay/skills/worktrees/SKILL.md

Last Verified

February 2, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/srstomp/pokayokay/blob/main/plugins/pokayokay/skills/worktrees/SKILL.md -a claude-code --skill worktrees

Installation paths:

Claude
.claude/skills/worktrees/
Powered by add-skill CLI

Instructions

# Worktrees Skill

Guide for managing git worktrees in pokayokay.

## When Worktrees Are Created

| Task Type | Default | Override |
|-----------|---------|----------|
| feature | Worktree | --in-place |
| bug | Worktree | --in-place |
| spike | Worktree | --in-place |
| chore | In-place | --worktree |
| docs | In-place | --worktree |
| test | Inherits | explicit flag |

## Story-Based Reuse

Tasks within the same story share a worktree:

```
Story 12: User Authentication
├── Task 42: Login form      → .worktrees/story-12-user-auth/
├── Task 43: Session handling → .worktrees/story-12-user-auth/ (reused)
└── Task 44: Logout button   → .worktrees/story-12-user-auth/ (reused)
```

Benefits:
- Related changes stay together
- No merge conflicts between related tasks
- Single PR for entire story
- Cleaner git history

## Worktree Lifecycle

```
┌─────────────┐
│ Task starts │
└──────┬──────┘
       │
       ▼
┌──────────────────┐     NO      ┌──────────────┐
│ Needs worktree?  │────────────►│ Work in-place│
└──────┬───────────┘             └──────────────┘
       │ YES
       ▼
┌──────────────────┐     YES     ┌──────────────┐
│ Story worktree   │────────────►│ Reuse it     │
│ exists?          │             └──────────────┘
└──────┬───────────┘
       │ NO
       ▼
┌──────────────────┐
│ Create worktree  │
│ Install deps     │
└──────┬───────────┘
       │
       ▼
┌──────────────────┐
│ Work on task     │
└──────┬───────────┘
       │
       ▼
┌──────────────────┐
│ Task complete    │
└──────┬───────────┘
       │
       ▼
┌──────────────────┐     YES     ┌──────────────┐
│ Part of story?   │────────────►│ Continue to  │
│                  │             │ next task    │
└──────┬───────────┘             └──────────────┘
       │ NO (or story done)
       ▼
┌──────────────────┐
│ Completion prompt│
│ merge/PR/keep/   │
│ discard          │
└──────────────────┘
```

## Directory Structure

```
project/
├── .worktrees/           # All worktrees (auto-ignored)
│   ├── story-

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3768 chars