git-commit-push-zh
Skill1 starsChanged 3 months agoMITView on GitHub
Use when reviewing Git changes and creating a Chinese commit message. Covers intentional staging, commit verification, optional push, and user-requested PR creation.
- Reads credentials
- Commits and pushes
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ai-learning-coachSkill
- china-travel-plannerSkill
- codebase-readerSkill
- full-bleed-icon-creatorSkill
- github-trending-reportSkill
- java-best-practicesSkill
- session-cleanupSkill
- social-video-archiverSkill
- video-to-cover-briefSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 8 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Use this skill when the user explicitly requests a Chinese Git commit workflow.
- Distinctive: line 21
Run git status and git diff --staged (or git diff if nothing is staged).
- Distinctive: line 55
If body is needed, add a blank line then explain reason/impact in Chinese
- Distinctive: line 61
After user confirms the log:
- Distinctive: line 64
Run git status to verify success
- Distinctive: line 75
After successful commit, ask user whether to push.
- Distinctive: line 86
Only execute when user explicitly asks to create a PR.
- Distinctive: line 88
Ask for target branch (default: main)
- Very specific: line 89
Create with gh pr create, title reuses commit log, body describes changes in Chinese
≈ “Common” is an estimate: at least 1 in 5 of the 383,637 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Git Commit Push
Overview
Flow: review changes → compose Chinese commit log → commit → confirm push → optional PR.
When to Use
Use this skill when the user explicitly requests a Chinese Git commit workflow.
Instructions
Step 1: Review Changes
Run git status and git diff --staged (or git diff if nothing is staged).
Completion criterion: all changed files and their intent identified.
Safety Checks
Block before proceeding if:
- Sensitive files present (
.env,credentials, private keys, tokens) → warn user, do not stage - Diff exceeds 2000 lines → suggest splitting
- Unresolved merge conflict markers exist → abort and notify
Step 2: Compose Commit Log
Format: type: 中文描述
Infer the best-matching type from the changes:
| type | 含义 |
| feat | 新功能 |
| fix | 缺陷修复 |
| refactor | 重构,不改变外部行为 |
| docs | 文档 |
| style | 格式、排版、无逻辑变化 |
| test | 测试 |
| chore | 构建、依赖、脚手架、杂项 |
| perf | 性能优化 |
| ci | CI/CD 配置 |
| build | 构建系统或依赖管理 |
Rules:
- Description in Chinese, concise, max 50 characters
- Multiple changes of the same type → single commit
- Changes spanning types → split into separate commits, one type each
- If body is needed, add a blank line then explain reason/impact in Chinese
Completion criterion: log composed and shown to user for confirmation.
Step 3: Commit
After user confirms the log:
- Stage relevant files (
git addspecific files, never-A) - Run
git commit - Run
git statusto verify success
Forbidden:
--no-verifyto skip hooks--amendon already-pushed commits- Staging files user has not confirmed
Completion criterion: git log -1 shows the correct commit.
Step 4: Confirm Push
After successful commit, ask user whether to push.
- User confirms →
git push(orgit push -u origin <branch>if no upstream) - User declines → stop, do not push
Forbidden:
--forceor--force-with-leaseto main/master- Pushing without explicit user confirmation
Step 5: PR (only when user requests)
Only execute when user explicitly asks to create a PR. Never suggest proactively.
- Ask for target branch (default: main)
- Create with
gh pr create, title reuses commit log, body describes changes in Chinese - Return PR URL to user
Completion criterion: PR URL shown to user.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

