AgentSkillsCN

commit-messages

通过检查项目源代码和采访工程师,生成详尽完整且准确的Datadog软件目录实体YAML文件(v3模式)。当工程师需要为服务、数据存储、队列、API或系统创建或更新entity.datadog.yaml文件时使用。触发词包括:“创建实体yaml”、“生成服务目录条目”、“在Datadog中记录这个项目”、“创建服务定义”、“添加到软件目录”或任何涉及Datadog实体/服务文档的请求。支持所有v3实体种类:服务、数据存储、队列、API、系统。通过API获取现有Datadog数据。根据官方JSON模式验证。与现有定义合并。输出到.datadog/目录。

SKILL.md
--- frontmatter
name: commit-messages
description: Write clear commit messages. Use when asked to commit changes, write a commit message, prepare a commit, or describe changes for version control.

Committing Changes

Make small, atomic commits with clear messages.

Workflow

1. Understand the Changes

If you don't already understand the changes, review them first:

bash
git diff HEAD
git status --short

2. Stage and Commit

Make small, atomic commits—each commit should address one logical change. If your work spans multiple concerns (e.g., a refactor and a bug fix), break it into separate commits.

bash
# Stage entire files
git add <files>

# Or stage specific hunks for finer control
git hunks list                            # List all hunks with IDs
git hunks add 'file:@-old,len+new,len'    # Stage specific hunks by ID

git commit -m "title" -m "body paragraph"

3. Commit Message Format

Title (first line):

  • Limit to 60 characters maximum
  • Use lowercase except for symbols or acronyms
  • Use imperative mood ("add feature" not "adds feature")
  • Use a short prefix for readability in git log --oneline (avoid "fix:" or "feature:" prefixes)

Body:

  • Explain what the change does and why
  • Use proper grammar and punctuation
  • Use imperative mood throughout

Trailers:

  • If fixing a ticket, add appropriate trailers
  • If fixing a regression, add a "Fixes:" trailer with the commit id and title