Finishing a Development Branch
obra/superpowers
Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.
Git 工作流安全助手。用于分支与 worktree 管理、主目录 main 防切换保护、Skill 稀疏检出、PR 创建/审查/合并,以及提交身份和隐私检查;也支持 CI 额度治理、敏感文件历史撤回与仓库瘦身。不要用于批量生成提交信息、项目任务分配或本地 Agent 会话编排。
$ npx skills add cat-xierluo/legal-skills --skill git-workflow -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install cat-xierluo/legal-skills git-workflow --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/git-workflow .claude/skills/git-workflow && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "git-workflow" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/git-workflow into .claude/skills/git-workflow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "git-workflow", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/cat-xierluo/legal-skills/tree/main/skills/git-workflowType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add cat-xierluo/legal-skills --skill git-workflow -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install cat-xierluo/legal-skills git-workflow --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/git-workflow .agents/skills/git-workflow && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "git-workflow" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/git-workflow into .agents/skills/git-workflow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "git-workflow", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add cat-xierluo/legal-skills --skill git-workflow -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install cat-xierluo/legal-skills git-workflow --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/git-workflow .cursor/skills/git-workflow && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "git-workflow" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/git-workflow into .cursor/skills/git-workflow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "git-workflow", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/cat-xierluo/legal-skills.git --path skills/git-workflow--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add cat-xierluo/legal-skills --skill git-workflow -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install cat-xierluo/legal-skills git-workflow --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/git-workflow .gemini/skills/git-workflow && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "git-workflow" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/git-workflow into .gemini/skills/git-workflow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "git-workflow", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install cat-xierluo/legal-skills git-workflowInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add cat-xierluo/legal-skills --skill git-workflow -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/git-workflow .github/skills/git-workflow && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "git-workflow" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/git-workflow into .github/skills/git-workflow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "git-workflow", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add cat-xierluo/legal-skills --skill git-workflow -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install cat-xierluo/legal-skills git-workflow --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/git-workflow .opencode/skills/git-workflow && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "git-workflow" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/git-workflow into .opencode/skills/git-workflow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "git-workflow", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
git-workflowGit 工作流安全助手。用于分支与 worktree 管理、主目录 main 防切换保护、Skill 稀疏检出、PR 创建/审查/合并,以及提交身份和隐私检查;也支持 CI 额度治理、敏感文件历史撤回与仓库瘦身。不要用于批量生成提交信息、项目任务分配或本地 Agent 会话编排。
Git Workflow is an agent skill from cat-xierluo/legal-skills. Git 工作流安全助手。用于分支与 worktree 管理、主目录 main 防切换保护、Skill 稀疏检出、PR 创建/审查/合并,以及提交身份和隐私检查;也支持 CI 额度治理、敏感文件历史撤回与仓库瘦身。不要用于批量生成提交信息、项目任务分配或本地 Agent 会话编排。
Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 42 other files, including scripts and reference files (for example `CHANGELOG.md`, `references/accident-recovery.md` and `references/branch-lifecycle-and-cleanup.md`).
It sits in Development, covering Git workflow and Git worktrees. It works with Git. The licence is MIT.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit c077fcc. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/ (Shell, from the files we listed), which the agent can run.
Shell commands in SKILL.md call:
brewaptFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Git Workflow loads about 1.1k tokens when it runs, and up to ~38k if it reads all its reference files. Until then it costs about 38 tokens; SKILL.md has 250 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from cat-xierluo/legal-skills at commit c077fcc, republished under its MIT licence (© cat-xierluo). 250 words, ~1,075 tokens.
.claude/skills/git-workflow/SKILL.md (or your agent's skills folder). This skill also uses 40 other files; get the full folder from GitHub.维护 Git 的范围、身份、候选和交付规则。先读取用户授权、项目规则与完整任务卡,确定仓库、允许路径、目标分支、预期身份和验收;只加载当前场景需要的参考文档。
在相应操作前读取该行的合同;跨场景任务按执行顺序读取,不一次性加载全部 references。
| 当前需求 | 读取与执行入口 |
|---|---|
| 本地隔离开发到交付、基准落后或共享主树被占用 | 本地 Worktree SOP |
| 新建或限缩 Skill/套件工作树、跨目录占用审计 | 稀疏工作树;创建用 scoped-worktree.py,完整登记只读审计用 sparse-worktree-audit.py |
| 提交身份、Co-authored-by 污染、已合历史回执、完整 PR 范围推送 | 身份与推送,再按内容读取隐私预检 |
| PR 创建/审查/合并、CI 未知、冲突或更新 base | PR 流程;文本与完整历史核验读取隐私预检 |
| 主目录固定 main、所有 Agent 独立 worktree 开发、具名集成 | 主目录分支保护;主目录默认只读、具名采用的命令前门禁用 main-git-gate.py / test-main-git-gate.py;历史索引锁只核验/解除 |
| Monorepo 窄采用、cherry-pick 与冲突 | 改动集成 |
| 误 amend / stash / 删分支 / reset 的事故恢复 | 事故恢复;先定位证据,再按授权恢复 |
| Skill 连续迭代、候选观察、长期功能线或里程碑 | 长期集成分支 |
| 分支/工作树清理、批量验收或取代关闭旧 PR | 生命周期与清理;只读盘点用 branch-audit.sh / worktree-audit.sh |
| 短任务/里程碑/子分支命名,Commit / Issue / PR 标题与关闭语义 | 命名与提交格式 |
| GitHub Actions 分钟耗尽、停挂或恢复 | CI 额度治理 |
| 敏感/私有材料已经发表,需从历史撤回 | 历史撤回 |
| 仓库或对象库膨胀、配置同步仓瘦身 | 膨胀审计;先区分历史、检出、缓存和任务材料 |
| 查 gh 参数 | gh 速查,命令示例仍受对应合同约束 |
本 Skill 内脚本名均相对技能目录。执行时将 git_workflow_dir 设置为本技能安装目录的绝对路径,在目标仓库运行;不要为了调用脚本切换到技能源码仓库。本文及参考文档提供方法,不能代替用户对外部写入或破坏性操作的授权。
user.name/email。force push、reset --hard、丢弃修改、clean -f、强删分支、跳过 hooks/签名及改写历史须有具体明确授权。锁先查持有者,不直接删;hook 失败修复后新建提交,不绕过。默认新建 commit,amend 须用户要求;精确暂存文件。safe-push.sh,身份和隐私核验完整 PR range并绑定不可变 OID;不得只查 HEAD、用 HEAD~1 缩窄范围或裸 push 绕门。创建/合并 PR 用 safe-pr.py 核最终完整文本与精确 head,不使用未经检查的自动说明。已明确授权的历史重写与精确 ref 删除按对应专页执行,不能借该例外绕过普通发表门禁。CLEANUP_PENDING,不重放 push/merge;批量候选不等于删除授权。所有项目的 Agent 开发、修改、测试和提交在各自独立 worktree 中完成。主目录固定 main,仅用于稳定加载和具名集成者串行采用;禁止为了修复漂移切回 main。采用须绑定完整候选、当前 HEAD、逐文件范围和原 index/dirty,遇到并发变化停止该次采用。命令门禁默认拒绝主目录 add/commit,只有具名 owner 与匹配的 expected HEAD 可进入采用路径;这不是对任意程序的强制安全边界。GUI/绝对路径/旧 runtime 未接入仍为 NOT_VERIFIED;不重装常驻 index.lock,不擅自删除现存他人锁。
| 依赖 | 使用范围与安装方式 |
|---|---|
| Git | 全部 Git 操作;macOS 可用 Command Line Tools 提供的 Git,Linux 使用发行版包管理器 |
| Bash | .sh 门禁与审计;使用系统 Bash |
| Python 3.10+ | 隐私、PR、稀疏创建/审计脚本;macOS: brew install python,Linux: apt install python3 |
| GitHub CLI(gh) | GitHub PR/CI 与远端状态查询,先核已有认证;macOS: brew install gh,Linux 按 GitHub CLI 官方安装说明 |
Python 入口只依赖标准库,不需要 pip 安装。稀疏审计的 du / lsof 与分支盘点的 gh 降级边界见各自合同;降级后的缺失证据必须显式保留,不能追认通过。
git-batch-commit 负责用户明确要求的提交拆分与说明生成,沿本 Skill 的身份/隐私与 Issue 关闭规则;项目任务源维护状态,multi-agent-orchestration 负责 worker 派发和会话,继续引用同一稀疏合同;release-workflow 负责发版与资产,本 Skill 负责日常 Git/CI 治理。
项目文档体检只在项目已有流程及授权内衔接;Git Workflow 不规定其阈值、目录、任务状态或维护 PR 副作用,也不因当前请求自动派发或发布维护任务。
© cat-xierluo, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 40 other files (scripts, references) in skills/git-workflow of cat-xierluo/legal-skills.
Open the folder on GitHubat commit c077fcc
Git Workflow next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Git Workflow this skillcat-xierluo/legal-skills | 713 | — | ~1.1k | Automated safety check: Pass | MIT | |
| Finishing a Development Branchobra/superpowers | 296k | 5 repos | ~1.9k | Automated safety check: Pass | MIT | |
| Git Worktree Cleanuplobehub/lobehub | 83k | — | ~2.8k | Automated safety check: Pass | Custom licence | |
| Ccmanager Configkbwo/ccmanager | 1.3k | — | ~1.5k | Automated safety check: Pass | MIT | |
| Git Worktree Managermicrosoft/WindowsAppSDK | 4.7k | — | ~2k | Automated safety check: Pass | MIT | |
| Git Committisfeng/Easydict | 15k | — | ~535 | Automated safety check: Pass | GPL-3.0 |
obra/superpowers
Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.
lobehub/lobehub
Audits stale Git worktrees and branches with a bundled script, classifies each one, and deletes only after you approve the exact candidates.
kbwo/ccmanager
Set up, review, or repair a CCManager config — .ccmanager.json at a git repository root, or the global ~/.config/ccmanager/config.json.
microsoft/WindowsAppSDK
Creates and manages Git worktrees with PowerShell scripts so separate issues and Copilot sessions each get an isolated branch, build and test environment.
tisfeng/Easydict
起草、创建或汇报 Angular-style 本地 Git 提交。用于明确的提交交付;分支集成使用 worktree-rebase-merge,不 push。
jnMetaCode/superpowers-zh
Sets up an isolated workspace before feature work or plan execution, preferring native worktree tools and falling back to git worktree, with instructions in Chinese.
cat-xierluo/legal-skills
Converts a lawyer's ordinary complaint or a described case into the Supreme People's Court's elements-style Word template, with layout checks on the result.
cat-xierluo/legal-skills
Analyzes raw lecture transcripts for verbal tics, pacing, time use and promise follow-through, with optional slide-by-slide comparison and cross-session tracking.
cat-xierluo/legal-skills
Detects and rewrites machine-sounding patterns in the body text of Chinese articles while keeping the author's facts, headings and legal terms intact.
cat-xierluo/legal-skills
Finds GitHub projects mentioned in articles or screenshots and stars them, tracks updates to your starred repos, and builds an HTML dashboard to browse them.
cat-xierluo/legal-skills
Sets up or incrementally updates AGENTS.md and CLAUDE.md for legal professionals, with a minimal safety baseline and a check that a new session loads and follows the rules.
cat-xierluo/legal-skills
Chinese-language skill that organizes a case file into a multi-role mock trial with judge, parties and clerk, producing a transcript, issue review and a to-strengthen list.
Works with
Categories
Git 工作流安全助手。用于分支与 worktree 管理、主目录 main 防切换保护、Skill 稀疏检出、PR 创建/审查/合并,以及提交身份和隐私检查;也支持 CI 额度治理、敏感文件历史撤回与仓库瘦身。不要用于批量生成提交信息、项目任务分配或本地 Agent 会话编排。. Git Workflow is an agent skill from cat-xierluo/legal-skills.
Git Workflow fits situations like: tasks that involve Git workflow; tasks that involve Git worktrees.
Run `npx skills add cat-xierluo/legal-skills --skill git-workflow -a claude-code`. Or copy the skill folder (skills/git-workflow in cat-xierluo/legal-skills) into .claude/skills/git-workflow in your project. Claude Code loads it when a task matches its description.
Run `npx skills add cat-xierluo/legal-skills --skill git-workflow -a codex`. Or copy the skill folder (skills/git-workflow in cat-xierluo/legal-skills) into .agents/skills/git-workflow in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cat-xierluo/legal-skills --skill git-workflow -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/git-workflow, .gemini/skills/git-workflow, .github/skills/git-workflow and .opencode/skills/git-workflow in your project.
Going by SKILL.md and its folder, Git Workflow needs a shell for the scripts in its folder and the command-line tools its instructions call (brew and apt). Our summary lists: Python 3; A Bash shell.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Git Workflow is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.1k tokens (SKILL.md is roughly 4.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 37k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Git Workflow: Finishing a Development Branch (obra/superpowers, 296k stars), Git Worktree Cleanup (lobehub/lobehub, 83k stars), Ccmanager Config (kbwo/ccmanager, 1.3k stars) and Git Worktree Manager (microsoft/WindowsAppSDK, 4.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
cat-xierluo (a GitHub user) maintains it in cat-xierluo/legal-skills, which has 713 GitHub stars. The repository holds 62 skills in this directory. The repository was last updated on October 7, 2026.
Source: cat-xierluo/legal-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.