Agent SkillsTerry-Mao/AICodingFlow › git-worktree

git-worktree

GitHub

用于在隔离的 Git worktree 中进行并行开发,避免干扰当前工作区。支持基于 Issue ID 命名分支,自动校验路径与状态,确保无未提交变更干扰,并报告后续操作指引。

.agents/skills/git-worktree/SKILL.md Terry-Mao/AICodingFlow

Trigger Scenarios

需要并行处理多个任务而不影响当前上下文 创建新的功能分支进行独立开发 用户明确要求使用隔离的工作目录

Install

npx skills add Terry-Mao/AICodingFlow --skill git-worktree -g -y
More Options

Non-standard path

npx skills add https://github.com/Terry-Mao/AICodingFlow/tree/main/.agents/skills/git-worktree -g -y

Use without installing

npx skills use Terry-Mao/AICodingFlow@git-worktree

指定 Agent (Claude Code)

npx skills add Terry-Mao/AICodingFlow --skill git-worktree -a claude-code -g -y

安装 repo 全部 skill

npx skills add Terry-Mao/AICodingFlow --all -g -y

预览 repo 内 skill

npx skills add Terry-Mao/AICodingFlow --list

SKILL.md

Frontmatter
{
    "name": "git-worktree",
    "description": "Create an isolated Git worktree for parallel development with minimal safety checks."
}

git-worktree

Use this when work should not disturb the current worktree. The new worktree does not copy uncommitted changes, and it does not change the user's shell directory.

Naming and base

Use the git-branch naming rules: issue work is <type>/<short-desc>-<issueID>, other work uses a user-provided name, and no issue ID is invented. When an issue ID is provided, use one gh issue view call for naming context and continue from the request if it fails. Store the worktree at .worktrees/<branch-name> so branch path segments are preserved. The repository should ignore .worktrees/.

Default the base to main; same-repository work prefers origin/<base>, then local <base>, and uses upstream only for fork workflows or explicit guidance. Fetch/check freshness only when it affects the result. If the local base is stale, confirm before using it or create from a fetched remote base and report that the local base was unchanged.

Create

Before creating, check current status, existing worktrees/branches, and the target path. Stop if any target already exists or dirty-work intent is unclear. Validate the branch with git check-ref-format --branch <branch-name>, create parent directories as needed, then run the equivalent of:

git worktree add --no-track -b <branch-name> .worktrees/<branch-name> <base-ref>

Verify the new worktree's branch, status, and pwd. Report its path, base, whether dirty changes were excluded, and the user's next step: cd .worktrees/<branch-name>.

Do not remove, prune, overwrite, reset, stash, push, or force anything unless explicitly asked. Do not create protected/shared base branches as targets. Subsequent agent work uses the new worktree unless the user says otherwise.

Version History

  • d3fef11 Current 2026-09-03 03:51

    重构精简本地开发与 spec 工作流指引,优化基础分支策略及远程检查逻辑。

  • e53c5ac 2026-07-24 11:35

Same Skill Collection

.agents/skills/bootstrap-issue-config/SKILL.md
.agents/skills/create-issue/SKILL.md
.agents/skills/create-pr/SKILL.md
.agents/skills/diagnose-ci-failures/SKILL.md
.agents/skills/git-branch/SKILL.md
.agents/skills/git-commit/SKILL.md
.agents/skills/git-push/SKILL.md
.agents/skills/pr-walkthrough/SKILL.md
.agents/skills/resolve-merge-conflicts/SKILL.md
.agents/skills/review-pr-local/SKILL.md
.agents/skills/review-spec-local/SKILL.md
.agents/skills/spec-driven-implementation/SKILL.md
.agents/skills/write-product-spec/SKILL.md
.agents/skills/write-tech-spec/SKILL.md
.github/skills/check-impl-against-spec/SKILL.md
.github/skills/create-product-spec/SKILL.md
.github/skills/create-tech-spec/SKILL.md
.github/skills/dedupe-issue-repo/SKILL.md
.github/skills/dedupe-issue/SKILL.md
.github/skills/implement-issue/SKILL.md
.github/skills/implement-specs/SKILL.md
.github/skills/product-change-report/SKILL.md
.github/skills/product-docs-sync/SKILL.md
.github/skills/product-wiki/SKILL.md
.github/skills/review-pr-repo/SKILL.md
.github/skills/review-pr/SKILL.md
.github/skills/review-spec-repo/SKILL.md
.github/skills/review-spec/SKILL.md
.github/skills/security-review-pr/SKILL.md
.github/skills/security-review-spec/SKILL.md
.github/skills/triage-issue-repo/SKILL.md
.github/skills/triage-issue/SKILL.md
.github/skills/update-dedupe/SKILL.md
.github/skills/update-pr-review/SKILL.md
.github/skills/update-triage/SKILL.md

Metadata

Files
0
Version
d3fef11
Hash
9844b1ba
Indexed
2026-07-24 11:35

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-03 09:23
浙ICP备14020137号-1 $bản đồ khách truy cập$