Open Trees banner
0xSero 0xSero

Open Trees

Git community

Description

An Opencode plugin for managing git worktrees.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Open Trees warm paper banner

Open Trees

OpenCode plugin for fast, safe `git worktree` workflows.

Install

Single command (recommended):

bunx open-trees add

This updates your OpenCode config (default: `~/.config/opencode/opencode.json`). OpenCode installs npm plugins automatically at startup (cached in `~/.cache/opencode/node_modules`).

Manual config:

{
  "plugin": ["open-trees"]
}

For local development, build the plugin and point OpenCode at the local package:

bun install
bun run build
{
  "plugin": ["/absolute/path/to/open-trees"]
}

Worktree mode

Worktree tools are gated behind worktree mode so they do not clutter the default tool list. Enable it when you want to work with worktrees, then disable it when you are done.

worktree_mode { "action": "on" }
worktree_mode { "action": "off" }

`worktree_mode` also prints a help sheet (tools + examples) so the model has the usage context.

Slash-native toggle (see `.opencode/command/worktree.md`):

/worktree on
/worktree off

`/worktree on` enables the tools and emits the help sheet into the session. `/worktree off` disables them and keeps them off for the next session.

Tools

  • worktree_mode — enable/disable worktree mode and show help.
  • worktree_overview — list, status, or dashboard worktrees.
  • worktree_make — create/open/fork worktrees and sessions.
  • worktree_cleanup — remove or prune worktrees safely.

Examples

Enable worktree mode:

worktree_mode { "action": "on" }

List worktrees:

worktree_overview

Status for all worktrees:

worktree_overview { "view": "status" }

Show the worktree/session dashboard:

worktree_overview { "view": "dashboard" }

Create a worktree (branch derived f