setup

Primes an existing git worktree with .bonsai files and package installs.

4|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/laicluse/agent-fieldkit --skill setup-laicluse
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: setup
Source: https://github.com/laicluse/agent-fieldkit/tree/main/.agents/plugins/generated/bonsai/skills/setup
Command: npx skills add https://github.com/laicluse/agent-fieldkit --skill setup-laicluse

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? After creating a git worktree manually, you still need to copy the .bonsai configuration files and run package installs before the worktree is usable. This Skill automates that priming step for any worktree that already exists, without requiring you to recreate it through the bonsai CLI. ## Core Features & Use Cases - Worktree Priming: Copies .bonsai files from the canonical checkout into an existing worktree and runs the detected package installs. - Cross-Agent Binary Resolution: Locates the bonsai CLI via BONSAI_BIN, CLAUDE_PLUGIN_ROOT, or the Codex plugin list, so it works in both Claude Code and Codex environments. - Best-Effort Installs: A failed install is reported as a warning rather than a hard error, leaving the worktree usable; --no-install copies files and reports detected install targets without running them. - Use Case: You created a worktree by hand with git worktree add and want it configured like any bonsai-managed worktree. Run setup with the worktree path and the canonical repo root to copy config files and install dependencies in one step. ## Quick Start Ask the agent to run bonsai setup on your existing worktree, providing the worktree path and the canonical checkout root as the --repo argument.

Frequently Asked Questions about setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up an existing git worktree with bonsai?▼

Run the bonsai CLI with the setup command, passing the worktree path and --repo pointing at the canonical checkout root. The command copies .bonsai files and runs detected package installs, reporting results as JSON.

What is the difference between bonsai setup and creating a worktree?▼

Setup only primes a worktree that already exists; it does not create one. This separation lets you run it on worktrees you made yourself with git worktree add rather than through the bonsai CLI.

Why does bonsai setup require the --repo argument?▼

The --repo argument must point at the canonical checkout because the .bonsai file and the files it lists live there, not in the new worktree. Without it, setup cannot locate the configuration to copy.

What happens if a package install fails during worktree setup?▼

Install is best-effort: a failed install is reported as a warning, not a hard error, so the worktree remains usable. You can also pass --no-install to copy files and report detected install targets without running them.

Does bonsai setup work with both Claude Code and Codex?▼

Yes. The skill resolves the bonsai binary through BONSAI_BIN, CLAUDE_PLUGIN_ROOT, or by querying the Codex plugin list for bonsai@laicluse-agent-fieldkit, so it runs in either host environment.