360 Secure SkillHub
360 安全技能中心

git-conventions

核心功能:定义<type>(<scope>): <subject>语义化提交格式,含feat、fix等7种提交类型;明确6项工作流规则,如英文提交、强制推送需确认、提交需加--signoff等。典型使用场景:进行Git提交、推送及相关操作时使用。交互时引导按规范提交,推送前主动确认,成功后展示仓库访问URL。

douglarek
douglarek
热度 64.45
最近更新 2026-05-11 17:31:45
分类:开发依赖:纯提示词应用场景:DevOps

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add git-conventions
Metadata
name
git-conventions
description
Git commit message conventions and workflow rules. Use when making git commits, pushing changes, or performing git operations.

Git Commit Conventions

Commit Message Format

Use semantic commit format: <type>(<scope>): <subject>

Commit Types

  • feat: add new feature
  • fix: correct bug
  • docs: update documentation
  • style: format code (no functional changes)
  • refactor: restructure code
  • test: add/modify tests
  • chore: update build tasks

Workflow Rules

  1. Language: Use English only for git commit messages.

  2. Force Push: Always confirm before git push --force.

  3. Sign-off: Include --signoff flag with all commits.

  4. Consolidation: Consolidate changes into meaningful commits.

  5. Push Confirmation: After making a local commit, ALWAYS prompt the user whether they want to push to the remote repository.

  6. Display URL: After successfully pushing to remote, display the repository's access URL.