skills/gen-commit-msg/SKILL.md
Generate concise commit messages based on conversation context and minimal git inspection.
npx skillsauth add acking-you/myclaude-skills gen-commit-msgInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill generates concise, meaningful commit messages by:
git diff when context is unavailableSimply invoke this skill after making changes. The skill will:
git diff --cached to analyze changes<type>: <brief summary (<=50 chars)>
[Optional body: concise explanation of what/why, <=3 lines]
[Optional footer: Breaking changes, issue refs]
feat: New featurefix: Bug fixrefactor: Code restructure without behavior changeperf: Performance improvementdocs: Documentation onlystyle: Formatting, whitespacetest: Add/update testschore: Build, tools, dependenciesbuild: Build system changesci: CI/CD changesHas context if:
No context if:
If context available:
If no context:
# Get list of changed files with status
git diff --cached --name-status
# Get file-level stats
git diff --cached --stat
# Get actual changes (for understanding what was done)
git diff --cached
# Alternative: if nothing staged, check working directory
git status --short
git diff --stat
git diff
Principles:
Good Examples:
feat: add scroll limit config commands
Add get-scroll-settings and set-scroll-limit commands
to es_tool.sh for managing ES scroll configuration.
fix: ensure bulk requests end with newline
ES bulk API requires NDJSON format with trailing newline.
refactor: translate es_tool comments to English
Bad Examples:
feat: implement comprehensive elasticsearch scroll configuration management system
This commit adds a full suite of commands for managing scroll-related
settings in Elasticsearch including viewing current configuration,
modifying document count limits, enabling/disabling rejection behavior...
[TOO VERBOSE]
# Show what will be committed
git status --short
# Present message
echo "Proposed commit message:"
echo "----------------------------------------"
echo "<generated_message>"
echo "----------------------------------------"
echo ""
read -p "Commit these changes? (y/n): " response
CRITICAL: The commit message MUST be clean and professional. DO NOT include:
🤖 Generated with [Claude Code] markersCo-Authored-By: Claude attributionsThese add no value and clutter the commit history.
# Commit with generated message (NO extra metadata)
git commit -m "$(cat <<'EOF'
<generated_message>
EOF
)"
# Show result
git log -1 --oneline
START
|
v
Do we have conversation context about changes?
|
+-- YES --> Use context to generate message
| (Skip git diff)
|
+-- NO --> Run git diff to analyze changes
|
v
Are changes staged?
|
+-- YES --> git diff --cached
|
+-- NO --> git diff (working directory)
|
v
Generate concise commit message
|
v
Present to user for confirmation
|
v
User confirms?
|
+-- YES --> git commit
|
+-- NO --> Exit (no commit)
|
v
END
Conversation:
User: Add health check commands to es_tool.sh
Assistant: [edits es_tool.sh, adds check-health, check-shards, etc.]
User: Create a commit
Skill execution:
feat: add cluster health check commands
Implements check-health, check-shards, explain-allocation,
and fix-red-shards for ES cluster diagnostics.
Conversation:
User: Generate commit message
Skill execution:
diff --git a/script/es_tool.sh b/script/es_tool.sh
@@ -841,7 +841,7 @@ execute_http_request() {
- content_type="text/plain"
+ content_type="application/x-ndjson"
+ # Ensure body ends with newline
+ if [[ "$body" != *$'\n' ]]; then
+ body="${body}"$'\n'
+ fi
fix: correct bulk request content-type
Use application/x-ndjson and ensure trailing newline
for ES bulk API NDJSON format compliance.
Conversation:
User: Commit the fix for the bulk API newline issue
Skill execution:
git diff --cached --name-only (just filenames)
script/es_tool.sh
fix: ensure bulk requests end with newline
Add trailing newline to bulk request body for
ES NDJSON format requirements.
When user requests creating a tag (for CI/CD pipeline trigger, release, etc.):
Check existing tag format first:
git tag --sort=-creatordate | head -5
Keep format consistent - DO NOT add 'v' prefix unless project already uses it:
0.4.0, 0.3.0 → use 0.4.1 (no 'v')v0.4.0, v0.3.0 → use v0.4.1 (with 'v')Never assume tag format - always verify from existing tags
development
Write precise technical implementation docs (developer or user) with clear structure, accurate flows, render-safe Mermaid diagrams, and audience-appropriate detail; avoid boilerplate; include a meaningful Code Index for developer docs.
documentation
Generate technical design documents with proper structure, diagrams, and implementation details. Default language is English unless user requests Chinese.
development
Write code-driven technical blog posts with data-flow narrative, rich Mermaid visuals, and citation-backed claims. Covers source code deep dives, architecture analysis, and doc-driven comparisons.
development
Structured web research with multi-source validation. Output reports with complete citation links. Focus on key results, verify information quality.