Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问clear审计未展示

git-commit-craftergit 提交工匠

Agent Skill

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

总安装

563

周安装

23

GitHub Stars

公开资料未说明

下载量

182
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add ryoppippi/dotfiles --skill "git-commit-crafter"

简介

依据上下文自动生成符合规范的 Git 提交消息。

  • 支持根据文件变更类型推荐合适的提交前缀(如 feat: fix:)。
  • 可集成编辑器插件实现提交时即时提示与格式化。git-commit-crafter 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 依赖准确的 diff 分析,二进制文件变更可能导致描述偏差。
  • 生成的消息需经人工校验后再实际提交,确保语义准确无误。

SKILL.md

name
git-commit-crafter
description
Creates atomic git commits following Conventional Commits specification with detailed, well-structured messages. Analyzes changes and splits them into logical units. Use when committing code changes that need proper structure and comprehensive documentation (e.g., "commit my authentication changes" or "finished implementing search, time to commit").

You are an expert git commit architect creating fine-grained, independently revertable commits following Conventional Commits specification.

Core Philosophy

Revertability First: Each commit must be revertable independently without breaking other functionality. Prefer smaller, granular commits over large groupings. Split by hunks within files, not just entire files.

Workflow

  1. Survey changes: Run git status and git diff
  2. Review history: Run git log --oneline -20 to match existing commit patterns (structure, scope naming, message style)
  3. Identify revertable units: Examine each hunk separately - can it be reverted independently?
  4. For each unit:

- Extract specific hunks using git diff <file> - Create patch with only desired hunks - Reset file: git checkout -- <file> - Apply patch (see detailed guidance below) - Stage: git add <file> - Craft message following format below - Commit and verify with git show HEAD

NEVER use git add -p or git add --interactive - Claude Code cannot handle interactive commands.

Git Apply Best Practices

When applying patches, follow these guidelines to avoid common failures:

Basic Usage

# Always verify first before applying
git apply --check patch_file.patch

# Apply with verbose output for debugging
git apply -v patch_file.patch

# Or pipe directly from git diff
git diff <file> | git apply -v

Essential Flags

  • -v, --verbose: Always use this for detailed feedback during application
  • --check: Verify whether patch can be applied cleanly without making changes
  • --stat: Display affected files before applying
  • --whitespace=fix: Automatically correct trailing whitespace issues (common failure cause)
  • --reject: Create .rej files for failed sections instead of aborting entirely
  • --reverse/-R: Revert previously applied patches

Troubleshooting Failed Applies

Common Issues:

  1. Trailing Whitespace: Patches may fail due to whitespace differences
   git apply --whitespace=fix -v patch_file.patch
  1. Partial Failures: When some hunks fail, use --reject to apply what works
   git apply --reject -v patch_file.patch
   # Manually resolve conflicts in generated .rej files
  1. Context Mismatch: If patch was created from different base, try with more context
   git apply --ignore-whitespace -v patch_file.patch
  1. Line Ending Issues: Different platforms may have CRLF vs LF issues
   git apply --ignore-space-change -v patch_file.patch

Workflow Recommendation

# 1. Always check first
git apply --check patch_file.patch

# 2. If check passes, apply with verbose output
git apply -v patch_file.patch

# 3. If check fails, try with whitespace fix
git apply --check --whitespace=fix patch_file.patch
git apply -v --whitespace=fix patch_file.patch

# 4. If still fails, use reject for partial application
git apply --reject -v patch_file.patch
# Then manually fix .rej files

Git Apply vs Git Am

  • git apply: Applies changes without creating commits (used in this workflow)
  • git am: Applies patches with commit messages and author info preserved

ALWAYS use git apply -v for this workflow to maintain control over commit creation.

Commit Message Format

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

<body>

<footer>

Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert

Body should explain:

  • WHAT changed and WHY
  • Problem context and solution rationale
  • Implementation decisions
  • Potential impacts
  • Wrap at 72 characters

Quality Checks

  • Can this be reverted without breaking other functionality?
  • Is this the smallest logical unit?
  • Does message clearly explain the change?
  • Does it match project's commit patterns?
  • No debugging statements or commented code without explanation

Example

Instead of one large commit:

feat(auth): add RefreshTokenService class

Added new RefreshTokenService to handle token lifecycle management.
This service will be responsible for generating and invalidating
refresh tokens with configurable expiry periods.
feat(auth): integrate token rotation in middleware

Updated auth middleware to call RefreshTokenService when validating
tokens. This change can be reverted independently if needed without
affecting the service itself.

Key Principles

  • Always use English for commit messages with UK English spelling (e.g. "colour", "organise", "initialise")
  • Never push to main branch directly - create a PR instead
  • When in doubt, prefer smaller commits (can squash later, can't easily split)
  • Match project's established scope naming and conventions
  • Include issue/PR references when applicable
  • Each commit must pass: "If I revert this, will it break other features?"
  • If the commit is just for applying formatter use chore(xxx): format or just chore: format

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Claude Code

27.42%
按下载量换算50

OpenCode

23.43%
按下载量换算43

Codex

15.72%
按下载量换算29

Antigravity

12.92%
按下载量换算24

Gemini CLI

8.14%
按下载量换算15

windsurf

3.72%
按下载量换算7

安全审计

暂无安全审计结果可展示。

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills