From bonsai
Create a ready git worktree from the freshest default branch and prime its `.bonsai` files.
How this skill is triggered — by the user, by Claude, or both
Slash command
/bonsai:bonsaiThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Worktree lifecycle as a small CLI. This skill makes a ready-to-use worktree:
Worktree lifecycle as a small CLI. This skill makes a ready-to-use worktree:
it creates the branch off the freshest default and primes the tree from the
repo's .bonsai file list. It does not launch an agent and does not write a
start command anywhere; it returns facts and stops.
The CLI lives in this plugin's bin/. Resolve the plugin root, then call it:
resolve_bonsai_root() {
if [ -n "${BONSAI_BIN:-}" ]; then dirname "$(dirname "$BONSAI_BIN")"; return 0; fi
if [ -n "${CLAUDE_PLUGIN_ROOT:-}" ]; then printf '%s\n' "$CLAUDE_PLUGIN_ROOT"; return 0; fi
if command -v codex >/dev/null 2>&1; then
codex plugin list | awk '$1 == "bonsai@laicluse-agent-fieldkit" { print $NF; found=1; exit } END { exit found ? 0 : 1 }'
return $?
fi
return 1
}
ROOT="$(resolve_bonsai_root)" || { echo "bonsai plugin root not found" >&2; exit 1; }
BONSAI="${BONSAI_BIN:-$ROOT/bin/bonsai}"
node "$BONSAI" create <branch> --repo "<canonical checkout root>" --json
node "$BONSAI" setup "<worktree path from create>" --repo "<canonical checkout root>" --json
create resolves the freshest default branch, makes <root>/worktrees/<dir>
(slashes in the branch flatten to dashes in the dir), refuses a branch that
already exists, and prints { worktree, branch, base, baseSha, port }. setup
copies the .bonsai-listed files from the canonical checkout and installs
dependencies per directory using the package manager each lockfile names.
Relay the worktree path and the dev-server port to the operator. The port is a
deterministic hint in 3100-3999; use it for a dev server in the worktree so it
does not collide with the main checkout. Tearing the worktree down later is
/prune (the teardown subcommand).
npx claudepluginhub epologee/laicluse-agent-fieldkit --plugin bonsaiGuides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Synthesizes the current conversation into a structured spec (PRD) and publishes it to the project issue tracker with a ready-for-agent label, without interviewing the user.