audit
On-demand security audit — OWASP, secrets, dependencies, IaC security
Manage git worktrees for isolated feature development
> /plugin marketplace add lgbarn/shipyard > /plugin install shipyard@shipyard
How it fires
How this command gets triggered: by you, by Claude, or both.
/worktreeContext preview
What this command does when you run it.
Manage git worktrees for isolated feature development
description: "Manage git worktrees for isolated feature development" disable-model-invocation: true argument-hint: "[create <name>] [list] [switch <name>] [remove <name>]"
You are executing the Shipyard worktree management workflow. This provides explicit worktree lifecycle management for isolated feature development.
<prerequisites>
Parse the subcommand from arguments:
If no subcommand is provided, default to `list`.
1. Verify this is a git repository: `git rev-parse --show-toplevel` 2. If not a git repo, tell the user: "Not a git repository. Initialize with `git init` first."
</prerequisites>
---
<execution>
Follow the git-workflow skill's directory selection priority (checks existing dirs, CLAUDE.md prefs, then asks user):
1. **Check existing directories:**
ls -d .worktrees 2>/dev/null ls -d worktrees 2>/dev/null
If found, use that directory. If both exist, `.worktrees` wins.
2. **Check CLAUDE.md:**
grep -i "worktree.*director" CLAUDE.md 2>/dev/null
If preference specified, use it.
3. **Ask user:**
No worktree directory found. Where should I create worktrees? 1. .worktrees/ (project-local, hidden) 2. ~/.config/shipyard/worktrees/<project-name>/ (global location) Which would you prefer?
**For project-local directories (.worktrees or worktrees):**
git check-ignore -q <directory> 2>/dev/null
If NOT ignored: 1. Add the directory to `.gitignore` 2. Commit the change: `shipyard: add worktree directory to .gitignore` 3. Proceed with creation
**For global directories (~/.config/shipyard/worktrees):** No verification needed.
project=$(basename "$(git rev-parse --show-toplevel)") # For project-local path="<directory>/<name>" # For global path="$HOME/.config/shipyard/worktrees/$project/<name>" # Create worktree with new branch git worktree add "$path" -b "<name>"
Auto-detect and run appropriate setup in the new worktree:
cd "$path" # Node.js if [ -f package.json ]; then npm install; fi # Rust if [ -f Cargo.toml ]; then cargo build; fi # Python if [ -f requirements.txt ]; then pip install -r requirements.txt; fi if [ -f pyproject.toml ]; then poetry install; fi # Go if [ -f go.mod ]; then go mod download; fi
Run the project's test suite to confirm a clean starting point:
# Use project-appropriate test command npm test / cargo test / pytest / go test ./...
Display the worktree creation summary (see Output section below).
---
git worktree list
For each worktree:
Display the worktree list (see Output section below).
---
git worktree list | grep "<name>"
If not found, show available worktrees and ask the user to pick one.
Display the worktree path and branch (see Output section below).
Note: Claude Code operates in the directory it was started in. The user will need to `cd` to the worktree path or start a new session from there.
---
git worktree list | grep "<name>"
If not found, show available worktrees and inform the user.
Check if the worktree has uncommitted or unpushed changes:
cd <worktree-path> git status --porcelain git log origin/<branch>..HEAD --oneline 2>/dev/null
If clean (no uncommitted changes, no unpushed commits):
Remove worktree <name> at <path>? (y/n)
If dirty (uncommitted or unpushed changes):
WARNING: Worktree <name> has uncommitted/unpushed changes: <list changes> This will permanently remove the worktree. The branch will be preserved. Type 'remove' to confirm.
git worktree remove <worktree-path>
If the branch should also be deleted (user confirmed), optionally:
git branch -d <branch-name>
Display the removal summary (see Output section below).
</execution>
<output>
Worktree created: Branch: <name> Path: <full-path> Tests: <N> passing, 0 failures Ready to develop. Run `/shipyard:build` or `/shipyard:quick` from the worktree.
Worktrees:
* /path/to/main main (current, shipyard state)
/path/to/.worktrees/feature-x feature-x (3 unpushed commits)
/path/to/.worktrees/phase-2 phase-2 (clean)Worktree for <name>: Path: <full-path> Branch: <branch-name> Navigate to: cd <full-path>
Worktree removed: Path: <path> (deleted) Branch: <branch-name> (preserv
A Claude Code plugin for structured project execution. Plan work in phases, build with parallel agents and TDD, review with security audits and quality gates, and ship with confidence.
Repo: lgbarn/shipyard
On-demand security audit — OWASP, secrets, dependencies, IaC security
Explore requirements through Socratic dialogue and capture project definition
Execute plans using fresh subagents with review gates
Investigate bugs and failures with systematic root-cause analysis