Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

commit

БесплатноБез исполняемых скриптовНе проверен

Guided git commit with atomic commit analysis and conventional commit format

jpoutrinот jpoutrin★ 16 звёзд на GitHub

Об этом скилле

commit

Category: Development

Usage

commit [--all | --staged | --interactive]

Arguments

  • --all: Analyze all uncommitted changes (staged + unstaged)
  • --staged: Only analyze currently staged changes (default)
  • --interactive: Guide through staging changes atomically before committing

Execution Method

This command delegates to the commit-expert agent (Haiku model) for fast, cost-effective execution.

Delegation: Use the Task tool with:

  • subagent_type: "git-workflow:commit-expert"
  • prompt: Include the mode (--staged, --all, or --interactive) and current working directory

Example:

Task(subagent_type="git-workflow:commit-expert", prompt="Run commit in --staged mode in /path/to/repo")

Execution Instructions for Claude Code

When this command is run, Claude Code should:

  1. Analyze Changes

    • Run git status to understand current state
    • Run git diff --staged for staged changes (or git diff for all)
    • Identify the files and types of changes
  2. Check for Atomic Commit Violations

    • Flag if changes span multiple unrelated concerns
    • Warn if mixing features, fixes, refactoring, and style changes
    • Suggest splitting if commit is too large (>300 lines)
  3. Generate Commit Message

    • Determine appropriate type (feat, fix, docs, etc.)
    • Identify scope from file paths
    • Write clear, imperative description
    • Add body if changes are complex
  4. Present for Approval

    • Show the proposed commit message
    • Allow editing before committing
    • Execute the commit

Interactive Flow

Step 1: Analyze Changes

🔍 Analyzing your changes...

Staged changes:
  M  src/auth/login.py (+45, -12)
  M  src/auth/tokens.py (+23, -5)
  A  tests/test_login.py (+89)

Unstaged changes:
  M  src/styles/button.css (+15, -3)
  M  README.md (+20)

Step 2: Atomic Commit Check

✅ Good: Changes appear to be a single logical unit
   All changes relate to authentication/login functionality

   OR

⚠️  Warning: Changes may not be atomic

   These appear to be separate concerns:
   1. Authentication changes (src/auth/*)
   2. Style changes (src/styles/button.css)
   3. Documentation (README.md)

   Recommendations:
   - Commit auth changes first: feat(auth): ...
   - Commit style changes: fix(ui): ...
   - Commit docs separately: docs: ...

   Would you like to:
   1. Proceed with current staging (not recommended)
   2. Unstage some files and commit in parts
   3. Show me how to split this commit

Step 3: Generate Commit Message

📝 Proposed commit message:

   feat(auth): add JWT refresh token rotation

   Implement automatic token refresh to improve session security.
   Tokens now rotate on each refresh, with old tokens invalidated
   after a 5-minute grace period.

   - Add refresh token rotation logic
   - Update token validation to check rotation status
   - Add tests for token refresh flow

Does this look correct?
   1. Yes, commit with this message
   2. Edit the message
   3. Change the commit type
   4. Cancel

Step 4: Commit Type Selection (if editing)

Select commit type:

   1. feat     - New feature
   2. fix      - Bug fix
   3. docs     - Documentation only
   4. style    - Code style (formatting, no logic change)
   5. refactor - Code restructuring (no feature/fix)
   6. perf     - Performance improvement
   7. test     - Adding/fixing tests
   8. build    - Build system or dependencies
   9. ci       - CI/CD configuration
   10. chore   - Maintenance tasks

Current selection: feat

Enter number or type:

Step 5: Scope Selection

Suggested scopes based on changed files:
   1. auth (src/auth/*)
   2. api (src/api/*)
   3. No scope

Enter scope or select number: auth

Step 6: Description

Write a short description (max 50 chars, imperative mood):

Examples:
   ✅ "add password reset flow"
   ✅ "fix token expiration bug"
   ❌ "added password reset" (past tense)
   ❌ "fixes the token bug" (not imperative)

Description: add JWT refresh token rotation

Step 7: Body (Optional)

Add a commit body? (Explain what and why)

   1. Yes, add details
   2. No, subject line is sufficient

[If yes]
Enter commit body (empty line to finish):
> Implement automatic token refresh to improve session security.
> Tokens now rotate on each refresh, with old tokens invalidated
> after a 5-minute grace period.
>

Step 8: Execute Commit

📋 Final commit message:

feat(auth): add JWT refresh token rotation

Implement automatic token refresh to improve session security.
Tokens now rotate on each refresh, with old tokens invalidated
after a 5-minute grace period.

Confirm commit? (yes/no/edit): yes

✅ Committed: abc1234
   feat(auth): add JWT refresh token rotation

   3 files changed, 157 insertions(+), 17 deletions(-)

Interactive Staging Mode (--interactive)

When using --interactive, guide users through staging atomic commits:

🎯 Inter
Полный SKILL.md на GitHub

Установить commit в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл commit?

Guided git commit with atomic commit analysis and conventional commit format

Как установить скилл commit?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл commit запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить commit с