forktree helps coding agents and automation create, manage, and clean up Git worktrees with safety checks and predictable shell output.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install forktree
Copy the skill folder to one of these locations
~/.openclaw/skills/ <project>/skills/ Priority: Workspace > Local > Bundled
Copy this prompt to OpenClaw to install it automatically.
Help me install forktree using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
forktree is a stdlib-only Python 3.11+ CLI that wraps Git worktree operations for shell pipelines, CI jobs, and unattended coding agents. Its create command runs seven safety pre-flights before adding a worktree, while other commands support listing, removal, garbage collection, configuration initialization, and diagnostics.
For Openclaw Skills users, the key benefit is automation-friendly behavior: data goes to stdout, diagnostics go to stderr, and defined exit codes let scripts respond reliably to success, safety refusals, Git failures, and strict configuration errors. The tool has no third-party Python dependencies.
forktree doctor..forktree.toml, ~/.config/forktree/config.toml, then built-in defaults.create, run seven safety pre-flights before asking Git to create the worktree; a refused operation exits non-zero and does not create it.doctor diagnostics to stderr; format errors as forktree: <subcommand>: <one-line reason>.remove for a specific worktree, or gc to evaluate stale worktrees by idle age and merge status; preview cleanup with gc --dry-run.Install the forktree CLI using the project's documented installation method, then ensure the forktree executable is on PATH and the package is importable with Python 3.11 or later. This skill file does not specify an installation command or package-manager procedure.
Verify the installation:
command -v forktree
python3 -c "import forktree"
forktree --help
forktree doctor
Create a project configuration containing the effective resolved settings:
forktree init
Configuration is resolved in this order: CLI flags, project .forktree.toml, user ~/.config/forktree/config.toml, and built-in defaults. Set FORKTREE_STRICT=1 to enable strict configuration handling for every subcommand, or use NO_COLOR=1 to disable ANSI color in human output. Under strict mode, malformed TOML exits with code 3.
Example agent-safe invocation:
wt=$(forktree create "$project_path" "$slug" 2>/tmp/forktree.err) || {
cat /tmp/forktree.err
exit 1
}
cd "$wt"
Check the exit status and read stderr before proceeding: a failed create means no worktree was created. Use forktree <subcommand> --help for command-specific flags.
forktree uses TOML for configuration and keeps command output suitable for shell automation.
| Data or output | Format and behavior |
|---|---|
| Project configuration | .forktree.toml in the project directory |
| User configuration | ~/.config/forktree/config.toml |
| Configuration precedence | CLI flags > project config > user config > built-in defaults |
create stdout |
One line containing the new worktree's absolute path |
list --porcelain stdout |
One header-free TSV line per worktree |
list --json stdout |
JSON array of objects; compact in a pipe and pretty-printed in a TTY |
gc --dry-run stdout |
Sorted worktree slugs, one per line |
| Diagnostics | Warnings, errors, verbose progress, and doctor report on stderr |
The skill file does not enumerate the full TOML schema; consult the project README for supported configuration fields. Errors use the format forktree: <subcommand>: <one-line reason>. Exit codes are 0 for success, 1 for a pre-flight refusal, 2 for a Git operation, setup hook, or usage failure, and 3 for a strict configuration error.
create result an explicit signal not to proceed.jq without diagnostic text contaminating data.list supports both machine-readable JSON and porcelain TSV output.gc evaluates stale worktrees by idle age and merge status; gc --dry-run previews sorted cleanup candidates before action.--strict or FORKTREE_STRICT=1.[worktree].setup_script hook runs during worktree setup; it is opt-in, and a non-zero hook exit removes the worktree.doctor provides diagnostics and always exits with code 0; review its stderr output for findings.Loading
A regulatory writing assistant that organizes medical device evidence into market-specific, submission-ready registration dossiers.

A Cue-powered research skill for querying, comparing, and analyzing publicly disclosed A-share equity incentive plans and share buybacks.

A structured market and customer insight workflow that combines ST, APPEALS, and KANO analysis to identify high-value segments, unmet needs, and blue-ocean opportunities.

An Openclaw Skills workflow for submitting, monitoring, and downloading AI-generated short drama projects through Pippit Tool CLI.

Marketing Engineer turns marketing operations into an evidence-based, auditable workflow with structured workspaces, content tickets, GEO/SEO playbooks, and a live dashboard.

Learning5D helps agents assess safety risks, review skills before installation, and optionally study consent-first relational safety.








































