본문으로 건너뛰기
cccskills
무료GitHub에 공개

setup-worktree

Prepare Git worktrees, separate working directories for task branches, using shared settings and local overrides. Copy configured files, run setup commands, and coordinate multiple repositories so implementation can begin in the prepared workspace.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Only use when the user explicitly invokes this skill by name.

실행 점수 미검증

설치 방법 보기

이럴 때 유용합니다

  • Prepare a separate working directory for a task
  • Copy environment files and local settings
  • Coordinate worktrees across multiple repositories
  • Carry existing setup script conventions into configuration

포함된 파일(1)

  • SKILL.md6.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

steps to follow

<step index=0>

Step 0: Check if worktree setup should be skipped

First, check if workspace setup is disabled via config files:

Read(.humanlayer/workspace.json)
Read(.humanlayer/workspace.local.json)
<condition if="disabled is true (workspace.local.json takes precedence over workspace.json)"> Worktree setup is disabled for this project.

Output this final answer instead of proceeding:

First, check out the task branch for the user:

Bash(git checkout -b [BRANCHNAME])

Then output this final answer:

<output_example> Workspace setup is disabled for this project (via .humanlayer/workspace.json or .humanlayer/workspace.local.json).

I've checked out branch [BRANCHNAME] for you. To start implementation, use the button below or create a new session with the following command:

/rpi:implement-outline

If you really do want to create a worktree anyway, let me know and I can still help with that.

To re-enable workspace setup, edit the file that sets disabled: true and change it to false, or add "disabled": false to .humanlayer/workspace.local.json to override the shared config. </output_example>

Do NOT proceed to Step 1 unless the user explicitly confirms they want to create a worktree anyway. </condition>

Next, check if you're already in a git worktree:

Bash(git rev-parse --git-dir)
<condition if="output contains '.git/worktrees/'"> You are already inside a worktree. Creating another worktree from here is probably not what the user wants.

Output this final answer instead of proceeding:

<output_example> You're already in a worktree at [current directory].

To start implementation, use the button below or create a new session with the following command:

/rpi:implement-outline

If you really do want to create a new worktree from here, let me know and I can still help with that. </output_example>

Do NOT proceed to Step 1 unless the user explicitly confirms they want to create a worktree anyway. </condition>

</step> <step index=1>

Step 1 Get required information

  1. Figure out what task you're working on - you should have the slug to .humanlayer/tasks/TASKSLUG already

1a. once you have a task dir, read ticket.md (or task.md) and outline.md if present:

Read(.humanlayer/tasks/TASKSLUG/ticket.md)   # or task.md
Read(.humanlayer/tasks/TASKSLUG/...outline...md)
</step> <step index=2 only_if="no .humanlayer/workspace.json or .humanlayer/workspace.local.json was found">

First, check for the legacy create_worktree.sh script to see if the user has existing preferences

Read(scripts/create_worktree.sh)
<subcondition if="script not exists"> If no script is found, create a new `.humanlayer/workspace.json` with the following default content:
{
  "disabled": false,
  "pathTemplate": "~/.humanlayer/workspaces/{{ TASKSLUG }}/{{ REPOBASENAME }}",
  "branchTemplate": "{{ TASKSLUG }}",
  "repos": [
    {
      "localPath": ".",
      "description": "Selected repository",
      "sourceRef": "HEAD",
      "setupCommand": "",
      "copyGlobs": [
          ".env*",
          ".claude/settings.local.json",
          "CLAUDE.local.md",
          ".humanlayer/workspace.local.json"
      ]
    }
  ]
}
</subcondition> <subcondition if="script exists"> If the create_worktree.sh script exists, create a new `.humanlayer/workspace.json` matching the conventions in the script, including copyGlobs, setupCommand, etc. </subcondition>

Note: For multi-repo setups, add additional entries to repos[] with relative paths like "localPath": "../other-repo". The localPath: "." entry is required and becomes the primary working directory.

If the user wants more control over the workspace configuration (custom paths, setup commands, multi-repo coordination), they can use the rpi:configure-workspaces skill to interactively set it up.

</step> <step index=3>

Create the worktree according to .humanlayer/workspace.json and .humanlayer/workspace.local.json, taking the workspace.local.json as overrides for the workspace.json config.

REPOBASENAME is the basename of the repository, e.g. ~/repos/humanlayer -> humanlayer

<loop for="each repo in repos"> <step index=3.1> Create the worktree for the repository
```
Bash(git worktree add -b {{ branchTemplate(TASKSLUG) }} {{ pathTemplate(TASKSLUG, REPOBASENAME) }} {{ sourceRef }})
```
</step> <step index=3.2> Copy the files matching the patterns specified in the `copyGlobs` key of `.humanlayer/workspace.json` (and overridden by `.humanlayer/workspace.local.json`, if present) from the repository root into the new worktree directory (computed by pathTemplate)
```bash
ls -la [REPO_ROOT]/[glob-pattern]
```

For each matched file, preserve directory structure when copying:

```bash
mkdir -p [WORKTREE_FULL_PATH]/[parent-dir]
cp [matched-file] [WORKTREE_FULL_PATH]/[same-relative-path]
```

For example, `.claude/settings.local.json` → `[WORKTREE_FULL_PATH]/.claude/settings.local.json`
</step> <step index=3.3> Then run the setup command specified in the `setupCommand` key of `.humanlayer/workspace.json` (and overridden by `.humanlayer/workspace.local.json`, if present) in the new worktree directory.
```
cd [WORKTREE_FULL_PATH] && [setup-command]
```
</step> </loop>

If there are any error messages or failures, report the error to the user and work with the user to complete the setup

don't proceed to step 4 until the worktrees are created and setup is complete

</step> <step index=4>

Only output this if the worktree(s) were successfully created.

If you encountered an error in Step 3, do NOT output this section.

<output_example> Worktree for {{ TASKSLUG }} has been configured. You can start implementation by running

use the rpi:implement-outline skill for task .humanlayer/tasks/{{ TASKSLUG }}

in the [WORKTREE_FULL_PATH] directory

You can modify worktree behavior by editing the .humanlayer/workspace.json (committed, shared config) and .humanlayer/workspace.local.json (local overrides, gitignored) files.

</output_example>

</step>

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Automate website navigation, form entry, and clicks through a browser command line tool. Extract page text, capture screenshots, and compare page states to check interactions or test web app behavior across screen sizes.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Automate form entry and button clicks
  • Extract text from web pages
  • Save page screenshots and PDFs
humanlayer/humanlayer1.2만2026년 10월 23일 업데이트

Rewrite dense or ambiguous English into short, direct sentences using principles from ASD-STE100, a standard for clear technical English. It preserves facts and conditions, identifies writing issues, and shows the original and revised text side by side.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Clarifying English instructions for another agent
  • Simplifying English tool descriptions and error messages
  • Making English easier for non-native readers
humanlayer/humanlayer1.2만2026년 10월 23일 업데이트

Inspect GitHub pull requests, read review conversations, and investigate failed automated checks with dedicated scripts. Get consolidated status reports, unresolved discussion threads, and failing job or step logs, with full logs saved for further inspection.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Checking pull request status in one report
  • Reading unresolved review conversations
  • Investigating failed CI jobs and steps
humanlayer/humanlayer1.2만2026년 10월 23일 업데이트

Update release base versions for supported packages, keep matching version fields in sync, and verify generated versions. The workflow covers committing and pushing the changes, with guidance for release steps after merging.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Prepare a package version update for release
  • Synchronize version fields across related files
  • Verify generated versions before pushing
humanlayer/humanlayer1.2만2026년 10월 23일 업데이트

calldiff

무료

Compare function call structures across Git commits, branches, or working files to support code review. Display call trees and trace paths from an entry function to a target function, with support for 22 languages.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Compare function calls before and after a change
  • Review call structure changes between branches
  • Trace paths from an entry function to a target
humanlayer/humanlayer1.2만2026년 10월 23일 업데이트

Automate browser tasks from the terminal using the chrome-devtools-mcp CLI. Inspect page elements, click and fill forms, navigate tabs, capture screenshots, and investigate network requests, console messages, performance, and memory through shell commands.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Automating form input and page navigation
  • Capturing page or element screenshots
  • Investigating network requests and console errors
humanlayer/humanlayer1.2만2026년 10월 23일 업데이트

humanlayer의 스킬 모두 보기

이 스킬의 문제 신고