360 Secure SkillHub
360 安全技能中心

git-quick

一个轻量 Bash 脚本技能,在当前 Git 仓库中调用 git 命令,输出当前分支与跟踪状态、已修改/暂存/未跟踪文件、最近 5 条提交以及按提交数排序的贡献者统计,并支持 --short、--commits、--stats 参数只显示部分内容。属于只读展示,不修改仓库。

hackeryht
hackeryht
热度 53.61
最近更新 2026-05-11 17:38:55
分类:开发依赖:代码执行 / 读写文件应用场景:DevOps / 自动化脚本 / 报告撰写

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add git-quick
Metadata
name
git-quick
description
Show a quick summary of the current git repo — branch, status, recent commits, and contributor stats.
version
1.0.0
metadata
{"openclaw":{"requires":{"bins":["git"]},"emoji":"🔀"}}

git-quick

A lightweight skill that displays a quick summary of the current git repository.

What it does

  • Shows current branch and tracking status
  • Lists modified/staged/untracked files
  • Displays the 5 most recent commits
  • Shows top contributors by commit count

Usage

Run the script directly:

bash git-quick.sh

Or use the shorthand:

bash git-quick.sh --short    # Only show branch + status
bash git-quick.sh --commits  # Only show recent commits
bash git-quick.sh --stats    # Only show contributor stats

Example Output

=== Git Quick Summary ===
Branch: main (up to date with origin/main)

--- Status ---
M  src/app.ts
A  src/utils.ts
?? config.local.json

--- Recent Commits ---
a1b2c3d feat: add user auth module          (2 hours ago)
e4f5g6h fix: resolve login redirect loop    (5 hours ago)
i7j8k9l docs: update API reference          (1 day ago)

--- Top Contributors ---
  alice  42 commits
  bob    28 commits
  carol  15 commits