git-workflow/commit
Creates commits in conventional commit format, with a message written from the changes.
- Kind
- Prompt
- Works with
- Claude Code
- Source
- Claude Code Templates @ 72e5f237f64d
- Path
- cli-tool/components/commands/git-workflow/commit.md
- License
- MIT
- Jobs
- Git workflow
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
# Smart Git Commit Create well-formatted commit: $ARGUMENTS ## Current Repository State - Git status: !`git status --porcelain` - Current branch: !`git branch --show-current` - Staged changes: !`git diff --cached --stat` - Unstaged changes: !`git diff --stat` - Recent commits: !`git log --oneline -5` ## What This Command Does 1. Unless specified with `--no-verify`, automatically runs pre-commit checks: - `pnpm lint` to ensure code quality - `pnpm build` to verify the build succeeds - `pnpm generate:docs` to update documentation 2. Checks which files are staged with `git status` 3. If 0 files are staged, automatically adds all modified and new files with `git add` 4. Performs a `git diff` to understand what changes are being committed 5. Analyzes the diff to determine if multiple distinct logical changes are present 6. If multiple distinct changes are detected, suggests breaking the commit into multiple smaller commits 7. For each commit (or the single commit if not split), creates a commit message using emoji conventional commit format ## Best Practices for Commits - **Verify before committing**: Ensure code is linted, builds correctly, and documentation is updated …