From lhtask
Updates the vendored LHTask chain in bootstrapped repos from the plugin source. Refreshes scripts, subagents, MCP config, and git hooks. Use --all to update every registered repo. Leaves configuration and lifecycle files untouched.
How this skill is triggered — by the user, by Claude, or both
Slash command
/lhtask:update [--all] (no arg = current repo; --all = every registered repo)[--all] (no arg = current repo; --all = every registered repo)The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are updating the **vendored** LHTask chain in already-bootstrapped repos from the
You are updating the vendored LHTask chain in already-bootstrapped repos from the
freshly-installed plugin templates. The plugin ships the canonical agents/ + .mcp.json
(those auto-update with the plugin); this command refreshes the vendored copies that the
headless git-hook path depends on, plus the stage scripts and hooks.
Only refresh logic. Never touch the user's config or content: leave lhtask.conf,
TODO.md, DONE.md, AGENT_LOG.md, AGENTS.md, CLAUDE.md and .gitignore alone.
Templates come from the plugin as installed — never from a development checkout:
TPL="${CLAUDE_PLUGIN_ROOT:-}/templates"
# Fallback when CLAUDE_PLUGIN_ROOT is unset (e.g. skill executed manually): resolve the
# INSTALLED plugin from the marketplace cache — most recently installed version wins.
[ -d "$TPL" ] || TPL="$(ls -dt "$HOME"/.claude/plugins/cache/*/lhtask/*/templates 2>/dev/null | head -1)"
[ -d "${TPL:-}" ] || { echo "lhtask is not installed. Run:
claude plugin marketplace add leonhoffmann86/lhtask-plugin
claude plugin install lhtask@lhtask-marketplace"; }
REG="${XDG_CONFIG_HOME:-$HOME/.config}/lhtask/registry" # one repo path per line
If neither resolves, stop with that install instruction. Do NOT search the filesystem
for a plugin source tree and do NOT accept a git checkout of the plugin repo as $TPL —
only the installed (versioned) copy is a valid template source (see docs/DISTRIBUTION.md).
ROOT="$(git rev-parse --show-toplevel)".--all → read $REG (if present) and operate on each listed path that is still a git repo
with a scripts/lhtask-lib.sh (i.e. actually bootstrapped). Report missing/!bootstrapped
entries and skip them. If $REG is absent, tell the user no repos are registered and that
/lhtask:bootstrap records repos there (see step 4).For each target ROOT, copy over (overwrite) ONLY:
cp "$TPL/scripts/lhtask-lib.sh" "$ROOT/scripts/lhtask-lib.sh"
cp "$TPL/scripts/lhtask-plan.sh" "$ROOT/scripts/lhtask-plan.sh"
cp "$TPL/scripts/lhtask-implement.sh" "$ROOT/scripts/lhtask-implement.sh"
cp "$TPL/scripts/lhtask-review.sh" "$ROOT/scripts/lhtask-review.sh"
cp "$TPL/scripts/lhtask-gate.sh" "$ROOT/scripts/lhtask-gate.sh"
cp "$TPL/githooks/post-commit" "$ROOT/.githooks/post-commit"
cp "$TPL/githooks/README.md" "$ROOT/.githooks/README.md"
mkdir -p "$ROOT/.claude/agents"
cp "$TPL"/.claude/agents/*.md "$ROOT/.claude/agents/"
chmod +x "$ROOT/.githooks/post-commit" "$ROOT"/scripts/lhtask-*.sh
For .mcp.json: if the repo's file is identical to a prior template version, overwrite it; if the
user has customized it (extra servers), merge the codegraph server in rather than clobbering —
show the diff and confirm. Before overwriting any file that the user may have hand-edited, show a
diff and ask.
lhtask.conf)Compare the keys defined in $TPL/lhtask.conf against the repo's lhtask.conf. For any key present
in the template but missing in the repo (e.g. a newly added LHTASK_*), print it with its
default and a one-line description, and tell the user to add it if they want the new behavior.
Never rewrite their lhtask.conf automatically.
Run bash -n on each refreshed script; report any failure.
The chain degrades gracefully when supporting tools are missing, but the user must be told EXPLICITLY. Check and report each:
command -v codegraph and the
repo index .codegraph/codegraph.db. Missing binary → roles run WITHOUT code-graph
intelligence; missing index → suggest codegraph sync . once../node_modules/.bin/fallow
(unless LHTASK_FALLOW=off). Missing → the gate runs without static analysis;
suggest npm i -g fallow + fallow init.### Tooling section in every TODO.review.md.$REG is a newline-delimited path list consumed by --all. Registration is exclusively
/lhtask:bootstrap's job and opt-in there — this command must NOT add the current repo
(users keep internal repos out of the registry deliberately; see docs/DISTRIBUTION.md).
If an entry no longer exists or isn't bootstrapped, drop it and note the cleanup.
Print, per repo: which files were refreshed/skipped, any .mcp.json merge, the config-drift keys to
consider, the tooling report, and the reminder that lhtask.conf + lifecycle files were
intentionally left untouched.
npx claudepluginhub leonhoffmann86/lhtask-plugin --plugin lhtaskGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.