360 Secure SkillHub
360 安全技能中心

黑3样本

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

分类:开发
360U2978313931
360U2978313931
热度 0.66
最近更新 2026-06-15 14:11:13

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add 360U2978313931/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.