git-commit
Analyze changes with Git only and auto-generate conventional commit messages with optional emoji; suggests splitting commits when needed, runs local Git hooks by default (use --no-verify to skip)
Оригинален текст · няма потвърден превод на българскиПърво прочетете инструкцията.
Файлът се зарежда от посочения източник само по ваше действие. Можете да го прочетете тук, да го копирате или да го запазите като .md.
GitHub хранилище- Звезди на репото
- 6080
- Лиценз
- MIT
- Последна проверка на записа
- 21.09.2026 г.
Добавете в своя инструмент.
Командата отваря избора на skills от репозитория. Прочетете файла и условията на автора преди изпълнение.
npx skills add UfoMiao/zcfСтраницата копира текст. Не инсталира и не изпълнява нищо на устройството ви.
Откъс от SKILL.md
Началото на файла на автора, без превод.
Claude Command: Commit (Git-only)
This command works without any package manager/build tools, using only Git to:
- Read changes (staged/unstaged)
- Determine if changes should be split into multiple commits
- Generate Conventional Commits style messages with optional emoji for each commit
- Execute
git addandgit commitas needed (runs local Git hooks by default; use--no-verifyto skip)
Usage
/git-commit
/git-commit --no-verify
/git-commit --emoji
/git-commit --all --signoff
/git-commit --amend
/git-commit --scope ui --type feat --emoji
Options
--no-verify: Skip local Git hooks (pre-commit/commit-msgetc.).--all: When staging area is empty, automaticallygit add -Ato include all changes in the commit.--amend: Amend the last commit without creating a new one (preserves author and timestamp unless local Git config specifies otherwise).--signoff: AddSigned-off-byline (use when following DCO process).--emoji: Include emoji prefix in commit message (omit for plain text).--scope <scope>: Specify commit scope (e.g.,ui,docs,api), written to message header.--type <type>: Force commit type (e.g.,feat,fix,docs), overrides automatic detection.
Note: If the framework doesn't support interactive confirmation, enable
confirm: truein front-matter to avoid mistakes.
What This Command Does
-
Repository/Branch Validation
- Check if in a Git repository using
git rev-parse --is-inside-work-tree. - Read current branch/HEAD status; if in rebase/merge conflict state, prompt to resolve conflicts first.
- Check if in a Git repository using
-
Change Detection
- Get staged and unstaged changes using
git status --porcelainandgit diff. - If staged files = 0:
- If
--allis passed → Executegit add -A. - Otherwise prompt choice: continue analyzing unstaged changes for suggestions, or cancel to manually group staging.
- If
- Get staged and unstaged changes using
-
Split Suggestions (Split Heuristics)
- Cluster by concerns, file modes, change types (e.g., source code vs docs/tests; different directories/packages; additions vs deletions).
- If multiple independent changesets or large diff detected (e.g., > 300 lines / across multiple top-level directories), suggest splitting commits with pathspecs for each group (for subsequent
git add <paths>).