micro-commit
npx skills add https://github.com/gendosu/agent-skills --skill micro-commit
Agent 安装分布
Skill 文档
This approach is inspired by Lucas Rocha’s micro-commit methodology, which emphasizes breaking down changes into small, logical, and independently meaningful commits.
Core Guidelines
Before starting any task, read and follow /key-guidelines
Commits unstaged changes by grouping them into logical micro-commits using the git-operations-specialist skill.
Dependencies
- use git-operations-specialist skill
Instructions
IMPORTANT: Use the git-operations-specialist skill (via Skill tool) for ALL git-related operations in this command.
Analyze all unstaged changes and execute multiple micro-commits, grouping related changes together.
Required Execution Items
-
Check Current Status: Run
git statusto identify all unstaged changes -
Group Changes by Context: Analyze the changes and group them logically:
- By File Type: Group similar file types (e.g., all TypeScript files, all config files)
- By Feature: Group files that implement the same feature
- By Layer: Group by architectural layer (e.g., API changes, frontend changes, database changes)
- By Purpose: Group by purpose (e.g., new features, bug fixes, refactoring, configuration)
-
Create Micro-Commits: For each logical group:
- Stage only the files in that group using
git add - Create a focused commit with a clear message
- Verify the commit was successful
- Stage only the files in that group using
-
Commit Message Guidelines:
- Follow the
.gitmessagetemplate format - Use appropriate commit type prefixes:
feat,fix,refactor,docs,style,test,chore - Each commit should describe ONE logical change
- Follow the
-
Final Verification: After all commits, run
git statusto confirm no changes remain unstaged
â ï¸ Important Constraints
- Stage files explicitly – Use
git add <file>for each group before committing - Use HEREDOC – Maintain proper formatting of commit messages
- One Context Per Commit – Each commit should represent a single logical change
- Sequential Processing – Process one group at a time, verifying each commit before moving to the next
Example Grouping Strategy
If you have changes to:
apps/api/src/routes/timeline.ts(API logic)apps/dashboard/src/types/api.ts(Type definitions)apps/dashboard/src/components/TimelineVisjs.tsx(UI component)apps/api/tsconfig.json(Configuration)
Group them as:
- Commit 1: API logic changes (
apps/api/src/routes/timeline.ts) - Commit 2: Type definitions (
apps/dashboard/src/types/api.ts) - Commit 3: UI component changes (
apps/dashboard/src/components/TimelineVisjs.tsx) - Commit 4: Configuration changes (
apps/api/tsconfig.json)