← 返回 Skills 市场
samber

Conventional Git

作者 Samuel Berthe · GitHub ↗ · v1.2.0 · MIT-0
cross-platform ✓ 安全检测通过
193
总下载
0
收藏
0
当前安装
4
版本数
在 OpenClaw 中安装
/install conventional-git
功能描述
Conventional Commits v1.0.0 branch naming, worktree naming, and commit message standards for GitHub and GitLab projects. Use when creating branches, naming w...
使用说明 (SKILL.md)

Conventional Commits & Branch Naming

Follow Conventional Commits v1.0.0 for both branch names and commit messages — consistent naming lets tools auto-generate changelogs, enforce SemVer bumps, and filter history by concern.

Branch Naming

Format: \x3Ctype>/[issue-]\x3Cdescription> — lowercase, hyphens only, no special chars except /.

feat/user-authentication
feat/42-user-authentication
fix/login-race-condition
fix/87-login-race-condition
docs/api-reference-update
refactor/payment-module

Prefix with the issue number when one exists — GitHub and GitLab auto-link it and it makes git log immediately traceable to the tracker. Keep the description under 50 characters — most git UIs truncate branch names in lists around that length. Match the type to the work you're doing — this is the contract readers use to understand the branch purpose at a glance.

NEVER include worktree in a branch name — git worktrees are a local checkout mechanism, not a branch concept; the name would leak implementation details into the remote and confuse other contributors.

Worktree Naming

Worktrees are local checkout directories — they never appear in the remote. Place them under .claude/worktrees/ and name them by replacing the branch / separator with -.

git worktree add .claude/worktrees/feat-user-authentication feat/user-authentication
git worktree add .claude/worktrees/fix-87-login-race-condition fix/87-login-race-condition

The directory name mirrors the branch name so git worktree list stays readable and each worktree is immediately traceable to its branch without inspecting the checkout. Run git worktree list before creating a new one — reuse an existing worktree if it already covers the same branch.

Keep worktrees scoped to a single branch. Doing unrelated work inside someone else's worktree obscures which changes belong where and makes cleanup error-prone.

Remove the worktree once its branch is merged — either after a local merge or after the pull/merge request is closed on the remote. Stale worktrees accumulate and make git worktree list unreadable.

git worktree remove .claude/worktrees/feat-user-authentication   # branch merged locally
git worktree prune                                                # remove refs to already-deleted directories

Commit Message Format

\x3Ctype>[optional scope]: \x3Cdescription>
[optional body]
[optional footer(s)]

Types:

Type SemVer When
feat MINOR New feature
fix PATCH Bug fix
docs Docs only
style Formatting, no logic change
refactor Restructure, no feature/fix
perf Performance improvement
test Add/fix tests
build Build system, deps
ci CI config
chore Anything else (not src/test)
revert Reverts a previous commit

Rules:

  • Subject line ≤ 72 characters — git log and GitHub/GitLab UIs silently truncate longer subjects
  • Imperative mood: "add" not "added" — reads as an instruction, not a history log
  • No capital letter, no trailing period — enforces uniform parsing by changelog tools
  • Body separated by blank line — parsers split header/body at the first blank line
  • Breaking changes: use ! after type/scope, or add BREAKING CHANGE: footer (triggers MAJOR bump) — body-only descriptions are invisible to changelog tools
  • revert commits SHOULD include This reverts commit \x3Chash>. in the body — git revert generates this automatically; don't strip it
  • NEVER add a Claude signature, AI agent attribution, or Co-authored-by trailer for Claude or any other AI agent to commits

Examples:

feat(auth): add JWT token refresh
fix: prevent race condition on concurrent requests

Introduce request ID and reference to latest request.
Dismiss responses from stale requests.
refactor!: drop support for Go 1.18

BREAKING CHANGE: Go 1.18 no longer supported; uses stdlib APIs from 1.21+

Closing Issues via Commit Messages

Both GitHub and GitLab detect keywords in commit messages and automatically close the referenced issue when the commit lands on the default branch. Place the reference in the footer (preferred — keeps the subject line clean).

Keywords: close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved — case-insensitive.

GitHub:

fix(auth): prevent token expiry race condition

Closes #42
Closes owner/repo#99
  • Triggers when merged into the default branch (usually main)
  • Cross-repo: Closes owner/repo#42
  • Close multiple: Closes #42, closes #43
  • Works in PR descriptions too

GitLab:

feat: add dark mode support

Resolves #101
Closes group/project#42
  • Triggers when merged into the default branch (configurable per project)
  • Cross-project: Closes group/project#42
  • Close multiple: Closes #101, closes #102
  • Works in MR descriptions too

Tip: Pair with the commit type — fix: closing a bug issue, feat: closing a feature request — keeps the changelog semantically coherent.

Common Mistakes

Mistake Fix
feat: Added login page feat: add login page — imperative, no capital
fix: fix bug. fix: fix bug — no trailing period
Subject over 72 chars Shorten; move detail to body
Breaking change only in body Add ! or BREAKING CHANGE: footer — tools won't detect body-only
feat(adding-auth): ... feat(auth): ... — scope is a noun, not a verb
Closes #42 in subject line Move to footer — keeps subject clean and parseable

Best Practices

  • Align branch type and commit type — feat/auth-* branch → feat(auth): commits
  • One concern per branch — mixing fixes into feature branches obscures the changelog
  • Use scope consistently within a branch — feat(auth): throughout, not feat(user): mid-way
  • Squash merge: when squash-merging a PR/MR, the branch commits are collapsed into one — the PR/MR title becomes the commit message. If the title doesn't follow conventional commits format, changelog generation breaks silently. Always set the PR title before squashing.
安全使用建议
This is an instruction-only skill that documents branch naming, worktree placement, and commit message conventions. It requires only git and asks for no secrets — that's appropriate. Things to consider before installing: 1) the skill recommends creating local worktrees under .claude/worktrees; if you use other tooling that expects a different layout this could clutter your repo or conflict with local conventions, so adapt the path if needed; 2) SKILL.md references gh (GitHub CLI) in examples/allowed-tools — if your agent or workflow actually invokes gh, that tool will need its own authentication (not provided by this skill); 3) because the skill is autonomous-invocable by default, ensure you trust any agent behavior that will run git commands on your repositories. Other than those operational notes, the skill's content and requirements are coherent with its stated purpose.
功能分析
Type: OpenClaw Skill Name: conventional-git Version: 1.2.0 The 'conventional-git' skill bundle provides standard guidelines and instructions for an AI agent to follow Conventional Commits v1.0.0, branch naming, and worktree management. The content in SKILL.md and evals/evals.json is strictly focused on improving git history consistency and automation (e.g., GitHub/GitLab issue closing) without any evidence of data exfiltration, malicious execution, or harmful prompt injection.
能力标签
cryptocan-make-purchasesrequires-oauth-tokenrequires-sensitive-credentials
能力评估
Purpose & Capability
The name/description (Conventional Commits, branch/worktree naming) align with the SKILL.md content. The only required binary is git, which is appropriate for the git commands shown. No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
SKILL.md stays within scope: it provides naming rules, commit message templates, and example git commands (git worktree add/remove, git worktree list). It does not instruct reading unrelated files, exfiltrating data, or accessing environment variables. It does recommend storing local worktrees under a .claude/worktrees directory (a local convention) which is a benign operational choice.
Install Mechanism
There is no install spec and no code to install — the skill is instruction-only, which minimizes risk. Nothing is downloaded or written by an installer.
Credentials
The skill declares no required environment variables or credentials. Although the SKILL.md mentions allowed-tools like gh, the registry requires only git; any use of gh would require separate credentials but the skill itself does not request them.
Persistence & Privilege
always is false and the skill does not request persistent system privileges or attempt to modify other skills' config. It only suggests a local directory convention for worktrees, which does not grant system-level persistence.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install conventional-git
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /conventional-git 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.0
**Support for worktree naming conventions and organization** - Added detailed guidance for naming git worktrees and managing their directories under `.claude/worktrees/` - Clarified distinction between branch naming and worktree naming; branches must never include "worktree" - Updated skill trigger conditions to support user requests about worktrees - Version bump to v1.2.0 - Added initial evaluation configuration file (`evals/evals.json`)
v1.1.1
- Removed the evals/evals.json file. - No other changes to features, documentation, or metadata.
v1.1.0
- Added an evals/evals.json file to the project. - Updated SKILL.md metadata to version 1.1.0. - Added Openclaw metadata (emoji, homepage, and required binary information) to SKILL.md.
v1.0.0
- Initial release of conventional-git v1.0.0. - Defines branch naming and commit message rules based on Conventional Commits v1.0.0. - Provides clear examples and tables for types, formatting, and SemVer alignment. - Includes guidance for automatic issue closing via commit footers for GitHub and GitLab. - Outlines common mistakes and best practices to ensure consistent, machine-parseable git history.
元数据
Slug conventional-git
版本 1.2.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 4
常见问题

Conventional Git 是什么?

Conventional Commits v1.0.0 branch naming, worktree naming, and commit message standards for GitHub and GitLab projects. Use when creating branches, naming w... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 193 次。

如何安装 Conventional Git?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install conventional-git」即可一键安装,无需额外配置。

Conventional Git 是免费的吗?

是的,Conventional Git 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Conventional Git 支持哪些平台?

Conventional Git 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Conventional Git?

由 Samuel Berthe(@samber)开发并维护,当前版本 v1.2.0。

💬 留言讨论