Git commit
A sample repository for Agent Skills
npx -y skills add puku0x/agent-skills-test --skill git-commitAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Create Git commit messages following Conventional Commits format with automatic type and scope detection. Use when asked to "commit changes", "create a commit", "write commit message", or when ready to commit staged code. Supports feat, fix, docs, refactor, test, build, ci, chore, and revert types with project-specific scope determination based on file paths and directory structure.
SKILL.md
3.3 KB, as published. Nobody here has run it
Git Commit Skill
This skill guides the creation of Git commit messages that follow the Conventional Commits format.
When to Use
Use this skill when:
- Code changes are completed and ready to be committed
- Need to create a commit message that adheres to project conventions
Commit Message Format
The commit message must follow this format:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Instructions
- Check the staged files using
git diff --staged --name-only. Ask user to stage changes if there are no staged files. - Determine the appropriate commit type based on the staged files.
type must be selected from the following options:
feat: New feature or change to existing functionalityfix: Bug fixdocs: Documentation-only changes (e.g., changes to*.mdfiles)refactor: Refactoring (code changes that neither fix a bug nor add a feature)perf: Performance improvementstest: Adding or modifying tests (e.g., changes to*.spec.*or*.spec.*.snapfiles)build: Changes affecting the build system or external dependenciesci: Changes to CI configuration files (e.g., changes within.github/actionsor.github/workflows)chore: Other changes (e.g., changes to*.json,*.config.mjs,*.config.cjs,*.config.js,*.config.ts,.gitignore,.gitattributes,.prettierignore,.prettier)revert: Reverting a previous commit
- Determine the appropriate scope based on the staged files and the project structure.
scope should be determined based on the directory structure of the staged files. For example:
- If staged files are in
.claude/or.mcp.json, useclaude - If staged files are in
.github/, usegithub - If staged files are in
.vscode/, usevscode - If staged files are in
apps/frontend/, usefrontend - If staged files are in
libs/frontend/feature-xxx, usefrontend-feature-xxx - If staged files are in
libs/utils/, useutils - If staged files are in the root directory, do not set a scope
- Craft a comprehensive and descriptive commit message strictly following the Conventional Commits format.
Important NEVER include \n in the commit message. Always use actual newlines to separate the subject, body, and footer.
Example:
git commit -m "feat(utils): update xxx function
- Add xxx logic in xxx function
- Implement unit tests for xxx function
Co-Authored-By: Copilot <[email protected]>"
Notes
- Important Commit messages must be written in English.
- If there are staged changes, determine the commit message based only on the staged changes.
- Always include
Co-Authored-Byinformation. The commit message must clearly indicate that it was created with Copilot.