Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
skills(worktrunk): drop --no-hooks from the sub-Agent example (#4219)
Sean Howard1d46bfca7939
diff --git a/docs/public/.well-known/agent-skills/index.json b/docs/public/.well-known/agent-skills/index.jsonindex 24264fd87..7bd713b6e 100644--- a/docs/public/.well-known/agent-skills/index.json+++ b/docs/public/.well-known/agent-skills/index.json@@ -6,7 +6,7 @@"type": "skill-md","description": "Guidance for Worktrunk (the `wt` CLI) — git worktree management, hooks, and config. Load when working out which worktree a `wt` command will act on, or reaching for the global `-C <path>` to target one; editing .config/wt.toml or ~/.config/worktrunk/config.toml; adding, modifying, or debugging hooks (post-merge, post-start, pre-commit, pre-merge, post-switch, etc.); configuring commit message generation or command aliases; or troubleshooting wt behavior. Also answers general worktrunk/wt questions.","url": "./worktrunk/SKILL.md",- "digest": "sha256:29612987f27458c6a9ca7724b800679bdb8c1e84652c75acc4e76589684559e0"+ "digest": "sha256:62f15124703137fac06dc37179c2325374fae6d99f6b7dad7ffd5031feaf0119"}]}diff --git a/plugins/worktrunk/skills/worktrunk/SKILL.md b/plugins/worktrunk/skills/worktrunk/SKILL.mdindex ef0796921..c8d5b4b50 100644--- a/plugins/worktrunk/skills/worktrunk/SKILL.md+++ b/plugins/worktrunk/skills/worktrunk/SKILL.md@@ -151,7 +151,7 @@ When the user requests spawning a worktree with an agent in a background sessionTo spawn multiple sub-Agents that each work in their own worktree from one Claude Code session — no terminal multiplexer, no human in the other pane — pre-start each worktree from the parent and pass the path into the sub-Agent prompt:```bash-wt switch --create <branch> --no-cd --no-hooks+wt switch --create <branch> --no-cd```Then call the `Agent` tool **without** `isolation: "worktree"`, naming the path in the prompt:@@ -161,6 +161,6 @@ You are working in `/abs/path/to/myproject.<branch>` on branch `<branch>`.All edits must stay in that worktree.```-`--no-cd` skips the shell-integration cd script the parent can't consume; `--no-hooks` is appropriate when each sub-Agent will run its own build/test step (e.g. `cargo run -- hook pre-merge --yes`) and you don't need post-start setup repeated per worktree.+`--no-cd` skips the shell-integration cd script the parent can't consume. Add `--no-hooks` only when no user or project hooks provision the worktree and each sub-Agent does its own build/test step (e.g. `cargo run -- hook pre-merge --yes`) — a `pre-start` hook that installs dependencies or links a gitignored build environment hands the sub-Agent a worktree it can't build in when it's skipped. Leaving hooks on needs the project's hook commands already approved: the parent session can't prompt, so an unapproved command in `.config/wt.toml` aborts the create — see **Hook approvals in non-interactive sessions** above.**Do not** use `Agent { isolation: "worktree" }` for this. Claude Code passes its internal agent ID as `name` to the `WorktreeCreate` hook, so `wt` creates the worktree as `myproject.agent-<id>` on a throwaway branch. If the sub-Agent then creates a feature branch on top, you end up with non-canonical paths, orphan branches, and post-start hooks fired against the wrong branch. Pre-creating with `wt switch --create` keeps path, branch, and hook target aligned.diff --git a/skills/worktrunk/SKILL.md b/skills/worktrunk/SKILL.mdindex ef0796921..c8d5b4b50 100644--- a/skills/worktrunk/SKILL.md+++ b/skills/worktrunk/SKILL.md@@ -151,7 +151,7 @@ When the user requests spawning a worktree with an agent in a background sessionTo spawn multiple sub-Agents that each work in their own worktree from one Claude Code session — no terminal multiplexer, no human in the other pane — pre-start each worktree from the parent and pass the path into the sub-Agent prompt:```bash-wt switch --create <branch> --no-cd --no-hooks+wt switch --create <branch> --no-cd```Then call the `Agent` tool **without** `isolation: "worktree"`, naming the path in the prompt:@@ -161,6 +161,6 @@ You are working in `/abs/path/to/myproject.<branch>` on branch `<branch>`.All edits must stay in that worktree.```-`--no-cd` skips the shell-integration cd script the parent can't consume; `--no-hooks` is appropriate when each sub-Agent will run its own build/test step (e.g. `cargo run -- hook pre-merge --yes`) and you don't need post-start setup repeated per worktree.+`--no-cd` skips the shell-integration cd script the parent can't consume. Add `--no-hooks` only when no user or project hooks provision the worktree and each sub-Agent does its own build/test step (e.g. `cargo run -- hook pre-merge --yes`) — a `pre-start` hook that installs dependencies or links a gitignored build environment hands the sub-Agent a worktree it can't build in when it's skipped. Leaving hooks on needs the project's hook commands already approved: the parent session can't prompt, so an unapproved command in `.config/wt.toml` aborts the create — see **Hook approvals in non-interactive sessions** above.**Do not** use `Agent { isolation: "worktree" }` for this. Claude Code passes its internal agent ID as `name` to the `WorktreeCreate` hook, so `wt` creates the worktree as `myproject.agent-<id>` on a throwaway branch. If the sub-Agent then creates a feature branch on top, you end up with non-canonical paths, orphan branches, and post-start hooks fired against the wrong branch. Pre-creating with `wt switch --create` keeps path, branch, and hook target aligned.