360 Secure SkillHub
360 安全技能中心

commit

该 Skill 读取当前 git 状态、暂存与未暂存差异、当前分支名和最近提交记录,据此暂存全部改动、创建一条带上下文的提交,并把当前分支推送到 origin,必要时设置上游分支;要求使用非交互命令且不输出额外说明。

brennerspear
brennerspear
热度 87.21
最近更新 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.