configure-workspaces
它能做什么
它读取你的项目,并编写工作区设置文件,告诉 HumanLayer 如何构建工作树。适用于在 git 仓库中运行 HumanLayer 任务的开发者。
适用场景
- ✓当你第一次为某个仓库设置 HumanLayer 时。
- ✓当新任务无法创建工作树,需要修复配置时。
- ✓当你希望把团队共享设置与自己机器上的个人覆盖设置分开时。
技能链接
https://github.com/humanlayer/humanlayer/blob/main/apps/riptide-rpi-claude-plugin/skills/configure-workspaces/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请为这个仓库设置 HumanLayer 工作区配置,让新任务能正确创建工作树。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会读取项目,提出一份简短的配置方案,并在你批准后写入共享文件和本地文件。然后它会检查这些文件是否有效。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Purpose
This skill reads the project, proposes a concise workspace configuration, writes the approved files, and validates them.
The workspace config files control how worktrees are created when tasks use workspaceTiming = now in the Riptide task creation UI:
.humanlayer/workspace.json— shared team configuration, safe to commit.humanlayer/workspace.local.json— machine-specific overrides, gitignored
Use plain, brief language. State each point as one human speaking to another.
Steps to follow
<step index=0>Step 0: Select the repository
Check the current directory and home directory:
Bash(pwd)
Bash(printf '%s\n' "$HOME")
Bash(git rev-parse --show-toplevel)
If git rev-parse succeeds, use that repository root as the working directory. State the path in one short sentence.
If the current directory is the home directory and it is not inside a Git repository, ask one question:
Which repository should I configure? Send its path.
Use the same question when the current directory is not a Git repository. After the user gives a path, confirm it with git -C <path> rev-parse --show-toplevel and use the returned root.
Step 1: Read the project
Read any existing workspace config files:
Read(.humanlayer/workspace.json)
Read(.humanlayer/workspace.local.json)
Run all file reads and commands from the selected repository root.
Check for coordination-repo signals (Claude config, additional sibling repos):
Read(.claude/settings.json)
Bash(ls -la ../)
Read(package.json)
Read(Makefile)
Read(README.md)
Bash(git remote -v)
Use an existing workspace config as the starting point. Infer changes from the repository and the user's request.
</step> <step index=2>Step 2: Build the proposal
Infer a complete proposal from project files and common defaults.
- Use a single-repository config unless the project clearly coordinates related sibling repositories.
- For one repository, use
{ "localPath": ".", "primary": true }. - For multiple repositories, include the related paths and mark exactly one primary repository.
- Prefer the repository with the team's central Claude settings, MCP config, or agent policy as primary.
- Use
~/.humanlayer/workspaces/{{ TASKSLUG }}/{{ REPOBASENAME }}as the default path template. - Use
origin/mainas the default source ref, or whatever default remote the user prefers (e.g. upstream/main - if there are multiple remotes, ask) - Infer a setup command from project scripts, package manager files, the Makefile, and the README.
- Include local files that exist and are useful in a worktree, such as
.env,.env.local,.env.development.local,.claude/settings.local.json, and.humanlayer/workspace.local.json. - Put machine-specific values in
.humanlayer/workspace.local.json.
For multi-repository workspaces:
- Sessions in the workspace launch in the primary repo's worktree by default.
- Skills and instruction files (
CLAUDE.md/AGENTS.md) are loaded from all repos in the workspace. - Repo-local
.claude/settings*.json/ MCP-style configuration only governs sessions launched from a repo — so the repo holding the team's central Claude settings, MCP config, or agent policy should usually be primary.
The first response after project inspection must show the proposed .humanlayer/workspace.json as a fenced json block. If local overrides are useful, show .humanlayer/workspace.local.json in a second fenced json block. End with one short line:
Tell me what to change, or approve this config.
When the user gives feedback, update and print the complete proposed JSON again.
</step> <step index=3>Step 3: Validate the proposal
Validate the proposed config before asking for approval.
For single-repo projects, workspace.json looks like:
{
"disabled": false,
"pathTemplate": "~/.humanlayer/workspaces/{{ TASKSLUG }}/{{ REPOBASENAME }}",
"branchTemplate": "{{ TASKSLUG }}",
"sourceRef": "origin/main",
"setupCommand": "",
"copyGlobs": [
".env",
".env.local",
".env.development.local",
".claude/settings.local.json",
".humanlayer/workspace.local.json"
],
"repos": [
{
"localPath": ".",
"description": "Selected repository",
"primary": true
}
]
}
For multi-repo projects (coordination repos), workspace.json looks like:
{
"disabled": false,
"pathTemplate": "~/.humanlayer/workspaces/{{ TASKSLUG }}/{{
常见问题
它会创建哪些文件?
它会创建可以提交的共享文件 workspace.json,以及不纳入 git 的本地文件 workspace.local.json,用于存放机器专属设置。
它会配置哪个仓库?
它使用当前的 git 仓库。如果找不到,它会请你提供路径。
它会不问就写文件吗?
不会。它会先提出配置方案,只有在你批准后才会写入文件。
详情
作者的原始描述
Propose and generate workspace configuration files (.humanlayer/workspace.json and .humanlayer/workspace.local.json) for a repository
repo: humanlayer/humanlayer
热度
- GitHub 星标
- 13k
- 排名
- #11396
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
asd-ste100
13k教你的智能体把难懂的英文改写成短句、每句只有一个意思,方便人和其他软件阅读。
better-github-skill
13k帮你的智能体查看拉取请求的状态、阅读其审查评论,并借助现成的 GitHub 脚本找出 CI 构建失败的原因。
calldiff
13k帮你的智能体比较代码库中两个 git 版本之间的函数调用链,让代码审查能看出行为发生了什么变化。
chrome-devtools-cli
13k帮你的智能体通过终端控制 Chrome,打开页面、点击、填写表单,并截取页面快照,用于浏览器自动化和测试。