360 Secure SkillHub
360 安全技能中心

commit

核心功能为自动暂存Git所有变更,结合仓库状态、差异等生成上下文提交消息,完成单条提交并推送分支(需时自动设置上游分支)。典型场景是开发者需快速规范化提交Git变更时使用,无需交互命令,输入为Git仓库的状态、分支等信息,输出为提交推送的执行结果。

brennerspear
brennerspear
热度 87.19
最近更新 2026-05-18 12:07:22
分类:开发依赖:代码执行应用场景:DevOps

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add commit
Metadata
name
commit
description
Create a git commit with a contextual message based on current changes, then push the branch.
allowed-tools
["Bash"]

Context

  • Current git status: !git status
  • Current git diff (staged and unstaged changes): !git diff HEAD
  • Current branch: !git branch --show-current
  • Recent commits: !git log --oneline -10

Your task

Based on the above changes, stage everything, create one commit with a contextual message, and push the current branch.

Required sequence:

  1. Stage changes.
  2. Create a single commit.
  3. Push the current branch to origin (use --set-upstream origin <branch> if needed).

Do not use interactive commands and do not output extra commentary.