skills-experimental/git-worktree-agent/SKILL.md
Git worktree support for isolated agent workspaces. Each agent gets its own worktree branch, preventing conflicts in parallel multi-agent work. Use when: - Multiple agents working on the same repo simultaneously - Need isolated branch per agent task - Parallel feature development without conflicts - Agent needs clean working directory Keywords: worktree, git branch, isolated workspace, parallel agents, multi-agent git
npx skillsauth add bianhaifeng789-hue/openclaw-config git-worktree-agentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
基于 Claude Code worktree.ts 的 git worktree 隔离工作区,适配多 agent 并行开发场景。
type WorktreeSession = {
originalCwd: string // 主仓库路径
worktreePath: string // worktree 路径
worktreeName: string // worktree 名称(slug)
worktreeBranch?: string // worktree 分支名
originalBranch?: string // 主仓库原始分支
sessionId: string // 关联的 session ID
tmuxSessionName?: string // tmux session 名(可选)
creationDurationMs?: number
}
格式: [a-zA-Z0-9._-],每段不超过 64 字符
示例: "feature-auth", "fix-bug-123", "agent-task-abc"
分支名: worktrees/<slug>
路径: <repo>/../<repo>-worktrees/<slug>
createAgentWorktree(slug):
1. 验证 slug 格式
2. git worktree add <path> -b worktrees/<slug>
3. 软链接 node_modules(避免磁盘膨胀)
4. 复制 .claude/ 配置文件
5. 返回 worktreePath
removeAgentWorktree(slug):
1. git worktree remove <path> --force
2. git branch -D worktrees/<slug>
3. 清理残留文件
cleanupStaleAgentWorktrees():
扫描所有 worktrees/<slug> 分支
如果对应 session 已结束 → 删除 worktree
# 为 agent 任务创建隔离 worktree
create_agent_worktree() {
local slug=$1
local repo_root=$(git rev-parse --show-toplevel)
local worktree_path="${repo_root}/../$(basename $repo_root)-worktrees/${slug}"
local branch="worktrees/${slug}"
# 创建 worktree
git worktree add "$worktree_path" -b "$branch"
# 软链接 node_modules(避免重复安装)
if [ -d "$repo_root/node_modules" ]; then
ln -s "$repo_root/node_modules" "$worktree_path/node_modules"
fi
echo "$worktree_path"
}
// memory/worktree-sessions.json
{
"sessions": [
{
"slug": "feature-auth",
"worktreePath": "/path/to/repo-worktrees/feature-auth",
"branch": "worktrees/feature-auth",
"agentId": "agent-123",
"createdAt": "2026-04-13T18:00:00+08:00",
"status": "active"
}
]
}
用户: "用两个 agent 并行实现登录和注册功能"
1. 创建 worktree: worktrees/feature-login
2. 创建 worktree: worktrees/feature-register
3. Agent A 在 feature-login worktree 工作
4. Agent B 在 feature-register worktree 工作
5. 完成后 PR merge,清理 worktrees
| 特性 | Claude Code | OpenClaw 适配 | |------|-------------|---------------| | tmux 集成 | 每个 worktree 独立 tmux session | 不需要(无 TUI) | | sparse-checkout | 支持 sparsePaths 配置 | 不实现 | | 自动清理 | session 结束自动清理 | heartbeat 定期清理 | | 钩子 | worktreeCreate/Remove hooks | 不实现 |
business
IAA 日报飞书输出能力。 支持把固定 CSV 模板一键转换成: - 中文运营结论 - 飞书卡片 JSON - 飞书发送载荷 Use when: - 需要把 IAA 日报直接发到飞书 - 需要从 CSV 一键生成运营日报
data-ai
IAA日报分析模型 功能: - 渠道日报自动分析 - 小时级+日级ROI联动判断 - 按地区输出加量/降量/停投建议 - 按产品类型输出阈值 - 自动识别利润区/观察区/止损区 Use when: - 分析每天投放数据 - 生成运营日报结论 - 判断是否加量/降量/停投 - 对比美加澳/日韩表现 Keywords: - 日报模型, 投放日报, 加量, 降量, 停投, ROI日报, 分地区分析
data-ai
IAA固定日报分析模板 功能: - 固定字段模板(可直接贴每天数据) - 自动输出总盘结论 - 自动输出美加澳/日韩结论 - 自动给出加量/降量/停投建议 - 适配文件修复/清理两类产品 Use when: - 需要固定日报格式 - 每天复盘渠道表现 - 给运营团队出统一结论 Keywords: - 固定模板, 日报模板, ROI模板, IAA日报, 运营模板
development
# HyperlinkPool Pattern Skill HyperlinkPool Pattern - HyperlinkPool class + strings array + stringMap + Index 0 no hyperlink + intern(hyperlink) + get(id) + undefined handling + 5-minute reset + OSC8 hyperlink interning。 ## 功能概述 从Claude Code的ink/screen.ts提取的HyperlinkPool模式,用于OpenClaw的OSC8超链接池管理。 ## 核心机制 ### HyperlinkPool Class ```typescript export class HyperlinkPool { private strings: string[] = [''] // Index 0 = no hyperlink private stringMap = new Map<string, number>() // strings