ccoalm/ccl-skills / skills/worktree-isolation
worktree-isolation
Unverified开工前先在独立 git worktree 里再改代码——**绝不在 main(主检出/main 分支)上开发**,任何迭代/功能/哪怕一行修改都先建分支+worktree(并发只是让这条更刚性,单人单线同样适用);worktree 集成回目标分支后立即清理 worktree+本地分支+远端分支(让位见收尾节)。Never develop on the main checkout/branch — always create a dedicated worktree first (concurrency only makes it stricter, not a precondition); also covers teardown/cleanup when a worktree is integrated. 触发:凡要动代码,动手前先过本技能 Step 0(由 owner 在其实现阶段调用,本技能不抢交付入口)、并行做两个版本、改 ccl-skills 等共享仓库、被隔离闸 deny、worktree 干完要清理时。Skip when:交付级的重新开发/推倒重来/清除代码重来("之前那版不要了,重新开发")先回 product-rd-workflow 重新分类+重建计划——本技能只管 worktree 机制,不替代交付重入决定;product-rd 重入后仍按本技能 Step 0 先建 worktree 再动手,绝不在 main 上重写。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 13.6 KB |
| agents/openai.yaml | config | 261 B |
| references/hook-authorization.md | markdown | 1.7 KB |
| references/merge-and-teardown.md | markdown | 18.9 KB |
| references/pre-merge-landing-checks.md | markdown | 8.3 KB |
| references/shared-branch-rebase.md | markdown | 2.2 KB |
| scripts/AGENTS.md | markdown | 1007 B |
| scripts/test_worktree_status.shexecutable | script | 8.4 KB |
| scripts/test_worktree_sweep.shexecutable | script | 27.0 KB |
| scripts/worktree-status.shexecutable | script | 13.4 KB |
| scripts/worktree-sweep.shexecutable | script | 12.7 KB |
references/hook-authorization.md
View on GitHub# Hook 合并授权
以下执行额度规则受 [合并执行协议](../SKILL.md) 的目标授权、验证和安全边界约束。`hooks/merge-authorization-prompt.sh` 从用户指令生成额度,`hooks/guard-merge-authorization.sh` 在平台合并命令放行时消费额度。
## 指令与有效期
支持原有单独“合并/merge”和“批量合并 N”,另支持完整单行“完成并合并 PR #123 / MR !123”(英文 `finish and merge PR #123`)。原有单次/计数额度仍被任何新消息清除。宿主的后台任务完成通知也经由提交提示的通道送达,且没有能区分来源的字段,所以同样清除额度(但从不生成额度)。获授权后连续合并时,等 CI 用前台等待(如 `gh pr checks <编号> --watch`),别用后台任务或监视器,免得完成通知在两次合并之间清掉剩余额度。
新形式只绑定当前 `origin` 仓库和指定编号,原始 60 分钟内消费一次;单独“继续/继续吧/进度/状态/continue/status/progress”保留原额度和到期时间,“停止/停一下/不要合并/撤销合并授权/stop/pause/cancel merge”撤销,其他消息暂停机械额度,之后“继续”不能恢复。
## 执行命令
带 `-h/--help` 的 `glab mr merge` / `gh pr merge` 只打印帮助,闸会拒绝且不消费额度;查看帮助用 `glab help mr merge` 或 `gh help pr merge`。
新形式的执行命令必须是单条直接 `gh pr merge` 或 `glab mr merge`,显式编号;gh 使用 `--repo host/owner/repo` 并指定策略,glab 使用 `--repo https://host/namespace/repo` 并指定 `--auto-merge=false --yes`,可附完整 head SHA,其他参数和 API 形式保持未核验。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |