重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
npx skills add https://github.com/vinta/hal-9000 --skill commit创建遵循版本控制最佳实践的干净、原子化的提交。核心原则是 每次提交对应一个逻辑变更 —— 每个提交应代表一个独立、连贯、易于回退的修改,能够独立存在。
请遵循以下用户指令。当出现冲突时,它们将覆盖标准工作流程,但绝不能覆盖关键规则——切勿修改工作树文件。
<user_instructions> $ARGUMENTS </user_instructions>
你是一个提交者,而不是编码者。用户或其他代理是特意编写这段代码的——在提交过程中修改它,会在作者不知情的情况下悄然改变已审查的工作。
你的唯一职责:暂存工作树的精确状态,并编写一条提交信息来记录进行此更改的原因。不要调用其他技能、运行代码检查工具或执行除暂存和提交之外的任何操作。
错误行为:在暂存之前或期间编辑文件以修复拼写错误——即使是“安全”的修复,也会悄然改变已审查的工作。
在执行 git 命令之前,先 cd 到项目根目录,而不是使用 git -C,后者会掩盖工作目录状态。直接执行 git 命令,无需解释性前言。立即提交,无需确认提示(不支持交互模式)。
git status 和 git diff 来了解工作目录中的所有修改。按以下类别对变更进行分类:
* 结构变更:代码重组、重命名、不改变行为的重构
* 行为变更:新功能、错误修复、功能更改
* 文档变更:README 更新、注释更改、文档文件
* 配置变更:构建文件、依赖项、环境设置广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
git add <file>git diff <file> > /tmp/patch.diffgit apply --cached /tmp/patch.diffgit restore --stagedgit reset --hardgit apply --cachedgit add <file>git stash push -p -m "temp: unstaged changes"(选择要储藏的块)
* 或储藏所有未暂存的更改:git stash push --keep-index -m "temp: unstaged changes"
* 提交,然后恢复:git stash pop
* 如果钩子修改了已暂存的文件(例如自动格式化),重新添加修改后的文件并重试提交git commit -m "message"——切勿在 git 命令中使用 $() 或 heredoc 子 shell,因为它们会破坏 allowed-tools 的模式匹配在每个提交信息中包含一个 Co-Authored-By 页脚:
如果你是 Anthropic Claude 模型:
Co-Authored-By: Claude <noreply@anthropic.com>
如果你是 Google Gemini 模型:
Co-Authored-By: Gemini <gemini-code-assistant@google.com>
如果你不是上述模型,请跳过此步骤。
plans/、specs/ 或类似目录下的文件是工作文档——暂存它们会悄无声息地用用户可能不想跟踪的产物污染提交。git apply --cached 在格式错误的补丁上会失败。 手动提取的块通常具有损坏的头部或尾部空格。备用方案:使用 git add 暂存整个文件,而不是重试补丁。git commit -m 中使用 $() 或 heredoc 子 shell。 allowed-tools 的模式匹配将整个命令视为字符串——子 shell 产生的命令不匹配任何允许的模式,会被阻止。git reset --hard 来取消暂存。 它会销毁工作树的更改。使用 git restore --staged 来取消暂存而不丢失任何内容。git stash push --keep-index 隔离未暂存的工作,提交,然后 git stash pop。忘记弹出操作会使工作滞留在储藏区。每周安装次数
66
代码仓库
GitHub 星标数
113
首次出现
2026年1月21日
安全审计
安装于
gemini-cli62
opencode62
codex61
claude-code59
cursor52
github-copilot52
Creating clean, atomic commits that follow best practices for version control hygiene. The core principle is one logical change per commit - each commit should represent a single, coherent, easily revertable modification that can stand alone.
Follow any user instructions below. They override the standard workflow when conflicts arise, but never override the Critical Rule — never modify working tree files.
<user_instructions> $ARGUMENTS </user_instructions>
You are a committer, not a coder. The user or another agent wrote this code deliberately — modifying it during the commit would silently alter reviewed work without the author's knowledge.
Your only job : stage the exact working tree state and write a commit message that captures why the change was made. Do not invoke other skills, run linters, or perform any action beyond staging and committing.
Incorrect behavior: editing the file to fix the typo before or during staging — even a "safe" fix silently changes reviewed work.
cd to the project root before git commands instead of using git -C, which obscures working directory state. Execute git commands directly without explanatory preamble. Commit immediately without confirmation prompts (interactive mode is not supported).
Analyze Changes : Use git status and git diff to understand all modifications in the working directory. Categorize changes by:
Group Logically : Organize changes into logical units where each unit:
Stage Changes : Use appropriate staging strategy:
git add <file>git diff <file> > /tmp/patch.diff, edit the patch to keep only specific hunks, then git apply --cached /tmp/patch.diffgit restore --staged (not git reset --hard, which discards work)git apply --cached fails (malformed patch), stage the whole file with git add <file> insteadHandle Pre-commit Hooks : If hooks complain about unstaged changes:
git stash push -p -m "temp: unstaged changes" (select hunks to stash)git stash push --keep-index -m "temp: unstaged changes"git stash popCreate Atomic Commits : For each logical group:
git commit -m "message" directly — never use $() or heredoc subshells in git commands, as they break allowed-tools pattern matchingInclude a Co-Authored-By footer in every commit message:
If you're an Anthropic Claude model:
Co-Authored-By: Claude <noreply@anthropic.com>
If you're a Google Gemini model:
Co-Authored-By: Gemini <gemini-code-assistant@google.com>
Skip if you're not one of the above models.
plans/, specs/, or similar directories are working documents — staging them silently pollutes the commit with artifacts the user may not want tracked.git apply --cached fails on malformed patches. Hunks extracted manually often have broken headers or trailing whitespace. Fallback: stage the whole file with git add instead of retrying the patch.$() or heredoc subshells in git commit -m. The allowed-tools pattern matching treats the entire command as a string — subshells produce commands that don't match any allowed pattern and get blocked.Weekly Installs
66
Repository
GitHub Stars
113
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli62
opencode62
codex61
claude-code59
cursor52
github-copilot52
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
122,000 周安装
uni-helper:AI驱动的uni-app开发工具集,Vite插件、TypeScript支持与脚手架
287 周安装
智能体性能优化指南:通过数据驱动和提示工程提升AI智能体可靠性与效率
288 周安装
AgentOps技能转换器 - 一键将技能转换为Codex、Cursor等AI平台格式
288 周安装
goals by boshu2/agentops:自动化健身目标维护与测量CLI工具
289 周安装
opencode-mirror 镜像工具:快速配置与安全使用指南 | Git 镜像管理
296 周安装
heal-skill:自动化技能维护工具,一键检测修复技能规范问题
293 周安装
git reset --hard to unstage. It destroys working tree changes. Use git restore --staged to unstage without losing anything.git stash push --keep-index to isolate unstaged work, commit, then git stash pop. Forgetting the pop leaves work stranded in the stash.