git-commit-workflow
БесплатноЗапускает вложенные скриптыНе проверенCommit-message and staging conventions: type(scope): subject, logical grouping, explicit-path staging. Reference only, makes no commit. Use when deciding how…
Об этом скилле
Git Commit Workflow
When to Use This Skill
| Use this skill when... | Use the alternative when... |
|---|---|
| Designing the conventional-commit message and staging conventions for a repo | Use git-commit to actually create a commit (handles pre-commit hooks, issue detection) |
| Reviewing how to group changes logically into focused commits | Use git-commit-trailers for BREAKING CHANGE / Co-authored-by trailer rules |
| Discussing humble, fact-based commit communication style | Use github-issue-autodetect to pick the issues a change references (Refs #N) or its PR closes |
Authoring feat(scope): subject rules for your codebase |
Use github-pr-title to apply the same conventional format to PR titles |
Expert guidance for commit message conventions, staging practices, and commit best practices using conventional commits and explicit staging workflows.
For detailed examples, advanced patterns, and best practices, see REFERENCE.md.
Preconditions
Before staging any files — especially for bulk-edit / commit-loop workflows that touch many subdirectories — verify the working tree is yours alone:
| Check | Why | How |
|---|---|---|
| Coworker check | Another Claude session in the same checkout may have already pre-staged files (git commit -a retry, abandoned staging) that your loop would sweep into the wrong commit. Run this up front, not opportunistically. |
SlashCommand → /git:coworker-check |
| Working tree scoped | Confirm git status --porcelain shows only your edits |
git status --porcelain |
If /git:coworker-check returns anything other than clear, stop and either move to a fresh worktree under <repo>/.claude/worktrees/<task> (EnterWorktree, or git worktree add .claude/worktrees/<task>) or ask the user before proceeding. See .claude/rules/agent-coworker-detection.md for the seven detection signals.
Core Expertise
- Conventional Commits: Standardized format for automation and clarity
- Explicit Staging: Always stage files individually with clear visibility
- Logical Grouping: Group related changes into focused commits
- Communication Style: Humble, factual, concise commit messages
- Pre-commit Integration: Run checks before committing
Note: Commits are made on main branch and pushed to remote feature branches for PRs. See git-branch-pr-workflow skill for the main-branch development pattern.
Conventional Commit Format
Standard Format
type(scope): description
[optional body]
[optional footer(s)]
The scope is required. Write type(scope): … — docs(readme): update install steps, never a bare docs: update install steps. The Conventional Commits spec lets you omit the scope; this house convention does not (.claude/rules/conventional-commits.md). Take it from the component or plugin the change touches.
For footer/trailer patterns (Co-authored-by, BREAKING CHANGE, Release-As), see git-commit-trailers skill.
Commit Types
- feat: New feature for the user
- fix: Bug fix for the user
- docs: Documentation changes
- style: Formatting, missing semicolons, etc (no code change)
- refactor: Code restructuring without changing behavior
- test: Adding or updating tests
- chore: Maintenance tasks, dependency updates, linter fixes
- perf: Performance improvements
- ci: CI/CD changes
Examples
# Feature
git commit -m "feat(auth): implement OAuth2 integration"
# Bug fix with body
git commit -m "fix(api): resolve null pointer in user service
Fixed race condition where user object could be null during
concurrent authentication requests."
# Breaking change
git commit -m "feat(api)!: migrate to GraphQL endpoints
BREAKING CHANGE: REST endpoints removed in favor of GraphQL.
See migration guide at docs/migration.md"
Commit Message Best Practices
DO:
- Use imperative mood ("add feature" not "added feature")
- Keep first line under 72 characters
- Be concise and factual
- ALWAYS reference related issues - every commit should link to relevant issues
- Reference issues with
Refs #N; put closing keywords (Fixes #N,Closes #N) in the PR body only (a closing keyword in a commit message closes the issue when the commit lands on the default branch, whatever the PR body says; theno-closing-keywordscommit-msg hook rejects it) - Use lowercase for type and scope
- Be humble and modest
DON'T:
- Use past tense ("added" or "fixed")
- Include unnecessary details in subject line
- Use vague descriptions ("update stuff", "fix bug")
- Omit issue references - always link commits to their context
- Use closing keywords (
Fixes) when you only mean to reference (Refs)
Pre-Commit Context Gathering (Recommended)
Before committing, gather all context in one command:
# Basic context: status, staged files, diff stats, recent log
bash "${CLAUDE_PLUGIN_ROOT}/skills/git-commit-workflow/scripts/commit-context.
Установить git-commit-workflow в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(bash ${CLAUDE_PLUGIN_ROOT}/skills/git-commit-workflow/scripts/commit-context.sh *)Bash(git status *)Bash(git add *)Bash(git diff *)Bash(git commit *)Bash(git log *)Bash(git worktree add *)Bash(gh issue list *)ReadВложенные файлы
FAQ
Что делает скилл git-commit-workflow?
Commit-message and staging conventions: type(scope): subject, logical grouping, explicit-path staging. Reference only, makes no commit. Use when deciding how to word a message or split changes.
Как установить скилл git-commit-workflow?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл git-commit-workflow запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic