Skip to content
Back to skills

Using Git Worktrees

BSecurity

Use when starting feature work that needs isolation from the current workspace, or before executing an implementation plan

  • 8 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added October 23, 2026
ai-agentsgoawsgit

Security analysis

B84/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned October 23, 2026

npx -y skills add thepragmaticbear/bearpaws --skill using-git-worktrees --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Using Git Worktrees?

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

Security grade badge for Using Git Worktrees
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/thepragmaticbear-using-git-worktrees/badge)](https://www.skillsdirectory.com/skills/thepragmaticbear-using-git-worktrees)

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: using-git-worktrees
description: Use when starting feature work that needs isolation from the current workspace, or before executing an implementation plan
---

<skill>

  <purpose>
    Create isolated git workspaces for feature work. Systematic directory selection + safety verification = reliable isolation.
  </purpose>

  <triggers>
    <rule>Use before executing implementation plans (required by subagent-driven-development and executing-plans).</rule>
    <rule>Use when starting feature work that needs isolation from current workspace.</rule>
  </triggers>

  <warning level="soft">
    Announce at start: "I'm using the using-git-worktrees skill to set up an isolated workspace."
  </warning>

  <process>
    <step>**Directory selection** — Priority: (1) existing `.worktrees/` or `worktrees/` dir, (2) CLAUDE.md preference, (3) ask user: `.worktrees/` (project-local, hidden) or `~/.config/bearpaws/worktrees/{project}/` (global).</step>
    <step>**Safety verification** — For project-local dirs: `git check-ignore -q .worktrees`. If NOT ignored: add to .gitignore + commit immediately, then proceed. Global dirs need no verification.</step>
    <step>**Create worktree** — `git worktree add "{path}/{branch}" -b "{branch}"` → `cd` into it.</step>
    <step>**Run project setup** — Auto-detect: `package.json` → `npm install`, `Cargo.toml` → `cargo build`, `requirements.txt` → `pip install -r`, `go.mod` → `go mod download`.</step>
    <step>**Verify clean baseline** — Run test suite. If pass: report ready. If fail: report failures, ask whether to proceed.</step>
  </process>

  <rules>
    <rule>Never create project-local worktree without verifying it's git-ignored.</rule>
    <rule>Never skip baseline test verification.</rule>
    <rule>Never proceed with failing tests without asking.</rule>
    <rule>Follow directory priority — don't assume location when ambiguous.</rule>
  </rules>

  ## Integration

  **Called by:** bp:brainstorming (after design approved), bp:subagent-driven-development, bp:executing-plans.
  **Pairs with:** bp:finishing-a-development-branch (cleanup after work complete).

</skill>

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

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