git-stack
Skill2 starsChanged 5 days agoApache-2.0View on GitHub
用于 Git 代码提交、推送、合并或变基冲突处理,以及 worktree 工作树的创建与复用。 当用户要求提交代码、推送代码、交付已经验证的更改,或设置隔离工作区时使用。
2 other projects use a version of this.
Adopted by
Most recently taken up by
- eliasjnior/claude-skillstheir own version, first seen Oct 20, 2026
- gspencergoog/skillstheir own version, first seen Oct 16, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- gspencergoog/skills★ 2same name
- eliasjnior/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- database-designSkill
- drizzle-migration-conflictSkill
- grillSkill
- hugo-to-markdownSkill
- postgresql-cliSkill
- prdSkill
- pre-release-reviewSkill
- rclone-cliSkill
- redis-cliSkill
- to-specSkill
- to-taskSkill
The file
Files
Git 工作流
按照用户要求执行 Git 操作,并保留无关工作。开始前读取适用的仓库指令和提交规范。 用户指令优先于仓库约定和本技能;已经获得授权的操作,无需重复询问。
适用方式
- 本技能适用于不同 agent、编辑器、操作系统、Git 托管服务及项目技术栈。 根据当前能力选择 Git CLI、Git API 或宿主提供的等效工具,不以某个插件、终端或平台功能为前提。
- 命令展示需要确认的 Git 状态,不要求逐条照搬执行。优先利用已有结果,按任务范围读取差异;
路径、引用、引号和变量语法按实际 shell 或工具调整。
示例中的
<...>均需替换为实际值;选项不可用时使用兼容方式获取等效信息。 - 验证项目、工作区准备方式及提交粒度由用户目标和仓库规范决定。 本技能使用中文说明,不限定项目语言、提交信息语言、分支命名或固定提交格式。
快速参考
- 确认仓库、当前引用及操作目标,再检查任务需要的工作树状态。
可用
git rev-parse --git-dir识别仓库;工作树中的.git可能是文件。 裸仓库没有工作树,仍可执行适用的引用和推送操作;尚无首个提交的仓库也不属于异常。 仅在任务依赖的仓库或访问能力不可用时,报告相应阻塞项。 - 涉及工作树更改时,分别检查已暂存、未暂存和未跟踪的内容。保留无关工作,结合会话上下文确认范围, 仅在是否纳入某项更改尚不明确时询问用户。
- 运行检查前先盘点已有验证结果。复用仍适用的结果,仅预检待执行检查需要的环境, 并按照验证规则分类处理失败。仓库强制门禁和钩子仍然适用。
- 仅执行已授权的提交、推送、冲突处理或工作区操作,报告最终版本、目标位置和验证边界。
流程入口
只读取当前任务需要的流程。
| 操作 | 参考文档 |
| 提交、推送或交付已经验证的更改 | 提交与推送 |
| 合并或变基冲突 | 冲突处理 |
| 创建或复用隔离工作区 | 工作树 |
| 验证复用、环境预检及失败分类 | 验证规则 |
代码审查请求、问题跟踪和发布等操作,按实际托管服务选择可用的工具或 API。 用户仅要求提交时,不得据此推断其已授权创建远端审查请求、标签、发布版本或执行推送。
护栏
- 不将修改 Git 配置作为默认前置步骤;确需调整时,限定在已有授权和所需作用域内。 不丢弃无关更改,不在核对内容前暂存整个工作树。
- 丢弃更改、历史重写、强制推送及跳过钩子等操作需要明确授权,并遵守宿主安全限制和远端保护规则。
- 钩子失败时,先分类,再决定修改代码或重跑检查。检查 HEAD 和暂存区,确认是否已经生成提交; 不将修改已有提交作为自动恢复步骤。
- 未经用户明确授权,不直接读取或输出 SSH 私钥内容;正常 Git 认证使用既有认证机制。
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
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.

