Skip to content
Back to skills

Worktree

ASecurity

Create, destroy, list or sync git worktrees for any project — Herd link+TLS, .env isolation, optional DB clone. Use on `/worktree`.

  • 3 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 5, 2026
ai-agentsbashgit

Security analysis

A100/100

Pro scans all 9 files and shows the line behind each finding

Scanned September 22, 2026

npx -y skills add bravros/bravros --skill worktree --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Worktree?

Add the live security badge to your README. It updates with every re-scan.

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

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: worktree
description: Create, destroy, list or sync git worktrees for any project — Herd link+TLS, .env isolation, optional DB clone. Use on `/worktree`.
---

# /worktree — parallel-worktree manager

Read [briefing.md](references/briefing.md) on demand for detailed context and instructions.

Parallel checkouts without colliding `.test` domains, Redis keys, sessions or queue jobs.
Laravel repos additionally get a Herd URL, isolated `.env`, and optionally a cloned DB.
**Scripts do the real work** — dispatch the right one from the repo/workspace root, relay output.

```
/worktree create [<app>] [<id>] [--branch=<name>] [--clone-db] [--live-dump] [--shared-db] [--fresh]
/worktree destroy <name> [--dry-run] [--force] [--yes] [--merged-into=<ref>] [--fresh]
/worktree list [--app=<repo>] [--fresh]
/worktree sync <name> [--onto=<ref>] [--merge] [--dry-run] [--fresh]
```

## Operator conventions

- **Derive the id yourself**: condense feature description to ≤12-char slug, report name, URL and **path**.
- **Shared parent DB is default — never ask.** `--clone-db` only when explicitly asked or running migrations.
- **Parent checkout is never switched.** `create` branches off `origin/<base>` (`.worktree.yml:base` → `bravros config get staging_branch` → homolog → main).

## Commands

- **create** — `bash <skill>/scripts/create.sh [<app>] [<id>] [flags]`, stream stdout. Non-Laravel repo → plain `git worktree` + runtime-dir clone, no Herd/.env/DB (auto-detected from `stack.framework` in `.bravros/config.json`, else `artisan`). Several worktrees = several calls, report every path. `--branch=<name>` tracks `origin/<name>` when it exists remotely.
- **destroy** — `--dry-run` first, confirm via `ask_question` unless authorized, then `--yes`. Relay refusals verbatim.
- **list** — `list.sh [--app=<repo>]`. Clean unmanaged with `bravros worktree cleanup <path> --force`.
- **sync** — `sync.sh <name> [--onto=<ref>]`. Rebases (`--merge`), never pushes.

Files in this skill

  • SKILL.md1.6 KB
  • references/briefing.md3.2 KB
  • references/config.md3.8 KB
  • scripts/_lib.sh34.2 KB
  • scripts/create.sh23.2 KB
  • scripts/destroy.sh12.5 KB
  • scripts/list.sh6.1 KB
  • scripts/sync.sh5.1 KB
  • skill.yaml3.9 KB

Attribution

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

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.