AgentSkillsCN

commit-msg

根据实际变更,分析 Git 提交记录并生成更优质的提交信息。当您需要修改提交信息、审查提交质量,或撰写提交内容时,这一技能将助您轻松应对。触发条件包括“commit message”、“amend commit”、“fix commits”、“reword commits”等术语。

SKILL.md
--- frontmatter
name: commit-msg
description: Analyze git commits and generate better commit messages based on actual changes. Use when amending commit messages, reviewing commit quality, or writing commits. Triggers on terms like "commit message", "amend commit", "fix commits", "reword commits".
user-invocable: true

Commit Message Skill

Generates and improves commit messages following conventional commits format.

Conventional Commits Format

code
<type>(<scope>): <description>

[optional body]

[optional footer]

Types

TypeUse For
featNew feature
fixBug fix
docsDocumentation only
styleFormatting, no code change
refactorCode change that neither fixes a bug nor adds feature
perfPerformance improvement
testAdding or updating tests
choreMaintenance tasks
ciCI/CD changes
buildBuild system changes

Scopes for This Project

ScopeDescription
bitsBitVec, rank/select, popcount
bpBalanced parentheses
jsonJSON semi-indexing
jqjq query language
simdSIMD implementations
cliCLI tool
benchBenchmarks
docsDocumentation

Examples

Feature Addition

code
feat(json): add PFSM table-driven parser

Implements parallel finite state machine approach from hw-json-simd.
Achieves 880 MiB/s throughput on x86_64 (AMD Zen 4), 40-77% faster than scalar.

Bug Fix

code
fix(bp): correct find_close for edge case at word boundary

Fixes #42

Performance Improvement

code
perf(popcount): add AVX-512 VPOPCNTDQ implementation

5.2x faster than scalar for large bitvectors.
Requires Intel Ice Lake+ or AMD Zen 4+.

Refactoring

code
refactor(jq): replace deprecated last() with next_back()

Removes dead code and simplifies iterator handling.

Instructions

  1. Read the staged changes with git diff --cached
  2. Understand what changed and why
  3. Choose appropriate type and scope
  4. Write a concise subject line (50 chars ideal, 72 max)
  5. Add body if changes need explanation
  6. Include footer for breaking changes or issue references

Commit Message Rules

  1. Subject line: Imperative mood ("add" not "added")
  2. No period at end of subject line
  3. Blank line between subject and body
  4. Body: Explain what and why, not how
  5. Footer: Reference issues, note breaking changes