About commit
commit is a skill that guides git changes through review, logical grouping, approval, and sequential commits. It is for developers and coding agents that need to create conventional commits while keeping unrelated changes separate.
Key features
- 01Checks git status and reviews diffs
- 02Groups related files into commits
- 03Requests approval before committing
- 04Uses conventional commit messages
- 05Confirms commits and reports results
Use cases
- 01Preparing a feature across multiple files for commit
- 02Separating documentation from code changes
- 03Creating approved commits without pushing
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ ghalex/ skills --skill commitAfter installing, type/commitin Claude Code to confirm it loaded.
Bundled filesREADME.md
Details
From the project READMEYou are about to create git commit(s). Follow these steps:
-
Check git status:
- Run
git statusto see all unstaged and staged files - Show me what files have changed
- Run
-
Review the changes:
- Run
git diffto see the actual changes in all modified files - Analyze all changes to understand what was modified
- Run
-
Group files by related changes:
- Analyze the changes and group files into logical commits
- Grouping criteria:
- Files that implement the same feature together
- UI components in one commit, Redux changes in another
- Documentation updates separate from code changes
- Configuration files (package.json, .md files) grouped by purpose
- Agent files (.agents/) grouped together if related
- Examples:
- Group 1:
simple-signup-form.tsx(new UI component) - Group 2:
CLAUDE.md,redux-agent.md,ui-agent.md(documentation) - Group 3:
package.json(dependency or script changes) - Group 4:
store/users/api.ts,store/users/slice.ts,store/users/index.ts(Redux module)
- Group 1:
-
Present the grouping plan:
- Show me the proposed groups and ask for confirmation
- Format:
Commit 1: feat(ui): add simple signup form - src/components/custom/simple-signup-form.tsx Commit 2: docs: add redux and ui agent instructions - .agents/redux-agent.md - .agents/ui-agent.md - CLAUDE.md Commit 3: chore: add lint:file script to package.json - package.json - Wait for my approval or adjustments
-
Create commits sequentially: For each approved group:
- Run
git add <files>for only the files in that group - Create a meaningful commit message following conventional commit format:
- Format:
type(scope): description - Types: feat, fix, refactor, docs, style, test, chore
- Keep the first line under 72 characters
- Format:
- Run
git commit -m "message"with the generated message - Run
git log -1to confirm the commit
- Run
-
Final summary:
- Run
git log -<n>where n = number of commits created - Show me all commits that were created
- Run
Conventional Commit Examples:
feat(ui): add simple signup form with Field componentsfeat(redux): add user preferences state managementfix(auth): prevent duplicate loading states in slicesdocs: update CLAUDE.md with redux-agent instructionsdocs(agents): add ui-agent workflow documentationrefactor(auth): improve token validation logicchore: add lint:file script to package.jsonstyle(ui): update button component spacing
Important Rules:
- NEVER include unrelated files in the same commit
- ALWAYS ask for confirmation before creating commits
- DO NOT push to remote unless I explicitly ask you to
- If there's only one logical group, create a single commit
Comments
Markdown supported