Files
opencode/command/git-commit.md
voson 43e138b19e feat: 新增对话总结命令与浏览器自动化技能
- 本地化命令描述(英文→中文)

- 删除未使用命令文件

- 新增 summarize-conversation 命令

- 更新 AI 模型配置为 DeepSeek

- 新增 agent-browser 技能

- 重构技能目录结构(重命名)
2026-01-15 17:30:39 +08:00

2.2 KiB

description
description
提交暂存文件,自动生成提交信息并创建版本标签

Auto-generate a commit message for staged files, commit to the local repository, and create a version tag following semantic versioning.

Please follow the git workflow defined in @skill/git/SKILL.md:

  1. Check staging area - Verify files are staged with git diff --cached --name-only
    • If empty, inform the user and stop
  2. Collect information - Run these commands in parallel:
    • git status
    • git diff --cached
    • git log --oneline -10
    • git tag --list | sort -V | tail -5
    • Read @AGENTS.md if it exists (repository type, version rules, project structure)
  3. Detect repository type - Polyrepo (tag: 1.2.0) or Monorepo (tag: subproject-1.2.0)
  4. Detect project type and version - Check for version files:
    • iOS: *.xcodeproj/project.pbxprojMARKETING_VERSION
    • Node.js: package.jsonversion
    • Android: build.gradle(.kts)versionName
    • Go: Git tag only
  5. Generate commit message following Conventional Commits:
    • Format: <type>(<scope>): <subject>
    • Use Chinese for commit messages (macOS/Linux)
    • Types: feat, fix, docs, style, refactor, perf, test, chore, ci, build
    • For monorepo, use subproject as scope if changes affect single subproject
  6. Update version number if needed:
    • feat: minor +1 (1.2.0 → 1.3.0)
    • fix/perf: patch +1 (1.2.3 → 1.2.4)
    • Breaking change: major +1 (1.2.3 → 2.0.0)
    • Only for user-perceivable changes (feat, fix, perf, breaking)
    • Add updated version file to staging
  7. Commit changes with generated message
  8. Create version tag if version was updated (unless user specified "skip tag"):
    • Polyrepo: git tag -a "1.2.0" -m "commit message"
    • Monorepo: git tag -a "subproject-1.2.0" -m "commit message"

Options:

  • User can input "skip tag" or "skip" to skip tag creation

Display result in Chinese:

✓ 提交成功

提交信息:[commit message]
版本标签:[tag] (如果创建了)

要推送到远程仓库,请运行:/git-push

Important: This command does NOT push to remote. Use /git-push to push commits and tags.