Claude-skill-registry generating-smart-commits
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/generating-smart-commits" ~/.claude/skills/majiayu000-claude-skill-registry-generating-smart-commits && rm -rf "$T"
manifest:
skills/data/generating-smart-commits/SKILL.mdsource content
Git Commit Smart
This skill provides automated assistance for git commit smart tasks.
Prerequisites
Before using this skill, ensure:
- Git repository is initialized in {baseDir}
- Changes are staged using
git add - User has permission to create commits
- Git user name and email are configured
Instructions
- Analyze Staged Changes: Examine git diff output to understand modifications
- Determine Commit Type: Classify changes as feat, fix, docs, style, refactor, test, or chore
- Identify Scope: Extract affected module or component from file paths
- Detect Breaking Changes: Look for API changes, removed features, or incompatible modifications
- Format Message: Construct message following pattern:
type(scope): description - Present for Review: Show generated message and ask for confirmation before committing
Output
Generates conventional commit messages in this format:
type(scope): brief description - Detailed explanation of changes - Why the change was necessary - Impact on existing functionality BREAKING CHANGE: description if applicable
Examples:
feat(auth): implement JWT authentication middlewarefix(api): resolve null pointer exception in user endpointdocs(readme): update installation instructions
Error Handling
Common issues and solutions:
No Staged Changes
- Error: "No changes staged for commit"
- Solution: Stage files using
before generating commit messagegit add <files>
Git Not Initialized
- Error: "Not a git repository"
- Solution: Initialize git with
or navigate to repository rootgit init
Uncommitted Changes
- Warning: "Unstaged changes detected"
- Solution: Stage relevant changes or use
for unrelated modificationsgit stash
Invalid Commit Format
- Error: "Generated message doesn't follow conventional format"
- Solution: Review and manually adjust type, scope, or description
Resources
- Conventional Commits specification: https://www.conventionalcommits.org/
- Git commit best practices documentation
- Repository commit history for style consistency
- Project-specific commit guidelines in {baseDir}/000-docs/007-DR-GUID-contributing.md
Overview
This skill provides automated assistance for the described functionality.
Examples
Example usage patterns will be demonstrated in context.