一键导入
using-git-worktree
Use when starting feature work that should be isolated from the main checkout; creates or verifies an isolated git worktree with safety checks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when starting feature work that should be isolated from the main checkout; creates or verifies an isolated git worktree with safety checks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Watch an open GitHub pull request for CI, mergeability, bot reviews, and human feedback until it is ready, closed, or blocked.
Harness-portable autonomous delivery loop for a scoped software task: front-load uncertainty, produce or confirm a plan, implement with TDD and validation, run review passes, prepare git/GitHub artifacts, and babysit the PR when authorized. Use when the user wants a mostly hands-off problem-to-PR workflow.
Use for commit, push, pull request, issue, and GitHub CLI workflows; emphasizes diff-grounded text and safe non-interactive commands.
Harness-portable planning and requirements-capture workflow for turning vague, risky, architectural, multi-workstream, or scope-drift-prone requests into durable artifacts before implementation. Use when the user asks to scope, plan, workshop, write a spec, capture acceptance criteria, prepare an implementation handoff, or when product intent should not be guessed.
Read-only reviewer for checking whether an implementation milestone matches an approved plan or spec.
Guide agents to choose a review pass intentionally and keep findings structured.
| name | using-git-worktree |
| description | Use when starting feature work that should be isolated from the main checkout; creates or verifies an isolated git worktree with safety checks. |
Use this skill before non-trivial implementation when the current checkout is on the default branch and the user has not asked to work directly there.
Check whether isolation already exists:
git rev-parse --git-common-dir
git rev-parse --git-dir
git rev-parse --abbrev-ref HEAD
If git-common-dir differs from git-dir, you are already inside a worktree.
If the current branch is a non-default feature branch, treat that as enough
isolation unless the user asked for a separate worktree.
Use .worktrees/<slug> from the repo root. Verify it is ignored:
git check-ignore -q .worktrees
If it is not ignored, add .worktrees/ to .gitignore before creating the
worktree.
Choose a short descriptive branch name, normally wt/<slug>:
git fetch origin
git worktree add .worktrees/<slug> -b wt/<slug> origin/main
If the default branch is not main, use the repository default instead.
After creation, run commands from the worktree path explicitly. In app or tool
sessions where cd does not persist, use absolute paths.
Run project setup only when the relevant files exist:
go mod download # if go.mod exists
npm install # if package.json exists
go test ./... # if Go packages exist
npm test # if package.json defines tests
If the baseline fails before your changes, report the failure and ask whether to investigate or continue.