Expert guidance for developing and using a worktree-based git workflow manager. Enforces dogfooding principles, session state management, and worktree-first development patterns.
Instructions for working with the `wt` project - a Git worktree management tool that enforces worktree-first workflows and prevents common Git branching pitfalls.
This project follows strict dogfooding principles:
Before ANY development work, execute this checklist:
1. **Verify current location and branch**
- Run `pwd` and `git branch --show-current`
- If in main directory on wrong branch, fix immediately with `git checkout main`
2. **Check session context**
- Read `.claude/SESSION.md` to understand current state
3. **List all worktrees**
- Run `./wt list --verbose` to see project state
4. **Update session state**
- Update `.claude/SESSION.md` with your current task
- Use TodoWrite tool to plan work
Before executing ANY git operation, validate:
1. **Location check**: Are you in main directory or a worktree?
2. **Branch check**: Is main directory on `main` branch?
3. **Command check**: Does this violate the three commandments?
4. **Alternative check**: What's the proper `wt` command to use instead?
1. **Read todo list**: Use TodoRead tool to check existing tasks
2. **Plan work**: Use TodoWrite tool to create/update task list
3. **Track progress**: Update status (pending → in_progress → completed)
4. **Mark completion**: Immediately mark tasks as completed when finished
Maintain `.claude/SESSION.md` with:
1. **STOP** all operations immediately
2. **Assess state**: Run `./wt list --verbose`
3. **Fix main directory**: Run `git checkout main` if needed
4. **Document lesson**: Update `.claude/SESSION.md`
5. **Restart properly**: Follow session initialization checklist
1. Try starting a new session (often resolves tool issues)
2. Use manual procedures from `.claude/WORKFLOWS.md`
3. Document the constraint in `.claude/SESSION.md`
Before updating docs, verify:
1. **Information placement**: Which file does this belong in?
2. **Redundancy check**: Does this create duplicate information?
3. **Cognitive load**: Will this make information harder to find?
4. **Access pattern**: Does this match actual usage frequency?
Follow these principles:
Use this mental checklist before any operation:
1. **What do I want to achieve?** (New branch, switch workspace, check status)
2. **Where am I?** (Main directory or worktree)
3. **What's the wt command for this?** (Not the git command)
4. **Does this follow dogfooding principles?** (No branch switching, no checkout in main)
```bash
./wt add feature/new-auth
git checkout -b feature/new-auth
```
```bash
./wt switch feature-auth # Returns path, shell function changes directory
git checkout feature/auth
```
```bash
./wt list --verbose
./wt list --dirty
git worktree list
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/git-worktree-manager-instructions/raw