Agent Skillskaininx/PlainTab › commit-changes

commit-changes

GitHub

用于创建规范的 PlainTab Git 提交。支持按用户请求暂存特定文件,避免混入无关变更。遵循 Scoped Conventional Commits 规范,生成精准的中英文提交信息,并包含详细变更说明、验证步骤及风险提示,确保提交历史清晰一致。

.agents/skills/commit-changes/SKILL.md kaininx/PlainTab

触发场景

用户要求提交代码或暂存更改 提及 git commit 或 commit 相关指令 需要符合 Conventional Commits 或 Google-style 规范的精确提交消息

安装

npx skills add kaininx/PlainTab --skill commit-changes -g -y
更多选项

非标准路径

npx skills add https://github.com/kaininx/PlainTab/tree/main/.agents/skills/commit-changes -g -y

不安装直接使用

npx skills use kaininx/PlainTab@commit-changes

指定 Agent (Claude Code)

npx skills add kaininx/PlainTab --skill commit-changes -a claude-code -g -y

安装 repo 全部 skill

npx skills add kaininx/PlainTab --all -g -y

预览 repo 内 skill

npx skills add kaininx/PlainTab --list

SKILL.md

Frontmatter
{
    "name": "commit-changes",
    "description": "Prepare and create PlainTab git commits with scoped Conventional Commit subjects and detailed commit bodies. Use when the user asks to commit, 提交, create a git commit, stage changes, or asks for precise Conventional Commits \/ Google-style commit messages; especially when the worktree may contain unrelated user changes."
}

Commit PlainTab Changes

Use this skill to make clean PlainTab commits without mixing unrelated work.

Commit Style

  • Use scoped Conventional Commits by default: type(scope): 精准描述.
  • Allowed types include feat, fix, perf, refactor, chore, docs, test, style, and other Conventional Commit types only when they accurately describe the change.
  • Always include a scope when a clear module or area exists, for example fix(wallpaper): ..., refactor(storage): ..., docs(rules): ..., test(import-export): .... Omit scope only when the change is genuinely cross-cutting and no honest scope fits.
  • Prefer Chinese commit subjects and bodies when the user asks in Chinese.
  • Match the current repository history. Before committing, inspect recent subjects with git log --oneline -10 and keep the same Chinese Conventional Commit rhythm unless the user asks for another style.
  • Make the subject long enough to be precise. It should name the changed behavior or module and the concrete result, not just the activity. Avoid vague subjects such as fix(settings): 修复问题, docs(rules): 更新文档, or chore: 调整代码.
  • Prefer type(scope): 动词 + 具体对象/行为 + 结果/目的, for example fix(wallpaper): 补齐用户数据备份中的 IndexedDB Blob 恢复顺序.
  • The body is required for non-trivial commits. Use it to explain what changed, why it changed, how it was verified, and any storage/migration/UI risk boundary. Keep it factual and specific; do not pad with generic release-note language.
  • Write multiple body bullets when needed. A good body usually has 3-6 bullets covering:
    • the concrete code paths or modules changed;
    • the user-visible behavior or data-safety effect;
    • migration/import-export/i18n implications when relevant;
    • verification commands or focused manual checks that passed;
    • intentionally preserved limitations or excluded files.

Example:

fix(settings): 统一数据备份口令可见性并补齐导入按钮状态

- 将加密导出和 .ptab 导入口令收口到同一套显示/隐藏状态逻辑,只保留图标按钮。
- 选择 JSON 备份时保持导入口令禁用,选择 .ptab 后再启用口令输入和可见性切换。
- 复用现有口令 i18n 标签,避免新增无可见文案的显示/隐藏翻译 key。
- 验证通过 node --check js/settings-panel.js 和数据导入控件回归脚本。

Workflow

  1. Run git status --short.
  2. Identify which files belong to the current user request. Do not stage unrelated modified or untracked files.
  3. Inspect recent style with git log --oneline -10 before choosing the commit subject.
  4. Review the staged candidate with git diff -- <files> or git diff --stat -- <files>.
  5. Run relevant checks for the touched files. Common checks:
    • JavaScript: node --check <file>
    • i18n: use $update-i18n validation when language packs or t(key) calls changed.
    • General whitespace: git diff --check -- <files>
  6. Stage only the intended files with explicit paths.
  7. Confirm staged contents with git diff --cached --stat and git status --short.
  8. Commit using a Chinese scoped Conventional Commit message unless the user requests another language. Make the subject precise and include a detailed body for any meaningful code, storage, UI, i18n, rules, or test change.
  9. After commit, run git status --short and report the commit hash.

Safety

  • Never use git reset --hard, git checkout --, or force operations to clean the tree unless the user explicitly asks.
  • If unrelated changes are present, leave them unstaged and mention that they were preserved.
  • If the user asks to commit all changes, still show awareness of untracked or surprising files before staging them.
  • Do not amend, rebase, or push unless explicitly requested.

版本历史

  • 955e53e 当前 2026-07-24 12:23

同 Skill 集合

.agents/skills/bump-version/SKILL.md
.agents/skills/diagnose/SKILL.md
.agents/skills/improve-codebase-architecture/SKILL.md
.agents/skills/storage-migration/SKILL.md
.agents/skills/tdd/SKILL.md
.agents/skills/update-i18n/SKILL.md
.agents/skills/zoom-out/SKILL.md
.claude/skills/bump-version/SKILL.md
.claude/skills/commit-changes/SKILL.md
.claude/skills/diagnose/SKILL.md
.claude/skills/improve-codebase-architecture/SKILL.md
.claude/skills/storage-migration/SKILL.md
.claude/skills/tdd/SKILL.md
.claude/skills/update-i18n/SKILL.md
.claude/skills/zoom-out/SKILL.md

元信息

文件数
0
版本
955e53e
Hash
9d6c62c8
收录时间
2026-07-24 12:23

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-07 13:18
浙ICP备14020137号-1 $访客地图$