git-commit-pro

Conventional Commits 助手 — 按 Conventional Commits 规范编写结构化的 Git 提交信息。分析改动以在用户请求提交、撰写提交信息、暂存并提交或优化提交信息时生成准确且有意义的提交消息。

仓库最近推送
GitHub Stars
219
Forks
38
Issues / PRs
1

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "git-commit-pro":https://skillpi.com/zh/skills/deepskill-b6475f8a688ca088c43f81236beb35a4d6cb7802387309e847082ba07a8ef236。安装前核对上游来源和版本:https://github.com/TerminalSkills/skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

Conventional Commits 助手 — 按 Conventional Commits 规范编写结构化的 Git 提交信息。分析改动以在用户请求提交、撰写提交信息、暂存并提交或优化提交信息时生成准确且有意义的提交消息。

0 下载

介绍来源: third_party · TerminalSkills · 1.0.0 参考来源

SkillPi 解读

实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: git-commit-pro
description: >-
  Write well-structured git commit messages following the Conventional Commits
  standard. Use when a user asks to commit changes, write a commit message,
  stage and commit, improve a commit message, or follow commit conventions.
  Analyzes diffs to produce accurate, meaningful commit messages.
license: Apache-2.0
compatibility: "Requires git installed"
metadata:
  author: terminal-skills
  version: "1.0.0"
  category: development
  tags: ["git", "commits", "conventional-commits", "version-control"]

Git Commit Pro

Overview

Generate well-structured git commit messages by analyzing staged changes. Follows Conventional Commits format and produces messages that explain what changed and why.

Instructions

When a user asks you to commit, write a commit message, or improve an existing commit message, follow these steps:

Step 1: Inspect the changes

# See what is staged
git diff --cached --stat

# See full staged diff
git diff --cached

# See unstaged changes (in case user wants to stage first)
git status

If nothing is staged, help the user stage the right files first. Never use git add . unless the user explicitly asks -- prefer adding specific files.

Step 2: Analyze the diff

Categorize what changed:

  • New files: What functionality do they add?
  • Modified files: What behavior changed? Why?
  • Deleted files: What was removed and why?
  • Renamed/moved files: What restructuring happened?

Look at the actual code changes, not just file names. Understand the intent behind the changes.

Step 3: Write the commit message

Use Conventional Commits format:

type(scope): short description

Longer explanation of what changed and why. Wrap at 72 characters.
Reference any issues or tickets.

Co-Authored-By: if applicable

Types:

  • feat: New feature or capability
  • fix: Bug fix
  • docs: Documentation only
  • style: Formatting, semicolons, whitespace (no logic change)
  • refactor: Code restructuring without behavior change
  • perf: Performance improvement
  • test: Adding or updating tests
  • build: Build system or dependency changes
  • ci: CI/CD configuration changes
  • chore: Maintenance tasks, tooling updates

Rules for the subject line:

  • Use imperative mood ("add" not "added" or "adds")
  • Do not capitalize the first word after the colon
  • No period at the end
  • Keep under 72 characters
  • Scope is optional but helpful (e.g., feat(auth):, fix(api):)

Rules for the body:

  • Separate from subject with a blank line
  • Explain WHAT and WHY, not HOW (the diff shows how)
  • Wrap at 72 characters
  • Use bullet points for multiple changes
  • Reference issue numbers: Fixes #123, Closes #456

Step 4: Execute the commit

git commit -m "$(cat <<'EOF'
type(scope): subject line here

Body paragraph explaining the change.

EOF
)"

Step 5: Verify

git log --oneline -1
git status

Confirm the commit was created and the working tree is in the expected state.

Examples

Example 1: Feature addition

Staged changes: New auth/ directory with login, register, and middleware files.

Commit message:

feat(auth): add user authentication with JWT

Implement login and registration endpoints with JWT-based session
management. Includes:
- POST /auth/login with email/password
- POST /auth/register with validation
- Auth middleware for protected routes
- Token refresh endpoint

Closes #42

Example 2: Bug fix

Staged changes: Modified src/utils/date.ts -- changed timezone handling in formatDate().

Commit message:

fix(utils): correct timezone offset in date formatting

formatDate() was applying the UTC offset in the wrong direction,
causing dates to display one day behind for users in negative UTC
timezones (Americas). The offset is now subtracted instead of added.

Fixes #187

Example 3: Multiple small changes

Staged changes: Updated README, added a .env.example, fixed a typo in a config file.

Commit message:

chore: update project setup documentation

- Add .env.example with required environment variables
- Update README with new setup instructions
- Fix typo in webpack.config.js comment

Guidelines

  • One commit per logical change. If the diff contains unrelated changes, suggest splitting into multiple commits.
  • Never write generic messages like "update files" or "fix stuff." Every commit should be understandable without looking at the diff.
  • If the user has an existing commit convention in their repo (check recent git log), match that style instead of Conventional Commits.
  • For large diffs, focus the subject on the primary change and use the body for secondary changes.
  • If the diff includes generated files (lockfiles, build artifacts), mention them briefly but focus on the source changes.
  • When amending, always confirm with the user first. Amending rewrites history and can cause issues for shared branches.
  • If the changes are too large or unfocused for a single good commit message, tell the user and suggest how to split them.

当前收录版本

1.0.0

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值92/100

亮点

  • 解决开发者高频刚需:生成符合 Conventional Commits 规范的 Git 提交信息
  • 显著提升版本控制质量和团队协作效率
  • 覆盖多种实际场景(新功能、Bug 修复、文档更新等)
触发精准95/100

亮点

  • 触发词覆盖完整:commit、write commit message、stage and commit、improve commit message、follow conventions
  • 边界清晰,无歧义或重叠风险
结构规范95/100

亮点

  • 五步式清晰流程(Inspect → Analyze → Write → Execute → Verify)
  • 包含三个端到端真实示例
  • frontmatter 完整,单文件长度合规
执行可靠90/100

亮点

  • 工具命令准确(git diff --cached, git status, git commit)
  • 覆盖关键异常处理(未暂存文件、大 diff 拆分、amend 确认)
  • 避免危险操作(不默认使用 git add .)
证据可验 (前四项均值)93/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。