git-sync
暂存所有更改,生成简短的提交信息,提交并推送。当被要求同步更改或使用自动生成的简洁提交信息运行git add/commit/push时使用。
📖 中文导读:暂存所有更改,生成简短的提交信息,提交并推送。当被要求同步更改或使用自动生成的简洁提交信息运行git add/commit/push时使用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: git-sync description: Stage all changes, generate a short commit message, commit, and push. Use when asked to sync changes or run git add/commit/push with an auto-generated concise commit message.
Git Sync
Overview
Sync local changes by staging everything, generating a short commit message from the diff, committing, and pushing.
Workflow
- Inspect the repo.
- Run
git status --short. - Skim
git diff --statandgit diffto understand the main change.
- Run
- If there are no changes, report that the working tree is clean and stop.
- Generate a concise commit message.
- Keep it short (roughly <= 50 chars), imperative, no trailing period.
- Focus on the primary change; add a brief scope only if obvious.
- Execute the sync.
git add .git commit -m "<message>"git push
- If push fails due to missing upstream, use
git push -u origin <branch>after confirming the branch name.