Token导航 LogoToken导航TokenDH.com
运维和基础设施只读github未标认证来源可访问clear审计通过

create-worktree-skill创建工作树技能

Agent Skill

create-worktree-skill 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

196

周安装

8

GitHub Stars

1,373

下载量

63
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/disler/claude-code-hooks-multi-agent-observability --skill create-worktree-skill

简介

该技能用于创建配置完整的 git worktree,支持并行开发与隔离端口、数据库等资源。

  • 适用于同时处理多个分支、运行独立测试环境或开展隔离实验开发时。
  • 自动提取分支名、目录结构和资源配置,生成可立即使用的开发副本。
  • 安装方式:GitHub 仓库,使用 npx 命令添加;注意 Git 版本兼容性与文件系统权限。
  • create-worktree-skill 属于运维和基础设施类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Worktree Creator Skill

This skill enables creating fully configured git worktrees for parallel development with isolated ports, databases, and configuration.

When to use this skill

Use this skill when:

  • User asks to create a git worktree
  • User wants to set up parallel development environments
  • User needs to run multiple instances simultaneously
  • User mentions working on multiple branches at once
  • User wants isolated testing environments

Instructions

Step 1: Understand the request

Extract from the user's request:

  • Branch name (required): The git branch to create the worktree from

- If the branch name is not provided, stop and ask the user to provide a branch name

  • Port offset (optional): Custom port offset (if not provided, auto-calculated)

Step 2: Invoke the slash command

Use the SlashCommand tool to run:

/create_worktree_prompt <branch-name> [port-offset]

Examples:

  • /create_worktree_prompt feature-auth - Creates worktree with auto-calculated ports
  • /create_worktree_prompt fix-bug 2 - Creates worktree with port offset 2 (ports 4020, 5193)

Step 3: Share results

The /create_worktree_prompt command will:

  • Create the git worktree in trees/<branch-name>
  • Configure isolated ports (auto-incremented to avoid conflicts)
  • Set up environment files with proper configuration
  • Install dependencies for server and client
  • Start both services automatically
  • Provide access URLs and management instructions

Share the command output with the user, highlighting:

  • Access URLs for the dashboard
  • Ports being used
  • How to stop/restart the worktree
  • How to remove it later

Examples

Example 1: Simple worktree creation

User: "Create a worktree for the feature-dashboard branch"

Your response: Use SlashCommand to run /create_worktree_prompt feature-dashboard

Example 2: Worktree with specific port offset

User: "Set up a parallel environment on branch hotfix-security with port offset 5"

Your response: Use SlashCommand to run /create_worktree_prompt hotfix-security 5

Example 3: Multiple worktrees

User: "I need worktrees for branches: feature-a, feature-b, and feature-c"

Your response:

  1. Use SlashCommand to run /create_worktree_prompt feature-a
  2. Use SlashCommand to run /create_worktree_prompt feature-b
  3. Use SlashCommand to run /create_worktree_prompt feature-c

Each will automatically get unique ports (4010/5183, 4020/5193, 4030/5203).

Related capabilities

  • The created worktree will run automatically with isolated ports, database, and configuration
  • Each worktree is completely independent and can run simultaneously with others

Troubleshooting

If the command fails, common issues:

  • Branch name already exists as a worktree
  • Ports are in use (command kills them automatically)
  • Missing dependencies (ensure bun is installed)
  • Git worktree errors (handle uncommitted changes first)

The slash command provides detailed error messages and suggestions.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenCode

29.59%
按下载量换算19

Claude Code

23.63%
按下载量换算15

Antigravity

18.82%
按下载量换算12

windsurf

12%
按下载量换算8

Codex

7.03%
按下载量换算4

Gemini CLI

3.74%
按下载量换算2

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills