Context-engineering-kit git:commit
Create well-formatted commits with conventional commit messages and emoji
install
source · Clone the upstream repo
git clone https://github.com/NeoLabHQ/context-engineering-kit
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeoLabHQ/context-engineering-kit "$T" && mkdir -p ~/.claude/skills && cp -r "$T/plugins/git/skills/commit" ~/.claude/skills/neolabhq-context-engineering-kit-git-commit && rm -rf "$T"
manifest:
plugins/git/skills/commit/SKILL.mdsource content
Claude Command: Commit
Your job is to create well-formatted commits with conventional commit messages and emoji.
Instructions
CRITICAL: Perform the following steps exactly as described:
- Branch check: Checks if current branch is
ormaster
. If so, asks the user whether to create a separate branch before committing. If user confirms a new branch is needed, creates one using the patternmain
(e.g.,<type>/<username>/<description>
)feature/leovs09/add-new-command - Unless specified with
, automatically runs pre-commit checks like--no-verify
or simular depending on the project language.pnpm lint - Checks which files are staged with
git status - If 0 files are staged, automatically adds all modified and new files with
git add - Performs a
to understand what changes are being committedgit diff - Analyzes the diff to determine if multiple distinct logical changes are present
- If multiple distinct changes are detected, suggests breaking the commit into multiple smaller commits
- 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
- Atomic commits: Each commit should contain related changes that serve a single purpose
- Split large changes: If changes touch multiple concerns, split them into separate commits
- Conventional commit format: Use the format
where type is one of:<type>: <description>
: A new featurefeat
: A bug fixfix
: Documentation changesdocs
: Code style changes (formatting, etc)style
: Code changes that neither fix bugs nor add featuresrefactor
: Performance improvementsperf
: Adding or fixing teststest
: Changes to the build process, tools, etc.chore
- Present tense, imperative mood: Write commit messages as commands (e.g., "add feature" not "added feature")
- Concise first line: Keep the first line under 72 characters
- Emoji: Each commit type is paired with an appropriate emoji:
- ✨
: New featurefeat - 🐛
: Bug fixfix - 📝
: Documentationdocs - 💄
: Formatting/stylestyle - ♻️
: Code refactoringrefactor - ⚡️
: Performance improvementsperf - ✅
: Teststest - 🔧
: Tooling, configurationchore - 🚀
: CI/CD improvementsci - 🗑️
: Reverting changesrevert - 🧪
: Add a failing testtest - 🚨
: Fix compiler/linter warningsfix - 🔒️
: Fix security issuesfix - 👥
: Add or update contributorschore - 🚚
: Move or rename resourcesrefactor - 🏗️
: Make architectural changesrefactor - 🔀
: Merge brancheschore - 📦️
: Add or update compiled files or packageschore - ➕
: Add a dependencychore - ➖
: Remove a dependencychore - 🌱
: Add or update seed fileschore - 🧑💻
: Improve developer experiencechore - 🧵
: Add or update code related to multithreading or concurrencyfeat - 🔍️
: Improve SEOfeat - 🏷️
: Add or update typesfeat - 💬
: Add or update text and literalsfeat - 🌐
: Internationalization and localizationfeat - 👔
: Add or update business logicfeat - 📱
: Work on responsive designfeat - 🚸
: Improve user experience / usabilityfeat - 🩹
: Simple fix for a non-critical issuefix - 🥅
: Catch errorsfix - 👽️
: Update code due to external API changesfix - 🔥
: Remove code or filesfix - 🎨
: Improve structure/format of the codestyle - 🚑️
: Critical hotfixfix - 🎉
: Begin a projectchore - 🔖
: Release/Version tagschore - 🚧
: Work in progresswip - 💚
: Fix CI buildfix - 📌
: Pin dependencies to specific versionschore - 👷
: Add or update CI build systemci - 📈
: Add or update analytics or tracking codefeat - ✏️
: Fix typosfix - ⏪️
: Revert changesrevert - 📄
: Add or update licensechore - 💥
: Introduce breaking changesfeat - 🍱
: Add or update assetsassets - ♿️
: Improve accessibilityfeat - 💡
: Add or update comments in source codedocs - 🗃️
: Perform database related changesdb - 🔊
: Add or update logsfeat - 🔇
: Remove logsfix - 🤡
: Mock thingstest - 🥚
: Add or update an easter eggfeat - 🙈
: Add or update .gitignore filechore - 📸
: Add or update snapshotstest - ⚗️
: Perform experimentsexperiment - 🚩
: Add, update, or remove feature flagsfeat - 💫
: Add or update animations and transitionsui - ⚰️
: Remove dead coderefactor - 🦺
: Add or update code related to validationfeat - ✈️
: Improve offline supportfeat
- ✨
Guidelines for Splitting Commits
When analyzing the diff, consider splitting commits based on these criteria:
- Different concerns: Changes to unrelated parts of the codebase
- Different types of changes: Mixing features, fixes, refactoring, etc.
- File patterns: Changes to different types of files (e.g., source code vs documentation)
- Logical grouping: Changes that would be easier to understand or review separately
- Size: Very large changes that would be clearer if broken down
Examples
Good commit messages:
- ✨ feat: add user authentication system
- 🐛 fix: resolve memory leak in rendering process
- 📝 docs: update API documentation with new endpoints
- ♻️ refactor: simplify error handling logic in parser
- 🚨 fix: resolve linter warnings in component files
- 🧑💻 chore: improve developer tooling setup process
- 👔 feat: implement business logic for transaction validation
- 🩹 fix: address minor styling inconsistency in header
- 🚑️ fix: patch critical security vulnerability in auth flow
- 🎨 style: reorganize component structure for better readability
- 🔥 fix: remove deprecated legacy code
- 🦺 feat: add input validation for user registration form
- 💚 fix: resolve failing CI pipeline tests
- 📈 feat: implement analytics tracking for user engagement
- 🔒️ fix: strengthen authentication password requirements
- ♿️ feat: improve form accessibility for screen readers
Example of splitting commits:
- First commit: ✨ feat: add new solc version type definitions
- Second commit: 📝 docs: update documentation for new solc versions
- Third commit: 🔧 chore: update package.json dependencies
- Fourth commit: 🏷️ feat: add type definitions for new API endpoints
- Fifth commit: 🧵 feat: improve concurrency handling in worker threads
- Sixth commit: 🚨 fix: resolve linting issues in new code
- Seventh commit: ✅ test: add unit tests for new solc version features
- Eighth commit: 🔒️ fix: update dependencies with security vulnerabilities
Command Options
: Skip running the pre-commit checks (lint, build, generate:docs)--no-verify
Branch Naming Convention
When committing on
master or main, the command will ask if you want to create a new branch. If yes, it creates a branch following this pattern:
<type>/<git-username>/<description>
Components:
: The commit type (feature, fix, docs, refactor, perf, test, chore, etc.)<type>
: Your git username (obtained from<git-username>
or the system username)git config user.name
: A kebab-case description of the change (e.g.,<description>
,add-user-auth
)fix-login-bug
Examples:
feature/leovs09/add-new-commandfix/johndoe/resolve-memory-leakdocs/alice/update-api-docsrefactor/bob/simplify-error-handlingchore/charlie/update-dependencies
Workflow:
- Command detects you're on
ormastermain - Asks: "You're on the main branch. Do you want to create a separate branch?"
- If "No": Proceeds with commit on current branch
- If "Yes": Analyzes your changes to determine the type, asks for a brief description, creates the branch, and proceeds with commit
Important Notes
- By default, pre-commit checks (
,pnpm lint
,pnpm build
) will run to ensure code qualitypnpm generate:docs - If these checks fail, you'll be asked if you want to proceed with the commit anyway or fix the issues first
- If specific files are already staged, the command will only commit those files
- If no files are staged, it will automatically stage all modified and new files
- The commit message will be constructed based on the changes detected
- Before committing, the command will review the diff to identify if multiple commits would be more appropriate
- If suggesting multiple commits, it will help you stage and commit the changes separately
- Always reviews the commit diff to ensure the message matches the changes