agentleFS
oouooouo/skills/git-commit-push-zh/SKILL.md

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

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
  1. Distinctive:

    Use this skill when the user explicitly requests a Chinese Git commit workflow.

    line 15
  2. Distinctive:

    Run git status and git diff --staged (or git diff if nothing is staged).

    line 21
  3. Distinctive:

    If body is needed, add a blank line then explain reason/impact in Chinese

    line 55
  4. Distinctive:

    After user confirms the log:

    line 61
  5. Distinctive:

    Run git status to verify success

    line 64
  6. Distinctive:

    After successful commit, ask user whether to push.

    line 75
  7. Distinctive:

    Only execute when user explicitly asks to create a PR.

    line 86
  8. Distinctive:

    Ask for target branch (default: main)

    line 88
  9. Very specific:

    Create with gh pr create, title reuses commit log, body describes changes in Chinese

    line 89

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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性能优化
ciCI/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:

  1. Stage relevant files (git add specific files, never -A)
  2. Run git commit
  3. Run git status to verify success

Forbidden:

  • --no-verify to skip hooks
  • --amend on 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 (or git push -u origin <branch> if no upstream)
  • User declines → stop, do not push

Forbidden:

  • --force or --force-with-lease to 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.

  1. Ask for target branch (default: main)
  2. Create with gh pr create, title reuses commit log, body describes changes in Chinese
  3. Return PR URL to user

Completion criterion: PR URL shown to user.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.