鱼皮AI导航
鱼皮AI导航
  • 主页
  • 社区
  • AI工具
  • AI知识库
  • AI提示词
  • MCP
  • Skills
  • AI学习资源
  • AI资讯
  • GitHub开源
登录/注册

create-worktree-skill

创建隔离的 Git 工作树以支持并行开发,自动配置独立端口、数据库和运行环境,实现多任务实例同时运行且互不干扰,适用于需要分支并发执行与测试的场景。

开发运维
访问 GitHub
文档Skills.MD
name
create-worktree-skill
description
Use when the user explicitly asks for a SKILL to create a worktree. If the user does not mention "skill" or explicitly request skill invocation, do NOT trigger this. Only use when user says things like "use a skill to create a worktree" or "invoke the worktree skill". Creates isolated git worktrees with parallel-running configuration.
allowed-tools
SlashCommand, Bash, Read, Write, Edit, Glob, Grep

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:

▼
text
复制代码
/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.

开发运维

快捷安装

复制到终端去安装 Skill

npxskillsadddisler/claude-code-hooks-multi-agent-observability--skill"create-worktree-skill"
站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
🔥热门工具
朱雀AI检测朱雀AI检测
朱雀AI检测助手朱雀AI检测助手
LovartLovart
老鱼简历老鱼简历
WritePass官网WritePass官网
面多多面多多
CursorCursor
星月写作星月写作
零感AI零感AI
墨得问题墨得问题
Skills 推荐
load-balancer-configurator
根据用户需求自动生成各类负载均衡器的生产级配置,覆盖 ALB、NLB、Nginx 和 HAProxy 等主流类型,适配不同协议、端口、健康检查及后端服务拓扑,支持直接集成到基础设施即代码流程中。
implement
实现 Linus Dashboard 的功能开发与集成,基于 TypeScript 和 Python 构建前后端组件,遵循严格的代码规范与架构模式,完成视图、卡片、服务及传感器等模块的创建与验证,确保高质量交付并兼容 Home Assistant 生态。
cloud-scheduler-job-creator
自动处理 Google Cloud Platform 中的云调度任务创建,提供符合最佳实践的配置方案与生产级代码生成,支持计算、存储、大数据及机器学习服务的集成部署。
sagemaker-endpoint-deployer
自动化部署机器学习模型至云端服务端点,支持从配置生成到生产验证的全流程,适用于模型上线、服务监控与推理优化等场景,确保部署方案符合工业级标准。
axiom-performance-profiling
通过系统化分析移动应用性能瓶颈,实现对CPU占用、内存增长、数据加载延迟及电池消耗的精准诊断。结合真实场景决策树与深度调优流程,在高压环境下区分表象与根源问题,避免无效优化,确保用户体验与系统资源的平衡。