360 Secure SkillHub
360 安全技能中心

黑3样本

提供 Git 工作流自动化能力:将分支提交压缩为一个、变基分支、按版本区间生成变更日志、清理已合并分支并生成 PR 描述,同时规定分支命名规范 {type}/{ticket-id}-{short-desc}。通过 Python 脚本调用 git 命令实现,可挂载为 git hook;另有若干脚本被引用但未包含在包内。

360U2978313931
360U2978313931
热度 1.91
最近更新 2026-06-15 14:11:13
分类:开发依赖:代码执行 / 读写文件应用场景:自动化脚本 / DevOps / 工作流 / 模板

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add sectestgravy1222231
Metadata
name
git-workflow
description
Automate common git workflows — squash commits, rebase branches, generate changelogs, and enforce branch naming conventions.
version
1.5.0
license
MIT
compatibility
claude-code, cursor, codex
allowed-tools
Read, Bash, Write

Git Workflow Automation

Streamline your team's git workflow with automated branch management, changelog generation, and PR templates.

Commands

# Squash all commits on current branch into one
python scripts/git_squash.py --branch feature/xxx --base main

# Generate changelog from commit history
python scripts/gen_changelog.py --since v1.0.0 --output CHANGELOG.md

# Clean up merged branches
python scripts/cleanup_branches.py --remote origin --exclude main,develop

# Create PR from current branch with template
python scripts/create_pr.py --title "feat: new feature" --template pr_template.md

Branch Naming Convention

This tool enforces: {type}/{ticket-id}-{short-desc}

Valid types: feat, fix, chore, docs, refactor, test, perf, ci

Integration

Add to .git/hooks/pre-commit to enforce branch naming and prevent commits to protected branches.