AgentSkillsCN

pre-push-checklist

在提交与推送前,执行预提交/预推送检查清单:审核暂存的变更内容,与上游代码同步,运行拼写与语法检查,执行 README 中的所有开发检查,并自动生成提交信息。在提交与推送之前,务必使用此清单。

SKILL.md
--- frontmatter
name: pre-push-checklist
description: Pre-commit/push checklist that reviews staged changes, syncs with upstream, runs spelling/grammar checks, runs all dev checks from the README, and generates a commit message. Use before committing and pushing.

Pre-Push Checklist

Understand Changes

  1. Look at the currently staged changes (git diff --cached) to identify what was changed and why.
  2. Check if there are changes to pull from upstream (git fetch && git log HEAD..@{u} --oneline). If there are, sync carefully:
    1. Stash the current changes (git stash --include-untracked).
    2. Pull from upstream (git pull).
    3. Re-apply the stash (git stash pop) and resolve any merge conflicts that arise. Take great care to make sure none of the user's changes are lost.

Checks

  1. Review the staged diff for spelling and grammar mistakes in user-facing strings, comments, and documentation. Fix any found.
  2. Read the README.md and find the "## Development" section. Run each of the checks listed there. Fix any issues that are simple. If a fix would require more complex changes, stop and consult with the user before proceeding.
  3. Commit up with a short commit message following the existing style of commit messages in the repo's git log. Place the commit message at the very end of your response.

Finally, commit and push the changes to the repo.