commit-message
Original:🇺🇸 English
Translated
AUTOMATICALLY invoke this skill whenever git commit is needed - no user request required. Direct git commit will FAIL validation. This skill contains required pre-commit setup. Triggers: "커밋해", "커밋 ㄱㄱ", "커밋 만들어줘", "커밋 찍어줘", or ANY situation requiring git commit.
1installs
Sourcejunoh-moon/skills
Added on
NPX Install
npx skill4agent add junoh-moon/skills commit-messageTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Commit Message Skill
This skill creates a git commit with the required format. Follow these steps:
1. Branch Safety Check (for bucketplace repos)
First, check if this is a bucketplace organization repo:
bash
git remote get-url origin 2>/dev/null | grep -q 'bucketplace' && echo "bucketplace" || echo "other"If bucketplace repo, check the current branch:
bash
git branch --show-currentIf on a protected branch (, , ):
mainmasterdevelop- If a Jira ticket exists in the context (e.g., COREPL-1234):
- Check if branch already exists:
git branch --list <TICKET-ID> - If exists, add a suffix (e.g., ,
COREPL-1234-2)COREPL-1234-refactor - Create the branch:
git checkout -b <branch-name> - Proceed with the commit on this new branch
- Check if branch already exists:
- If no Jira ticket:
- Generate a descriptive branch name based on the changes (e.g., ,
fix/login-validation)feat/add-cache-layer - Create the branch and proceed with the commit
- Generate a descriptive branch name based on the changes (e.g.,
2. Check staged changes
Run to see what will be committed.
If nothing is staged, run and add relevant files individually (NEVER use or ).
git diff --cachedgit statusgit add -Agit add -u2. Generate commit message
Based on the staged changes, create a commit message:
- First line: conventional commit format (feat:, fix:, docs:, etc.) under 72 chars in English
- Empty line
- Body: wrapped at 72 chars, explaining what and why in Korean
3. Execute the commit
Use heredoc syntax for the commit:
bash
git commit -m "$(cat <<'EOF'
<type>: <subject in English>
<body in Korean, wrapped at 72 chars>
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"4. Verify
Run to confirm the commit was created successfully.
git status