commit-workflow
Skill48 starsChanged 17 days agoMITView on GitHub
Use when you're about to commit (especially with a mixed diff) to stage changes, split into atomic commits, and write Conventional Commit messages with emoji
- Reads credentials
4 other projects use a version of this.
Adopted by
Most recently taken up by
- MMACABRE/SKILLStheir own version, first seen Nov 8, 2026
- youhei-ushio/dotclaude-publictheir own version, first seen Sep 16, 2026
- pauloribeiro16/my-skillstheir own version, first seen May 28, 2026
- olegiv/codex-skillstheir own version, first seen Apr 26, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- olegiv/codex-skills★ 2same name
- MMACABRE/SKILLS★ 1same name
- pauloribeiro16/my-skills★ 1same name
- youhei-ushio/dotclaude-public★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository111 other files it gives its agents.
- AGENTS.mdAGENTS.md
- COPILOT-INSTRUCTIONS.mdCopilot instructions
- .github/copilot-instructions.mdCopilot instructions
- ai-visibilitySkill
- content-strategySkill
- seoSkill
- actions-debuggingSkill
- agentic-engineeringSkill
- autopilot-patternsSkill
- background-agentSkill
- context-primeSkill
- copilot-memorySkill
- cross-session-memorySkill
- ecosystem-intakeSkill
- fleet-parallelSkill
- github-code-searchSkill
- github-codespaces-efficiencySkill
- github-issue-triageSkill
- github-pr-workflowSkill
- ide-switchingSkill
- knowledge-curatorSkill
- mcp-builderSkill
- mcp-ecosystemSkill
- multi-model-strategySkill
- plan-mode-masterySkill
- scope-guardSkill
- session-managementSkill
- stack-detectorSkill
- sub-agent-sandboxingSkill
- task-intake-routerSkill
- team-plannerSkill
- token-cost-optimizerSkill
- api-and-interface-designSkill
- code-reviewSkill
- context-engineeringSkill
- cpp-debuggingSkill
- deprecation-and-migrationSkill
- diagnoseSkill
- fix-build-errorsSkill
- fix-github-issueSkill
- implementSkill
- improve-codebase-architectureSkill
- nestjs-prismaSkill
- nextjs-prismaSkill
- performance-optimizationSkill
- pr-multi-perspective-reviewSkill
- prototypeSkill
- react-vitestSkill
- receiving-code-reviewSkill
- refactor-cleanSkill
- reviewSkill
- skill-creatorSkill
- source-driven-developmentSkill
- spec-driven-developmentSkill
- systematic-debuggingSkill
- tdd-workflowSkill
- zoom-outSkill
- add-to-changelogSkill
- api-documentationSkill
- architecture-decisionsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 8 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Before every commit — to enforce conventional commit format consistently
- Distinctive: line 15
When a diff mixes multiple logical concerns (feat + refactor + docs)
- Distinctive: line 16
When you want emoji-annotated commits for visual git history
- Distinctive: line 28
If nothing is staged, stage everything and inspect what changed:
- Distinctive: line 63
Ask: *Do these changes serve more than one logical purpose?*
- Distinctive: line 71
If splitting, use git add -p to stage partial hunks:
- Distinctive: line 170
No issue or PR reference in the commit message
- Distinctive: line 184
One commit = one revert: if reverting a commit breaks something unrelated, it wasn't atomic
- Very specific: line 187
CI commit lint: if you enforce the format with commitlint, configure it to accept the leading emoji
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Commit Workflow
When to Use
- Before every commit — to enforce conventional commit format consistently
- When a diff mixes multiple logical concerns (feat + refactor + docs)
- When you want emoji-annotated commits for visual git history
- In teams that enforce Conventional Commits via CI
Prerequisites
- Changes staged or present as unstaged modifications
- Optional: pre-commit hooks configured (
husky,pre-commit, or similar)
Workflow
1. Stage and Inspect
If nothing is staged, stage everything and inspect what changed:
# Check current state
git --no-pager status --short
# Stage all if nothing is staged
$staged = git --no-pager diff --cached --name-only
if (-not $staged) { git add -A }
# Review the diff
git --no-pager diff --cached --stat2. Run Pre-Commit Checks (Optional)
# Node.js projects
npm run lint; if ($LASTEXITCODE -eq 0) { npm run build }
# Python projects
ruff check .; if ($LASTEXITCODE -eq 0) { pytest --tb=short -q }
# Generic pre-commit hooks
pre-commit run --all-filesSkip with --no-verify flag on the final commit if checks are handled externally.
3. Analyze the Diff for Atomic Splits
git --no-pager diff --cachedAsk: Do these changes serve more than one logical purpose?
Split when changes involve:
- Different concerns (e.g., new feature and bug fix)
- Different file types (e.g., source code and documentation)
- Different modules with no dependency between them
If splitting, use git add -p to stage partial hunks:
git add -p # interactive hunk selection4. Write the Commit Message
Format: <emoji> <type>(<scope>): <imperative description>
Type → Emoji mapping (most common):
| Type | Emoji | Use for |
feat | ✨ | New feature |
fix | 🐛 | Bug fix |
fix | 🚑️ | Critical hotfix |
docs | 📝 | Documentation only |
style | 💄 | Formatting, no logic change |
refactor | ♻️ | Code change without feat/fix |
perf | ⚡️ | Performance improvement |
test | ✅ | Adding or fixing tests |
chore | 🔧 | Build, tooling, config |
ci | 👷 | CI/CD changes |
revert | ⏪️ | Reverting a change |
wip | 🚧 | Work in progress |
security | 🔒️ | Security fix |
breaking | 💥 | Breaking change |
deps | ➕ | Add dependency |
deps | ➖ | Remove dependency |
Rules:
- First line ≤ 72 characters
- Imperative mood: "add feature" not "added feature"
- Scope is optional:
feat(auth): add JWT refresh
git commit -m "✨ feat(api): add pagination to /users endpoint"5. Multi-Commit Flow (Split Changes)
# First logical unit
git add src/api/users.ts
git commit -m "✨ feat(api): add cursor-based pagination to users endpoint"
# Second logical unit
git add docs/api.md
git commit -m "📝 docs(api): document pagination parameters for users endpoint"
# Third logical unit (cleanup found along the way)
git add src/utils/query.ts
git commit -m "♻️ refactor(utils): extract page-size validation into shared helper"Examples
Feature with Docs
git add -A
git commit -m "✨ feat(notifications): add real-time push alerts via WebSocket
- Implement WebSocket connection pool
- Add client-side reconnect logic with exponential backoff
- Write integration tests for disconnect/reconnect scenarios"Hotfix
git add src/auth/token.ts
git commit -m "🚑️ fix(auth): prevent JWT secret from leaking into error logs"Breaking Change
git commit -m "💥 feat(config)!: rename API_KEY to COPILOT_API_KEY
BREAKING CHANGE: rename environment variable API_KEY → COPILOT_API_KEY.
Update .env files and CI secrets before deploying."Common Rationalizations
| Rationalization | Reality |
| "Commit fast, clean up messages later" | Messages written later lose the original context. The intent at commit time is the most accurate. |
| "WIP commits will be squashed later" | PRs more often merge without squashing. Write meaningful commits from the start. |
| "Nobody reads commit messages" | git log, git blame, and git bisect all depend on commit messages. |
| "It's a small change, no type prefix needed" | Small changes are the easiest to classify. Without classification, changelogs become impossible. |
Red Flags
- Meaningless commit messages like
fix,update,changes,stuff - Multiple unrelated changes bundled in one commit
- No issue or PR reference in the commit message
- Hundreds of lines of changes committed as "minor fix"
- Tests and implementation in separate commits for the same feature
Verification
- Commit message follows the format above (
<emoji> <type>(<scope>): description) - Each commit contains exactly one logical change
- Breaking changes are marked with
BREAKING CHANGE: git log --onelinetells a readable story of the changes
Tips
- Check
git log --onelineafter — if you can't parse the history at a glance, the messages need work - One commit = one revert: if reverting a commit breaks something unrelated, it wasn't atomic
- Use
git commit --amendto fix the last message before pushing git add -pis your friend for splitting mixed diffs without stashing- CI commit lint: if you enforce the format with
commitlint, configure it to accept the leading emoji
See Also
add-to-changelog— keep CHANGELOG in sync after committing- Conventional Commits spec
- gitmoji reference
- Inspired by: awesome-claude-code/resources/slash-commands/commit
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

