repo-detach-reset
克隆仓库去关联与历史重置协议。用于将克隆或 Fork 的仓库转换为独立 DIY 仓库:检查许可约束、切断与原仓库连接、重建 git 历史、隔离工作流与部署入口。涉及破坏性操作时必须先给方案并等待用户明确授权。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
克隆仓库去关联与历史重置协议。用于将克隆或 Fork 的仓库转换为独立 DIY 仓库:检查许可约束、切断与原仓库连接、重建 git 历史、隔离工作流与部署入口。涉及破坏性操作时必须先给方案并等待用户明确授权。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
高级技术架构师开发协议,强制执行"先谋后动"工作流。当用户提出代码修改、bug 调试、commit 生成、分支合并、文档更新、版本发布等需求时自动应用。禁止直接编码,必须先给方案等待授权。
高级技术架构师开发协议,强制执行“先谋后动”工作流。Use when Codex needs to handle code changes, bug debugging, commit message generation, branch merge or sync, documentation updates, release preparation, or fork-repo initialization in this project. For any write or destructive operation, present a plan first and wait for explicit user authorization.
克隆仓库去关联与历史重置协议。Use when Codex needs to convert a cloned or forked repository into an independent project by checking license obligations, removing upstream or origin links, rebuilding git history, and isolating workflows or deployment pipelines. For any destructive step, present the plan first and wait for explicit user authorization.
| name | repo-detach-reset |
| description | 克隆仓库去关联与历史重置协议。用于将克隆或 Fork 的仓库转换为独立 DIY 仓库:检查许可约束、切断与原仓库连接、重建 git 历史、隔离工作流与部署入口。涉及破坏性操作时必须先给方案并等待用户明确授权。 |
| user-invocable | false |
当用户提出以下需求时启用本 skill:
禁止未授权直接执行破坏性操作:必须先给方案并等待用户明确授权(如“执行”“开始处理”)。
必须先做许可检查:
LICENSE、COPYING、NOTICE,先识别许可证类型再决定是否可删除。必须先做可回滚备份:
.git 目录。禁止使用 rm 删除文件:必须使用 trash。
git rev-parse --is-inside-work-treegit branch --show-currentgit status --shortgit remote -vgit config --get remote.origin.urlrg --files | rg '^(LICENSE|COPYING|NOTICE|README(\\..+)?)$'rg --files .github/workflowsrg -n 'docker|deploy|release|workflow_dispatch|repository_dispatch' .github/workflows || true向用户明确说明:
.git:
ts=$(date +%Y%m%d-%H%M%S); cp -R .git ../.git-backup-$tsupstream(若存在):
git remote remove upstreamorigin(若存在):
git remote remove origin.git 放入废纸篓:
trash .gitgit initgit add -Agit commit -m "chore: initialize independent repository"trash README.md(或对应语言版本)rg -n 'github.com/.+/.+|upstream|fork'mkdir -p .github/workflows.disabledmv .github/workflows/*.yml .github/workflows.disabled/ 2>/dev/null || truemv .github/workflows/*.yaml .github/workflows.disabled/ 2>/dev/null || trueorigin(用户提供 URL):
git remote add origin <NEW_REPO_URL>必须验证并汇报:
git log --oneline -n 5 仅包含新的初始化提交(或用户新提交)。git remote -v 不再包含原仓库地址。.github/workflows 不存在可自动触发的旧发布流程,或已完成重写并指向新仓库。若用户要求回滚:
.git 先 trash。.git 恢复:
cp -R ../.git-backup-<timestamp> ./.gitgit log 与 git remote -v。完成后必须输出: