其他

git-commit

github/awesome-copilot

Use this skill when the user wants to make a Git commit or split changes into more than one commit. Also use it when the user types "/commit" or asks for a conventional commit. The skill examines the diff, stages the related files, writes a Conventional Commits message, and runs git commit. Do not use it when the user wants only a commit message and no commit. Do not use it to push, open a pull request, rebase, or change the commit history.

  • 4.8万 次安装
  • 4.1万 星标
  • 收录于

安装命令

npx skills add https://github.com/github/awesome-copilot --skill git-commit

要点

Standardized git commits using Conventional Commits specification with intelligent diff analysis and message generation.

  • Auto-detects commit type (feat, fix, docs, refactor, perf, test, build, ci, chore, revert) and scope from actual code changes
  • Generates semantic commit messages following conventional format with optional body and footer sections
  • Intelligently stages files for logical grouping when needed, with support for pattern-based and interactive staging
  • Detects breaking changes and formats them with exclamation mark or BREAKING CHANGE footer
  • Enforces git safety protocols: prevents destructive operations, config changes, and secret commits without explicit user request

SKILL.md

Git Commit with Conventional Commits

Make Git commits that follow the Conventional Commits 1.0.0 specification. Get the type, the scope, and the summary from the diff.

Message Format

<type>(<scope>): <summary>

<body>

<footer>
  • The scope, the body, and the footer are optional. Without a scope, write <type>: <summary>.
  • Write the summary in the imperative mood: "add", not "added" or "adds".
  • Keep the first line at 72 characters or less. Do not put a period at the end.
  • In the body, tell what changed and why.
  • Write each footer as Token: value or Token #value, for example Refs: #456 or Closes #123. Conventional Commits accepts the two forms, but Git reads only Token: value as a trailer. In a token, use - in place of a space.

Git Commit with Conventional Commits

Make Git commits that follow the Conventional Commits 1.0.0 specification. Get the type, the scope, and the summary from the diff.

Message Format

<type>(<scope>): <summary>

<body>

<footer>
  • The scope, the body, and the footer are optional. Without a scope, write <type>: <summary>.
  • Write the summary in the imperative mood: "add", not "added" or "adds".
  • Keep the first line at 72 characters or less. Do not put a period at the end.
  • In the body, tell what changed and why.
  • Write each footer as Token: value or Token #value, for example Refs: #456 or Closes #123. Conventional Commits accepts the two forms, but Git reads only Token: value as a trailer. In a token, use - in place of a space.