Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计通过

gen-commit-msg生成提交消息

Agent Skill

gen-commit-msg 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

220

周安装

9

GitHub Stars

6

下载量

71
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gen-commit-msg(生成提交消息)
来源仓库:https://github.com/acking-you/myclaude-skills
仓库路径:skills/gen-commit-msg
安装命令:
npx skills add https://github.com/acking-you/myclaude-skills --skill gen-commit-msg
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/acking-you/myclaude-skills --skill gen-commit-msg

简介

gen-commit-msg 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词或任务场景快速定位候选结果。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用。
  • 安装前需确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Generate Commit Message Skill

Overview

This skill generates concise, meaningful commit messages by:

  1. First priority: Use conversation context (files edited, changes discussed)
  2. Fallback: Run git diff when context is unavailable
  3. Keep messages brief and focused

When to Use

  • After implementing changes discussed in the conversation
  • When you want a commit message that reflects the actual work done
  • To quickly commit without manual message writing

Usage

Simply invoke this skill after making changes. The skill will:

  1. Check conversation context for what was changed
  2. If no context: run git diff --cached to analyze changes
  3. Generate a concise commit message
  4. Prompt for user confirmation before committing

Commit Message Format

<type>: <brief summary (<=50 chars)>

[Optional body: concise explanation of what/why, <=3 lines]

[Optional footer: Breaking changes, issue refs]

Type Prefixes

  • feat: New feature
  • fix: Bug fix
  • refactor: Code restructure without behavior change
  • perf: Performance improvement
  • docs: Documentation only
  • style: Formatting, whitespace
  • test: Add/update tests
  • chore: Build, tools, dependencies
  • build: Build system changes
  • ci: CI/CD changes

Implementation Guidelines

Step 1: Check Conversation Context

Has context if:

  • Files were edited via Write/Edit tools in this conversation
  • User described what was changed
  • Features/fixes were discussed

No context if:

  • User just says "commit my changes" without prior discussion
  • Changes were made outside this conversation
  • Files were modified manually by user

Step 2: Get Change Information

If context available:

  • Use known file edits and changes
  • Skip git diff entirely

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

Step 3: Generate Concise Message

Principles:

  • Brevity: Summary <=50 chars, body <=3 lines
  • What, not how: Describe the outcome, not implementation
  • Imperative mood: add, fix, update (not added, fixed)

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]

Step 4: Present and Confirm

# 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

Step 5: Execute Commit

CRITICAL: The commit message MUST be clean and professional. DO NOT include:

  • 🤖 Generated with [Claude Code] markers
  • Co-Authored-By: Claude attributions
  • Any other tool-generated metadata or signatures

These 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

Decision Flow

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

Examples

Example 1: With Context (No Git Diff)

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:

  1. Context available: Edited es_tool.sh, added health check commands
  2. Skip git diff
  3. Generate: feat: add cluster health check commands Implements check-health, check-shards, explain-allocation, and fix-red-shards for ES cluster diagnostics.

Example 2: No Context (Use Git Diff)

Conversation:

User: Generate commit message

Skill execution:

  1. No context available
  2. Run git diff --cached: 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
  3. Analyze: Changed content-type for bulk requests, added newline
  4. Generate: fix: correct bulk request content-type Use application/x-ndjson and ensure trailing newline for ES bulk API NDJSON format compliance.

Example 3: User Provides Context

Conversation:

User: Commit the fix for the bulk API newline issue

Skill execution:

  1. Context from user: "fix for bulk API newline issue"
  2. Quick check: git diff --cached --name-only (just filenames) script/es_tool.sh
  3. Generate (minimal diff needed): fix: ensure bulk requests end with newline Add trailing newline to bulk request body for ES NDJSON format requirements.

Best Practices

DO:

  • Use conversation context when available
  • Run git diff when context is missing
  • Keep summary under 50 characters
  • Use imperative mood (add, fix, update)
  • Focus on WHAT and WHY
  • Confirm with user before committing

DON'T:

  • Skip git diff when you have no context
  • Write verbose explanations
  • Describe HOW code was implemented
  • Auto-commit without confirmation
  • Use past tense (added, fixed, updated)

Git Tags

When user requests creating a tag (for CI/CD pipeline trigger, release, etc.):

  1. Check existing tag format first: git tag --sort=-creatordate | head -5
  2. Keep format consistent - DO NOT add 'v' prefix unless project already uses it:

- If existing: 0.4.0, 0.3.0 → use 0.4.1 (no 'v') - If existing: v0.4.0, v0.3.0 → use v0.4.1 (with 'v')

  1. Never assume tag format - always verify from existing tags

Notes

  • Optimizes for speed by using context when available
  • Falls back to git diff when needed for accuracy
  • Generates concise but informative messages
  • Always confirms before committing
  • Works in both interactive and standalone scenarios

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

windsurf

28.67%
按下载量换算20

Codex

23.16%
按下载量换算16

github-copilot

17.8%
按下载量换算13

Claude Code

12.4%
按下载量换算9

Antigravity

8.12%
按下载量换算6

Gemini CLI

3.28%
按下载量换算2

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills