---
Intelligently groups changes and creates conventional commits with automatic issue references.
/plugin marketplace add C0ntr0lledCha0s/claude-code-plugin-automations/plugin install github-workflows@claude-code-plugin-automationsIntelligently analyze and commit changes with automatic file grouping and conventional commit formatting.
/commit-smart # Interactive mode (default)
/commit-smart all # Analyze all changes, suggest grouped commits
/commit-smart staged # Commit only staged changes
/commit-smart context # Review conversation and commit relevant files
/commit-smart scope # Commit by functional scope
all: Analyze all changes and suggest grouped commitsstaged: Commit only staged changescontext: Review conversation history and commit relevant filesscope: Commit by scope (auth, api, ui, etc.)interactive: Interactive mode with confirmation prompts (default)Input validation: Only accepts predefined modes: all, staged, context, scope, interactive. Invalid inputs are rejected to prevent command injection.
When this command is invoked:
Validate argument (CRITICAL - prevents command injection):
Load issue cache: Read .claude/github-workflows/active-issues.json for tracked issues
Analyze changes: Run git status and diff to identify all modified files
Detect related issues:
relatedIssues array from env.json (set via /issue-track select)feature/issue-42)relatedIssues array)Invoke managing-commits skill: Delegate to skill for intelligent grouping
Group files: Skill groups files by scope, type, and relationships
Generate commit messages: Create conventional commit messages with issue refs:
Closes #N for ALL branch-selected issues (from relatedIssues array)Refs #N for scope-matched or keyword-matched issuesPresent plan: Show user the proposed commits with file lists and issue refs
Get approval: Ask user to confirm, edit, or cancel
Execute commits: Create each commit sequentially with proper staging
Security Note: The argument MUST be validated against this exact allowlist: all, staged, context, scope, interactive. If the provided argument does not exactly match one of these strings (or is empty, defaulting to interactive), reject it immediately with an error message and stop execution.
This command invokes the managing-commits skill to:
The skill uses multiple strategies:
Interactive mode (asks for confirmation):
/commit-smart
Commit all changes (suggests multiple grouped commits):
/commit-smart all
Commit only staged files:
/commit-smart staged
Commit based on conversation (reviews chat history):
/commit-smart context
This command automatically integrates with tracked GitHub issues:
.claude/github-workflows/active-issues.jsonissue-tracker.py suggest-refsCloses #N: Issue will close when PR merges (use for branch issue)Fixes #N: Same as Closes (preferred for bugs)Refs #N: References issue without closingProgresses #N: Indicates partial progress on issue# On branch feature/auth (with issues #42, #43 selected via /issue-track select)
/commit-smart
# Output:
Analyzing changes...
Branch scope: auth (scope:auth)
Selected issues: #42 "Implement user authentication", #43 "Add JWT validation"
Found 3 files changed:
- src/auth/jwt.ts
- src/auth/types.ts
- tests/auth/jwt.test.ts
Proposed commit:
feat(auth): add JWT token refresh mechanism
Implements automatic token refresh 5 minutes before expiration
to maintain seamless user sessions.
Closes #42
Closes #43
Create this commit? [y/n]
For best results, sync issues and select branch issues before committing:
/issue-track sync # Sync issues from GitHub
/issue-track select 42 43 # Select issues for this branch
/commit-smart # Commit with auto-refs
managing-commits skill for validationissue-tracker.py script for issue detectionIf the mode argument is invalid or missing from the allowlist:
/commit-smart [mode]If there are no changes to commit:
If git operations fail:
Use this when you want clean, well-organized commits without manual file selection!