commit

Milky2018 的头像作者 Milky2018

安全的 git 提交工作流程,防止提交到主分支。当用户要求"提交更改"、"保存更改"、"git commit",或完成需要版本控制的任务时使用。在主分支上时自动创建功能分支。除非用户明确请求,否则绝不会创建拉取请求。

📖 中文导读:安全的 git 提交工作流程,防止提交到主分支。当用户要求"提交更改"、"保存更改"、"git commit",或完成需要版本控制的任务时使用。在主分支上时自动创建功能分支。除非用户明确请求,否则绝不会创建拉取请求。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: commit description: Safe git commit workflow that prevents commits to main branch. Use when the user asks to "commit changes", "save changes", "git commit", or when completing a task that needs version control. Automatically creates feature branches when on main. NEVER creates pull requests unless explicitly requested by the user.

Safe Commit Workflow

  1. Check branch: git branch --show-current
  2. If on main: Create branch git checkout -b feat/<name> or fix/<name>
  3. Format: moon fmt && moon info
  4. Commit with conventional message (feat:, fix:, refactor:, etc.)
  5. Never push or create PR unless explicitly requested