agentleFS
comkocscomkocs/md-workflow/.agents/skills/shared-checkout-safety/SKILL.md

shared-checkout-safety

Skill3 starsChanged 8 days agoApache-2.0View on GitHub

当几个窗口或子代理要在同一仓库上同时干活、要建工作树或临时验证树、要在别人也在用的检出上提交回退或推送、推送被拒、状态里冒出不是自己改的文件,或构建报文件被占用时使用。凡遇到这些情况,先读本 skill 再动手:一单一工作树,提交带路径,不用 reset --hard、add -A、--amend,推被拒先看头。

The file

Files
SKILL.md

这个 skill 是干什么的(人话)

这个 skill 帮你在多个窗口同时在同一份代码上干活时不互相踩。它教你每件活各开一个独立的工作目录、提交只带自己改的文件、推送被拒或要回退时先看清再动手。不用它,别人没提交的改动会被悄悄清掉,别人刚交的一笔会被顶掉,验证读到的其实是别人的代码。

分类

分类:单独装即可用

用前填这几个名字

  • {{代码仓路径}}:主代码仓在本机的主检出路径;例:~/work/demo-app
  • {{工作树根目录}}:一单一工作树统一放置的目录;例:~/work/_trees
  • {{代码托管远端}}:主代码仓的 git 远端名;例:origin
  • {{远端主支}}:远端主干分支的完整引用名;例:origin/main
  • {{拍板人}}:唯一有最终裁定权的人的称谓;例:产品负责人

什么时候用

  • 几个窗口或子代理要在同一个仓库上并行干活,准备开工建工作目录。
  • 要在一份不止自己在用的检出上提交、回退、推送或建临时验证树。
  • 推送被拒,或状态里冒出一批不是自己改的文件、像被人删了东西。
  • 要跑一段耗时的实机验证,或要清理一份共享检出。
  • 要起一个给别的任务长期用的本机服务或长跑进程;或构建突然全报文件被占用。
  • 接手一个模块的收口、或写「请开这些窗」清单之前。

步骤

  1. 对照「用前填这几个名字」,把正文里的双花括号名换成你们的实值来理解。
  2. 读本目录 references/shared-checkout-safety.md 照做。

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.