From tal
Intelligently groups changes into atomic commits based on feature analysis. Each commit includes related implementation files, tests, and documentation.
npx claudepluginhub tal/plugin-marketplace --plugin talgit/commit/# Atomic Commit Creator Intelligently groups changes into atomic commits based on feature analysis. Each commit includes related implementation files, tests, and documentation. ## Arguments Provided $ARGUMENTS ## Overview This command operates in three phases: 1. **Assessment** - Analyze all changes and identify distinct features 2. **Build Commit List** - Map files and file segments to each feature 3. **Add and Commit** - Create atomic commits with proper formatting ## Important Rules - **Stop immediately if any git command fails** - If any new files look related to planning or Cla...
Intelligently groups changes into atomic commits based on feature analysis. Each commit includes related implementation files, tests, and documentation.
$ARGUMENTS
This command operates in three phases:
Gather git status information:
git status
Check for uncommitted changes:
git diff
git diff --staged
Identify files that should be excluded:
*-test-*.md, *-plan.md, *-scratch.*, temporary test scriptsAnalyze changes to identify distinct features:
Create a TodoWrite task list of detected features:
Handle arguments if provided:
$ARGUMENTS contains a feature name, focus ONLY on that featureFor each feature identified (or the single feature if specified in arguments):
Map all related files:
Handle files with mixed changes:
git-partial-commit skill to stage only relevant changes (see instructions below in Phase 3)Verify completeness:
Determine commit type and scope:
Gather or confirm rationale:
For each feature (updating TodoWrite status as you go):
Stage files for this commit:
For files wholly belonging to this feature:
git add <file1> <file2> <file3>
For files with partial changes (mixed features in one file):
Use the git-partial-commit skill to stage only the lines/hunks belonging to this feature:
a. Get the full diff of the file:
git diff --unified=5 <file>
b. Construct a patch containing only the hunks for this feature. The patch must follow unified diff format:
diff --git a/<file> b/<file>
index <old-hash>..<new-hash> <mode>
--- a/<file>
+++ b/<file>
@@ -<old-start>,<old-count> +<new-start>,<new-count> @@
<context lines and changes for this feature only>
c. Stage the partial changes using the helper script:
${CLAUDE_PLUGIN_ROOT}/skills/git/partial-commit/stage-lines.sh <file> "$(cat <<'EOF'
<paste the constructed patch here>
EOF
)"
Verify what's staged:
git diff --cached
Generate commit message:
Follow this exact format:
<type>(<scope>): <brief description>
- <bullet point explaining what changed>
- <bullet point explaining why it changed>
- <bullet point for each major modification>
- <bullet point for any breaking changes or deprecations>
- <bullet point for generated/auto-updated files if relevant>
Rationale: <paragraph description of the reason for the change>
Commit types:
feat: New featuresfix: Bug fixesrefactor: Code restructuring without functionality changedocs: Documentation changestest: Test additions/modificationschore: Build, dependencies, generated filesstyle: Formatting, whitespaceperf: Performance improvementsExample:
feat(auth): Add OAuth2 authentication middleware
- Add OAuth2 provider configuration and client setup
- Implement middleware for token validation and user session creation
- Add error handling for expired and invalid tokens
- Integrate with existing user repository for account lookup
Rationale: Users requested the ability to authenticate using their existing OAuth2 providers (Google, GitHub) instead of creating new credentials. This reduces friction in the onboarding process and improves security by leveraging established identity providers.
This commit made by [/tal:git:commit:atomic](https://github.com/tal/plugin-marketplace/tree/main/plugins/tal/commands/git/commit/atomic.md)
Create the commit using heredoc:
git commit -m "$(cat <<'EOF'
<type>(<scope>): <brief description>
- <bullet point 1>
- <bullet point 2>
- <bullet point 3>
Rationale: <rationale paragraph>
This commit made by [/tal:git:commit:atomic](https://github.com/tal/plugin-marketplace/tree/main/plugins/tal/commands/git/commit/atomic.md)
EOF
)"
Check for errors:
Verify the commit:
git log -1 --stat
Update todo status:
After all commits are created:
Show summary:
git log --oneline -n <number-of-commits-created>
Check for remaining unstaged changes:
git status
Report to user:
Instead of:
feat: Add user authentication system with OAuth and database schema
Prefer multiple atomic commits:
feat(auth): Add OAuth configuration and middleware (includes related docs)feat(database): Add user authentication schema and migrations (includes related docs)feat(api): Add authentication endpoints and validation (includes related docs)chore(proto): Update user service protobuf definitionschore(generated): Regenerate protobuf bindings for user serviceNote: Each commit includes its related documentation (e.g., README updates, inline docs, CLAUDE.md sections). Documentation changes are NOT separated into standalone docs: commits unless they are purely documentation improvements unrelated to code changes.
Before each commit, verify:
Now proceed with these three phases. Remember to stop immediately if any git command fails.