workspace-orchestration
它能做什么
这项技能使用带编号的槽位管理共享工作区,每项任务在修改代码前先认领一个空闲槽位。适合在同一个项目中运行多个并行任务的人。
适用场景
- ✓当你在 docko 工作区的 slots 文件夹中处理文件时。
- ✓当你希望任务在开始编辑前先认领一个空闲槽位时。
- ✓当你需要查看哪些槽位正在使用,或释放已完成的槽位的时候。
技能链接
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/workspace-orchestration/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请为我的登录问题修复认领一个空闲槽位,并告诉我分到了哪一个。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体使用 docko 命令为某个分支和任务获取或认领槽位,在工作时保持认领有效,完成后再释放。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
docko Workspace Orchestration
Use this skill whenever work touches files in slots/ or when the user asks about workspace coordination.
Quick Path
- Run
/dock-statusordocko status --brief. docko walks up to the workspace root on its own, so this works from inside a slot; pass--root <workspace>only from outside the workspace. - Pass
--session "$DOCKO_SESSION_ID"on every claim, heartbeat, and release. The SessionStart hook exports it for this session. - Prefer
docko slot acquire --session "$DOCKO_SESSION_ID" --branch <branch> --task "<task>" --briefwhen you want docko to pick a slot. Selection is round-robin, starting after the last slot claimed for that application. - In a workspace with several applications, pass
--application <id>so the pick stays inside the right pool. - Add
--prefer <slot-id>when a specific slot is the right one (it already has the branch, say). docko takes it when free and rotates normally when it is not. - If every slot is busy and docko asks whether it should create a fresh managed clone, answer explicitly.
- Use
docko claim --session "$DOCKO_SESSION_ID" --resource slot --id <slot> --branch <branch> --task "<task>"only when you already know the exact slot. - Do the work inside that slot. On long-running work, keep the claim fresh:
docko heartbeat --session "$DOCKO_SESSION_ID" --resource slot --id <slot> - Release the slot when done:
docko release --session "$DOCKO_SESSION_ID" --resource slot --id <slot>
Prefer slash commands when installed:
/dock-status/dock-claim <slot> <branch> <task>/dock-heartbeat <slot>/dock-release <slot>/dock-doctor
Rules
- Work from the root. Edit code in
slots/*. - If
$DOCKO_SESSION_IDis empty (plugin hooks not installed, or a different runtime), stop before the first claim and resolve a real session id — never run claim or heartbeat with an empty--session. Usedocko session list --briefordocko session currentto pick one. - Never invent a session id. The PreToolUse hook checks the runtime's own session, so a made-up id claims a slot that then blocks your own writes. Use
$DOCKO_SESSION_ID, or an id fromdocko session list --brief. branchis claim metadata. docko records it and never runsgit checkout.- Claims are slot-scoped. Two sessions cannot share a slot, and one claim does not reserve a branch, a PR, or a file.
- If a parent session already owns the slot, reuse that authority instead of creating a second claim.
- Subagents started with the Agent tool share the parent's session id, so they inherit the parent's claim and need no docko call. A separately launched
claudeprocess gets its own session id and must be delegated:docko delegate --session <owner> --child-session <child> --resource slot --id <slot>. - If docko reports
AMBIGUOUS_SESSION, run thesuggested_commandfrom the error payload, or retry with an explicit--session <id>fromdocko session list --brief; do not end existing sessions unless the user asked for cleanup. - If a write is blocked, read the deny message: it names the slot, the reason (
slot-not-claimed,claim-expired,unrelated-session) and the exact command that fixes it. - If every slot is busy and the user already approved the fallback, add
--clone-when-busytodocko slot acquire. - If
dockois not runnable, checkDOCKO_BIN. If it still fails, stop and tell the user. - Do not inspect slots one by one or replace the CLI with
docko/registry.jsonduring normal work. Usedocko status --brief --claimedinstead.
常见问题
什么是槽位?
槽位是工作区中的一个独立工作区域,同一时间只能由一个任务使用,并由工作区工具进行跟踪。
没有认领我能在槽位中编辑文件吗?
不能。这项技能规定,在槽位中编辑代码需要有效的认领。
如果所有槽位都被占用怎么办?
docko 可能会询问是否创建新的托管克隆,智能体被要求明确回答这个问题。
详情
作者的原始描述
Use when working in a persistent-slot workspace that uses docko. Covers slot claims, delegated teammate inheritance, and the rule that code edits inside slots/ require an active claim.
热度
- GitHub 星标
- 33k
- 排名
- #8813
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
owasp-security
33k教你的智能体掌握面向网页应用、API、移动端、容器和 AI 智能体的 OWASP 安全指南,以便发现常见弱点并提出修复建议。
agent-management
33k让你的智能体使用 AI Maestro 命令行工具创建、列出、休眠、唤醒、重命名和删除 AI 智能体,管理每个智能体的生命周期。
agent-messaging
33k让你的智能体使用智能体消息协议,在 AI 智能体之间发送、接收和回复带签名的消息,大部分在你自己的电脑上完成。
docs-search
33k让你的智能体搜索自动生成的代码文档,查找函数签名、类定义和注释,从而在修改代码之前核对真实的 API。