Token导航 LogoToken导航

Agent Skill · 研究检索

sc-worktree(SC 工作树)

sc-worktree 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

sc-worktree 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证为 MIT,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 49,936。

总安装 635周安装 27GitHub Stars 17下载 222核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:sc-worktree(SC 工作树)
来源仓库:https://github.com/tony363/superclaude
仓库路径:skills/sc-worktree
安装命令:
npx skills add https://github.com/tony363/superclaude --skill sc-worktree
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/tony363/superclaude --skill sc-worktree

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

sc-worktree 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。适用于需要根据关键词或任务场景从来源线索中筛选信息的场景。通过 npx skills add 命令从指定 GitHub 仓库安装使用。

安装前建议确认权限范围、维护状态及是否触发联网或文件操作。可结合原始 README 进一步核验具体功能和使用方法。

来源仓库内路径:skills/sc-worktree

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/tony363/superclaude --skill sc-worktree;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

sc-worktree 怎么安装?

在终端执行 npx skills add https://github.com/tony363/superclaude --skill sc-worktree。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

sc-worktree 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

sc-worktree 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/tony363/superclaude --skill sc-worktree;npx skills add tony363/superclaude --skill "sc-worktree" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

sc-worktree 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

sc-worktree 用的人多吗?

公开数据是累计安装 635 次,近一周安装 27 次,下载 222 次,GitHub 17 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

sc-worktree 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
sc-worktree

SC 工作树 · 本页

63517执行命令MIT未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Worktree Management Skill

Git worktree isolation for parallel agent development with simple, safe workflows.

Quick Start

# Create isolated worktree for a task
/sc:worktree create feature-auth

# List all active worktrees
/sc:worktree list

# Propose changes for human review
/sc:worktree propose feature-auth

# Clean up stale worktrees
/sc:worktree cleanup

Behavioral Flow

  1. Create - Initialize isolated worktree with unique naming
  2. Validate - Preflight checks (clean repo, no conflicts)
  3. Assign - Spawn subagent with CWD set to worktree
  4. Work - Agent operates in isolation, commits to branch
  5. Propose - Push branch and create PR for human review
  6. Cleanup - Remove merged/stale worktrees

Commands

CommandPurposeGit Operations
create <task-id>Create isolated worktreegit worktree add -b wt/<task>
listShow all active worktreesgit worktree list
status <task-id>Check worktree stategit status, git log
cleanup [--all]Remove stale worktreesgit worktree remove, prune
propose <task-id>Create PR for human reviewgit push, gh pr create

Flags

FlagTypeDefaultDescription
--commitsbooltrueAgent commits directly to branch
--patchesboolfalseAgent produces patch files only
--run-testsboolfalseRun tests before proposing
--forceboolfalseOverride existing worktree/branch
--basestringmainBase branch for worktree

Evidence Requirements

This skill does NOT require hard evidence. Worktree operations are self-documenting through:

  • Git worktree list output
  • Branch history
  • PR creation confirmation

Naming Convention

Worktrees use deterministic naming to prevent collisions:

Path:   .worktrees/<task-id>/
Branch: wt/<task-id>

Example:

Path:   .worktrees/feature-auth/
Branch: wt/feature-auth

Operations

Create Worktree

/sc:worktree create feature-auth

# Executes:
# 1. mkdir -p .worktrees
# 2. git worktree add -b wt/feature-auth .worktrees/feature-auth
# 3. Returns worktree path for subagent CWD

List Worktrees

/sc:worktree list

# Shows:
# - Active worktrees
# - Associated branches
# - Last commit info

Check Status

/sc:worktree status feature-auth

# Shows:
# - Uncommitted changes
# - Commits ahead of base branch
# - Conflict warnings

Propose Changes

/sc:worktree propose feature-auth

# Executes:
# 1. git push -u origin wt/feature-auth
# 2. gh pr create --title "feat: feature-auth" --body "..."
# 3. Returns PR URL for human review

Cleanup Worktrees

/sc:worktree cleanup          # Remove merged worktrees
/sc:worktree cleanup --all    # Remove ALL worktrees
/sc:worktree cleanup feature-auth  # Remove specific worktree

# Executes:
# 1. git worktree remove .worktrees/<task-id>
# 2. git branch -d wt/<task-id>
# 3. git worktree prune

Subagent Integration

When spawning a subagent to work in a worktree:

# 1. Create worktree
/sc:worktree create feature-auth

# 2. Spawn subagent with CWD
Task(
    prompt="Implement JWT authentication",
    subagent_type="general-purpose",
    # CWD implicitly set to .worktrees/feature-auth/
)

# 3. Agent works in isolation
# - All file operations scoped to worktree
# - Commits go to wt/feature-auth branch

# 4. Propose for review
/sc:worktree propose feature-auth

Preflight Checks

Before creating a worktree, the skill validates:

  1. Repository State

- Repo is clean OR --force flag provided - Main branch is up to date

  1. Branch Availability

- wt/<task-id> branch doesn't exist OR explicit reuse - No conflicting remote branch

  1. Path Availability

- .worktrees/<task-id> doesn't exist OR --force flag

Conflict Detection

Before proposing, the skill checks for conflicts:

# Fetch latest changes
git fetch origin main

# Check if worktree is behind
git merge-base --is-ancestor origin/main HEAD

# Warn but don't block if behind
# Human reviewer handles merge strategy

Examples

Single Agent Workflow

# Create worktree
/sc:worktree create add-logging

# Work in worktree (agent operates here)
# ... agent makes changes, commits ...

# Propose changes
/sc:worktree propose add-logging

# Human reviews PR, merges

# Cleanup
/sc:worktree cleanup add-logging

Parallel Multi-Agent Workflow

# Orchestrator creates multiple worktrees
/sc:worktree create feature-auth
/sc:worktree create feature-logging
/sc:worktree create feature-metrics

# Spawn agents in parallel (each with own worktree)
# Agent A -> .worktrees/feature-auth/
# Agent B -> .worktrees/feature-logging/
# Agent C -> .worktrees/feature-metrics/

# Propose all changes
/sc:worktree propose feature-auth
/sc:worktree propose feature-logging
/sc:worktree propose feature-metrics

# Human reviews 3 PRs, merges sequentially

# Cleanup all
/sc:worktree cleanup --all

Patch Mode (No Direct Commits)

/sc:worktree create refactor-api --patches

# Agent produces .patch files instead of commits
# Orchestrator reviews patches before applying

/sc:worktree propose refactor-api  # Creates PR from patches

MCP Integration

PAL MCP (Validation & Review)

ToolWhen to UsePurpose
mcp__pal__precommitBefore proposeValidate changes in worktree
mcp__pal__codereviewBefore proposeReview worktree changes
mcp__pal__consensusConflict resolutionMulti-model merge strategy

PAL Usage Patterns

# Validate worktree changes before proposing
mcp__pal__precommit(
    path=".worktrees/feature-auth",
    step="Validating worktree changes",
    findings="Security, test coverage, completeness",
    compare_to="main"
)

# Review worktree branch
mcp__pal__codereview(
    review_type="full",
    step="Reviewing feature-auth worktree",
    relevant_files=[".worktrees/feature-auth/src/auth.py"]
)

Rube MCP (Automation & Notifications)

ToolWhen to UsePurpose
mcp__rube__RUBE_SEARCH_TOOLSGitHub integrationFind PR tools
mcp__rube__RUBE_MULTI_EXECUTE_TOOLPropose commandCreate PR, notify team

Rube Usage Patterns

# Create PR and notify team
mcp__rube__RUBE_MULTI_EXECUTE_TOOL(tools=[
    {"tool_slug": "GITHUB_CREATE_PULL_REQUEST", "arguments": {
        "repo": "myapp",
        "title": "feat: feature-auth from worktree",
        "body": "## Worktree: feature-auth\nCreated via /sc:worktree",
        "base": "main",
        "head": "wt/feature-auth"
    }},
    {"tool_slug": "SLACK_SEND_MESSAGE", "arguments": {
        "channel": "#pull-requests",
        "text": "New PR from worktree: wt/feature-auth"
    }}
])

Flags (Extended)

FlagTypeDefaultDescription
--pal-reviewboolfalseUse PAL codereview before propose
--create-prbooltrueCreate GitHub PR via Rube
--notifystring-Notify via Rube (slack, teams)
--draftboolfalseCreate draft PR

Tool Coordination

  • Bash - Git worktree commands, directory operations
  • Read - Check worktree status and logs
  • Task - Spawn subagents with worktree CWD
  • PAL MCP - Pre-propose validation, code review
  • Rube MCP - PR creation, team notifications

Safety Guarantees

  1. Isolation - Each worktree has separate working directory
  2. No Auto-Merge - Human review required for all merges
  3. Unique Naming - Deterministic paths prevent collisions
  4. Crash-Safe - cleanup --all removes stale worktrees
  5. Warning-Only Conflicts - Conflicts warn but don't block

Limitations

  • No automatic quality scoring (use CI/tests)
  • No lease tracking (periodic cleanup instead)
  • No sophisticated conflict resolution (human review)
  • No auto-merge to main (PR-based workflow)

平台分布

Codex

25.22%
按下载量换算56

Claude Code

22.72%
按下载量换算50

windsurf

18.08%
按下载量换算40

trae

11.67%
按下载量换算26

OpenCode

8.4%
按下载量换算19

Cursor

3.18%
按下载量换算7

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/tony363/superclaude --skill sc-worktree;npx skills add tony363/superclaude --skill "sc-worktree" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills