.agents/skills/git-commit/SKILL.md
Generate accurate Angular-style Git commit messages from staged changes only.
Follow this sequence exactly:
git statusgit diff --stagedgit branch --show-currentgit log --oneline -10type(scope): subject.commit_message.txtgit commit -F commit_message.txtcommit_message.txtgit add.git push.git commit together with file creation or cleanup in a single shell command.git commit as the only step that needs repository write access. Keep message-file creation and cleanup as separate commands.git commit fails with sandbox-style permission errors such as Operation not permitted while creating .git/index.lock, immediately rerun git commit -F commit_message.txt with the required escalation instead of retrying the same non-privileged command..git, prefer requesting the needed escalation for git commit directly after the user approves the message.commit_message.txt afterward. If commit fails, keep the file unless cleanup is clearly safe and intentional.Use this structure when additional detail is needed:
type(scope): subject
Body paragraph(s) explaining what changed and why.
Footer for breaking changes or special notes when applicable.
Apply these formatting rules:
type(scope): subject.subject as an imperative summary, start it with a lowercase letter, and do not end it with a period.body to explain what changed and why, not implementation minutiae.body may contain multiple paragraphs, separated by one blank line.footer only for breaking changes or special considerations.Mark breaking changes with !, with a BREAKING CHANGE: footer, or with both when the title should signal the break immediately and the footer needs to explain migration impact.
Use ! after the type or scope in the title:
feat(api)!: send an email to the customer when a product is shipped
Use a BREAKING CHANGE: footer to describe the compatibility impact:
feat(config)!: allow provided config object to extend other configs
BREAKING CHANGE: `extends` key in the config file now extends other config files
Choose the narrowest commit type that matches the staged diff:
feat: introduce user-facing behavior or a new capability.fix: correct a bug, regression, or broken behavior.refactor: improve internal structure without changing behavior.perf: improve performance or reduce resource usage.docs: update documentation only.test: add or adjust tests without changing production behavior.build: change dependencies, packaging, or build configuration.ci: update CI workflows or automation pipelines.chore: make routine maintenance changes that do not fit other types.style: apply formatting or non-functional code style updates.Choose scope from the touched module, feature, service, or component name whenever possible. Prefer specific scopes such as openai, screenshot, or settings over broad labels like app or misc.
{English commit message}
{Simplified Chinese translation}
commit_message.txt or run git commit before explicit approval.commit_message.txt.fix(screenshot): defer overlay capture until view appears
Move screenshot capture out of the overlay initializer so the view hierarchy is stable before capture starts.
This prevents the startup race that caused layout conflicts and crashes during screenshot translation.
fix(screenshot): 推迟悬浮层截图直到视图出现后再执行
将截图操作从悬浮层初始化方法中移出,待视图层级稳定后再开始截图。
此修改可防止因启动竞态条件引发的布局冲突和截图翻译崩溃问题。