一键导入
he-worktree
Creates or validates an isolated git workspace (worktree or branch) so harness workflow execution does not collide with human in-flight changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Creates or validates an isolated git workspace (worktree or branch) so harness workflow execution does not collide with human in-flight changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Bootstraps a repository for the harness-engineered workflow by creating AGENTS.md, docs/specs, docs/spikes, docs/plans, docs/generated, and baseline tracking files aligned to the PLANS.md contract.
Opens/updates GitHub PRs, checks CI, responds to feedback, and merges after GO using gh CLI with explicit consent gates.
Captures paired browser bug evidence videos using agent-browser (`failure` before fix and `resolution` after fix), stores raw captures in `tmp/artifacts`, and supports minimal manual promotion for durable review evidence. Use for browser/UI bug fixes and release evidence.
Produces a PLANS.md-compliant executable plan from a spec. Use after intake.
Converts fuzzy requests into a concrete initiative spec in docs/specs using a single slug and measurable success criteria. Use at the start of non-trivial work.
Converts post-release outcomes into durable docs and mechanical guardrails, clears generated scratchpads, and archives the initiative plan for reuse.
| name | he-worktree |
| description | Creates or validates an isolated git workspace (worktree or branch) so harness workflow execution does not collide with human in-flight changes. |
| argument-hint | [optional initiative slug, topic, or target branch] |
Prepare safe workspace isolation before running implementation-heavy phases.
he-spike when creating throwaway prototypeshe-implement for non-trivial or long-running workhe-bootstrap) — docs structure commits directly to mainbun create next-app, cargo init, rails new) belongs on main as the baseline. Feature branches start after the foundation exists.he-spec, he-plan) — these are documentation artifacts that belong on main until implementation beginscalled_from matches this skill (bash scripts/runbooks/select-runbooks.sh --skill he-worktree), but never waive/override anything codified here.git rev-parse --show-toplevelgit branch --show-currentgit remote show origin | sed -n '/HEAD branch/s/.*: //p'git rev-parse --git-dir contains /worktrees/git fetch --all --prunebash scripts/runbooks/select-runbooks.sh --skill he-worktree and read any returned runbooks. Apply their additions throughout — they must not waive or override gates codified here.When interactive tools are available, ask the user to choose:
Branch naming — choose from context:
spike/<topic> for feasibility investigationsfeat/<topic> for feature workfix/<topic> for bug fixeschore/<topic> for maintenanceWhen a slug exists, prefer embedding the topic part from YYYY-MM-DD-<type>-<description>.
Worktree path:
../<repo-name>-<branch-name>git worktree add ../<repo-name>-<branch-name> -b <branch-name>.env, local config overrides) that should not be committed.git -C ../<repo-name>-<branch-name> status --short --branchBranch-only path (when worktree is unnecessary):
git checkout -b <branch-name>git status --short --branchreset --hard, clean -fd, branch deletion) as part of this skill.Return:
worktree or branch)git fetch fails — check network/remote config; do not proceed with stale refs.| Anti-Pattern | Better Approach |
|---|---|
| Working directly on main/default without consent | Always isolate or get explicit approval |
| Deleting worktrees to resolve conflicts | Inspect first, ask the user |
| Skipping verification after creation | Always run git status to confirm isolation |
| Hardcoding branch prefixes without context | Match prefix to initiative type (spike/feat/fix/chore) |
Proceed to he-spike or he-implement in the selected isolated workspace.