跳到正文
Skillpedia
通用编程33k · #9083

commit

它能做什么

这项技能指导你的智能体按照统一格式撰写 git 提交信息。适合希望项目历史干净、易读的开发人员。

适用场景

  • ✓让智能体提交代码改动并撰写提交信息的时候。
  • ✓想让提交信息说明改了什么以及为什么改的时候。
  • ✓需要把提交关联到某个议题,使其被关闭或被引用的时候。

技能链接

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/sentry/commit/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/sentry/commit/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请为这些改动撰写提交信息,并将其关联到议题 1234。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体选择 fix 或 feat 等提交类型,写一句简短的祈使句标题,补充正文,并加入议题引用。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Sentry Commit Messages

Follow these conventions when creating commits for Sentry projects.

Format

<type>(<scope>): <subject>

<body>

<footer>

The header is required. Scope is optional. All lines must stay under 100 characters.

Commit Types

Type Purpose
feat New feature
fix Bug fix
ref Refactoring (no behavior change)
perf Performance improvement
docs Documentation only
test Test additions or corrections
build Build system or dependencies
ci CI configuration
chore Maintenance tasks
style Code formatting (no logic change)
meta Repository metadata
license License changes

Subject Line Rules

  • Use imperative, present tense: "Add feature" not "Added feature"
  • Capitalize the first letter
  • No period at the end
  • Maximum 70 characters

Body Guidelines

  • Explain what and why, not how
  • Use imperative mood and present tense
  • Include motivation for the change
  • Contrast with previous behavior when relevant

Footer: Issue References

Reference issues in the footer using these patterns:

Fixes GH-1234
Fixes #1234
Fixes SENTRY-1234
Refs LINEAR-ABC-123
  • Fixes closes the issue when merged
  • Refs links without closing

Examples

Simple fix

fix(api): Handle null response in user endpoint

The user API could return null for deleted accounts, causing a crash
in the dashboard. Add null check before accessing user properties.

Fixes SENTRY-5678

Feature with scope

feat(alerts): Add Slack thread replies for alert updates

When an alert is updated or resolved, post a reply to the original
Slack thread instead of creating a new message. This keeps related
notifications grouped together.

Refs GH-1234

Refactor

ref: Extract common validation logic to shared module

Move duplicate validation code from three endpoints into a shared
validator class. No behavior change.

Breaking change

feat(api)!: Remove deprecated v1 endpoints

Remove all v1 API endpoints that were deprecated in version 23.1.
Clients should migrate to v2 endpoints.

BREAKING CHANGE: v1 endpoints no longer available
Fixes SENTRY-9999

Revert Format

revert: feat(api): Add new endpoint

This reverts commit abc123def456.

Reason: Caused performance regression in production.

Principles

  • Each commit should be a single, stable change
  • Commits should be independently reviewable
  • The repository should be in a working state after each commit

References

常见问题

什么是常规提交(Conventional Commit)?

这是一种标准格式,提交信息以类型开头,例如 fix、feat 或 docs。

标题应该多长?

该技能说明,标题应使用祈使语气,且不超过 70 个字符。

能自动关闭议题吗?

能。在页脚中使用 Fixes,合并改动后会关闭所引用的议题。

详情

作者的原始描述

Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.

repo: davila7/claude-code-templates

热度

GitHub 星标
33k
排名
#9083
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能