home / skills / protagonistss / ithinku-plugins / commit

This skill analyzes code changes and generates conventional commit messages, performs quality checks, and creates clean, standardized commits.

npx playbooks add skill protagonistss/ithinku-plugins --skill commit

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.3 KB
---
name: commit
description: 智能代码提交技能 - 分析变更并生成规范提交信息。用于分析代码变更、生成符合规范的提交信息、执行质量检查或创建提交。
disable-model-invocation: false
argument-hint: [analyze|check|create]
---

# Skill: Commit

智能代码提交技能 - 分析变更并生成规范提交信息。用于分析代码变更、生成符合规范的提交信息、执行质量检查或创建提交。

## 核心功能

- 📊 **变更分析** - 识别文件类型和影响范围
- 🏷️ **类型检测** - 自动识别 feat/fix/docs 等类型
- 📍 **Scope识别** - 自动确定变更模块
- 📝 **信息生成** - 生成符合规范的提交信息
- ✅ **质量检查** - 检查敏感信息、TODO等
- 🚫 **纯净提交** - 绝不添加 AI 工具标识,保持提交历史专业

## 快速使用

```bash
# 分析并生成提交信息
/ct analyze

# 执行质量检查
/ct check

# 一键提交
/ct create
```

## 配置

```json
{
  "commit": {
    "messageFormat": "conventional",
    "qualityChecks": true,
    "autoScope": true
  }
}
```

## 详细信息

- 🔗 [提交类型配置](../../references/config/commit-types.md)
- 🔗 [Git 工具函数](../../references/utils/git-helpers.md)
- 🔗 [错误处理](../../references/errors/error-types.md)

Overview

This skill analyzes code changes and generates clean, conventional commit messages. It identifies change types and scopes, runs quality checks for sensitive content and TODOs, and can create commits without adding AI tool signatures to history. The goal is reliable, professional commit messages that fit team rules.

How this skill works

The skill scans the diff to detect changed files, file types, and affected modules to infer scope. It classifies the change as feat/fix/docs/etc., composes a conventional-format message, and optionally runs configured quality checks. When requested, it can execute a commit using the generated message while ensuring no AI footprint is inserted.

When to use it

  • Preparing a well-formed commit message from staged or unstaged changes
  • Enforcing commit message conventions across a team or CI pipeline
  • Running pre-commit quality checks for secrets, TODOs, or policy violations
  • Automating single-command commits for straightforward changes
  • Auditing changes to determine affected modules and impact

Best practices

  • Keep generated messages concise and review scope suggestions before committing
  • Enable qualityChecks in CI to catch secrets or TODOs early
  • Use autoScope for consistent scope detection, but override manually when needed
  • Prefer conventional messageFormat for tooling compatibility (changelog, release tools)
  • Run analyze before create to validate the suggested message and checks

Example use cases

  • Developer stages multiple files and runs analyze to get a conventional commit message suggestion
  • CI pipeline invokes check to validate PR commits for secrets and missing scopes
  • Automated bot composes a commit message for dependency bumps and creates the commit without AI attribution
  • Repo maintainers enforce commit convention by failing CI when qualityChecks report issues
  • Feature branch work where autoScope identifies the module impacted and generates the appropriate scope

FAQ

Which commit message formats are supported?

Conventional format is supported by default; configuration allows other formats via messageFormat.

Will the skill add AI tool identifiers to commit history?

No. The skill is designed to never inject AI tool signatures or metadata into commits.