Agent SkillsHashWarlock/nobody-plans-for-pi › nobody-uses-git-worktrees

nobody-uses-git-worktrees

GitHub

用于创建 Git Worktree 以隔离功能开发工作区,支持多分支并行。涵盖目录选择、Gitignore 安全验证、环境自动配置及基线测试,确保开发环境整洁与独立。

skills/nobody-uses-git-worktrees/SKILL.md HashWarlock/nobody-plans-for-pi

Trigger Scenarios

需要隔离当前工作区进行新功能开发 需要在同一仓库中同时处理多个分支

Install

npx skills add HashWarlock/nobody-plans-for-pi --skill nobody-uses-git-worktrees -g -y
More Options

Use without installing

npx skills use HashWarlock/nobody-plans-for-pi@nobody-uses-git-worktrees

指定 Agent (Claude Code)

npx skills add HashWarlock/nobody-plans-for-pi --skill nobody-uses-git-worktrees -a claude-code -g -y

安装 repo 全部 skill

npx skills add HashWarlock/nobody-plans-for-pi --all -g -y

预览 repo 内 skill

npx skills add HashWarlock/nobody-plans-for-pi --list

SKILL.md

Frontmatter
{
    "name": "nobody-uses-git-worktrees",
    "description": "Use when starting feature work that needs isolation from current workspace or before executing implementation plans"
}

Using Git Worktrees

Overview

Git worktrees create isolated workspaces sharing the same repository. Work on multiple branches simultaneously without switching.

Announce at start: "I'm using the nobody-uses-git-worktrees skill to set up an isolated workspace."

Directory Selection

Check in priority order:

  1. Existing directoryls -d .worktrees worktrees 2>/dev/null
  2. Project config — check AGENTS.md or project docs for preference
  3. Ask user — ".worktrees/ (hidden, project-local) or global location?"

Safety Verification

For project-local directories, verify they're gitignored:

git check-ignore -q .worktrees 2>/dev/null

If NOT ignored: add to .gitignore and commit before proceeding.

Creation Steps

# 1. Create worktree with new branch
git worktree add .worktrees/feature-name -b feature/feature-name

# 2. Enter workspace
cd .worktrees/feature-name

# 3. Run project setup (auto-detect)
[ -f package.json ] && npm install
[ -f requirements.txt ] && pip install -r requirements.txt
[ -f Cargo.toml ] && cargo build

# 4. Verify clean baseline
# Run project-appropriate test command

Report

Worktree ready at <full-path>
Tests passing (<N> tests, 0 failures)
Ready to implement <feature-name>

If tests fail: report failures, ask whether to proceed.

Cleanup

When done, use the nobody-finishes-a-development-branch skill, then:

git worktree remove .worktrees/feature-name

Red Flags

  • Creating worktree without verifying it's gitignored
  • Skipping baseline test verification
  • Proceeding with failing tests without asking
  • Hardcoding setup commands instead of auto-detecting

Version History

  • fc2edc0 Current 2026-07-25 05:06

Same Skill Collection

skills/nobody-brainstorms/SKILL.md
skills/nobody-debugs/SKILL.md
skills/nobody-executes-plans/SKILL.md
skills/nobody-finishes-a-development-branch/SKILL.md
skills/nobody-receives-code-review/SKILL.md
skills/nobody-requests-code-review/SKILL.md
skills/nobody-uses-tdd/SKILL.md
skills/nobody-verifies-before-completion/SKILL.md
skills/nobody-writes-plans/SKILL.md
skills/nobody-writes-skills/SKILL.md
skills/using-plans-for-nobody/SKILL.md

Metadata

Files
0
Version
fc2edc0
Hash
408d703d
Indexed
2026-07-25 05:06

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 10:33
浙ICP备14020137号-1 $Гость$