安全处理 Git 状态检查、提交信息、commit、分支、push、PR 和 rebase。用于用户要求检查改动、生成或创建提交、管理分支、推送、发起 PR 或整理历史时;严格区分每个动作的授权,并保护工作树中已有和无关的修改。

MITAuto-check passedDevelopment

Install Git Workflow

skills CLI
$ npx skills add laolaoshiren/claude-code-skills-zh --skill git-workflow -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install laolaoshiren/claude-code-skills-zh git-workflow --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/laolaoshiren/claude-code-skills-zh.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/git-workflow .claude/skills/git-workflow && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
git-workflow
GitHub stars
879
Token cost
~513 tokens
SKILL.md length
128 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
MIT

At a glance

安全处理 Git 状态检查、提交信息、commit、分支、push、PR 和 rebase。用于用户要求检查改动、生成或创建提交、管理分支、推送、发起 PR 或整理历史时;严格区分每个动作的授权,并保护工作树中已有和无关的修改。

  • Works in 5 steps: 读取仓库规则与状态 → 明确动作与文件范围 → 规划原子提交 → …
  • Tasks that involve Git workflow
  • SKILL.md covers 核心原则, 工作流程, Rebase 与历史整理边界 and 输出
  • Calls git

What it does

Git Workflow is an agent skill from laolaoshiren/claude-code-skills-zh. 安全处理 Git 状态检查、提交信息、commit、分支、push、PR 和 rebase。用于用户要求检查改动、生成或创建提交、管理分支、推送、发起 PR 或整理历史时;严格区分每个动作的授权,并保护工作树中已有和无关的修改。

Its SKILL.md is about 510 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git workflow and Commit messages. It works with Git. The repository describes itself as: 面向中文开发者的 Claude Code Skills / Agents / Plugins 精选与原创技能库|按场景分类|复制即装|持续更新. The licence is MIT.

When your agent uses it

  • Tasks that involve Git workflow
  • Tasks that involve Commit messages

Example prompts

  • “/git-workflow”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. 读取仓库规则与状态
  2. 明确动作与文件范围
  3. 规划原子提交
  4. 验证后执行
  5. 创建 PR

What it can do on your machine

Read from SKILL.md and the folder at commit 633f21c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Git Workflow loads about 513 tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 128 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~32
When it runs · the whole SKILL.md, loaded when a task matches
~513

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from laolaoshiren/claude-code-skills-zh at commit 633f21c, republished under its MIT licence (© laolaoshiren). 128 words, ~513 tokens.

Download SKILL.mdSave it as .claude/skills/git-workflow/SKILL.md (or your agent's skills folder).
name
git-workflow
description
安全处理 Git 状态检查、提交信息、commit、分支、push、PR 和 rebase。用于用户要求检查改动、生成或创建提交、管理分支、推送、发起 PR 或整理历史时;严格区分每个动作的授权,并保护工作树中已有和无关的修改。

Git 工作流助手

核心原则

  • 只执行用户明确要求的 Git 动作。生成提交信息不等于暂存或提交;提交不等于推送;创建 PR 不等于合并 PR、关闭 Issue 或发布 Release。
  • 把工作树中已有、未跟踪和无关的修改视为用户资产,不覆盖、不回退、不混入本轮提交。
  • 优先使用非交互命令。涉及历史重写、冲突选择或远程覆盖时降低自动化程度。

工作流程

1. 读取仓库规则与状态

先阅读适用的 AGENTS.md、CONTRIBUTING.md、README、提交规范和 CI 说明,再检查:

bash
git status --short --branch
git diff
git diff --cached
git log --oneline -10
git remote -v
git branch -vv

同时识别未跟踪文件、当前分支、upstream、远程差异和已有失败。不得只看 staged diff。

2. 明确动作与文件范围

把用户请求拆成独立授权:

动作默认权限
分析状态、生成 commit message 或 PR 文案只读
暂存、commit仅用户要求后执行,只选本轮相关文件
创建或切换分支仅用户明确要求时执行;实现流程需要但未获授权时,先说明原因并取得同意
fetch、push、创建 PR分别确认在请求范围内,不互相推导
merge、关闭 Issue、发布 Release必须有明确授权
rebase、修改已发布历史、强制更新远程高风险,必须明确授权并满足额外条件

存在无关改动时不得使用 git add . 或 git add -A。逐个暂存目标文件,并用 git diff --cached 复核。

3. 规划原子提交
  • 根据真实 diff 判断 feat、fix、docs、refactor、test、perf 或 chore。
  • 沿用仓库近期提交的语言、scope 和格式。
  • 一个提交只表达一项可独立理解和验证的改动。
  • Closes #123 仅在对应 Issue 确实应由该提交自动关闭时使用。

提交信息遵循:

text
<type>(<scope>): <简短描述>

<必要时说明原因、关键实现和兼容性>

<关联 Issue 或 Breaking Change>
4. 验证后执行

提交前先检查验证脚本是否会下载依赖、访问外部服务或产生其他状态,再运行与改动相关的测试、lint、构建或文档检查,并记录实际命令和退出状态。可能产生外部副作用时先取得授权。基线已有失败时单独说明,不能把未运行的项目标为通过。

执行 commit 后检查:

bash
git status --short --branch
git show --stat --oneline HEAD

推送前先 git fetch,确认 upstream 没有未整合的新提交;禁止 force push。

5. 创建 PR

PR 文案应帮助 reviewer 结合 diff 和验证结果快速审查,至少包含:

markdown
## 变更摘要

## 关键改动

## 验证结果

## 风险与回滚

## 关联 Issue

只勾选真实完成的检查。截图、迁移说明和回滚步骤仅在适用时加入。

Rebase 与历史整理边界

  • rebase 前要求工作树和暂存区都干净;未经授权不得自动 stash。
  • 先 fetch 并确认目标基线,必要时在用户允许下创建本地备份引用。
  • 不对公共分支或其他人依赖的已发布提交执行 rebase。
  • 禁止 git push --force。确需更新用户明确授权重写的私有分支时,只能在重新确认远程状态后使用 --force-with-lease。
  • 遇到冲突时停止并报告冲突文件与可选方案,不猜测内容归属或擅自解决。

输出

用中文简要报告:

  • 执行了哪些 Git 动作、影响哪些文件和分支。
  • 实际运行的验证及结果。
  • commit SHA、push 状态和 PR URL(若已执行)。
  • 未执行、失败或仍需用户决定的事项。

© laolaoshiren, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/git-workflow of laolaoshiren/claude-code-skills-zh.

Open the folder on GitHubat commit 633f21c

Compare with similar skills

Git Workflow next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Git Workflow compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Git Workflow this skilllaolaoshiren/claude-code-skills-zh879—~513Automated safety check: PassMIT
ToolJet Multi-Repo CommitToolJet/ToolJet41k—~1.3kAutomated safety check: PassAGPL-3.0
Git Workflow and Versioningaddyosmani/agent-skills103k2 repos~3.5kAutomated safety check: NotesMIT
React Router Pull Request Creatorremix-run/react-router57k—~2.5kAutomated safety check: PassMIT
Saleor Commit Workflowsaleor/saleor23k—~575Automated safety check: PassBSD-3-Clause
Emoji Commit ConventionsbaptisteArno/typebot.io11k—~424Automated safety check: PassCustom licence

Similar skills

  • Commits changes across ToolJet's root repo and its server/ee and frontend/ee submodules, writing messages from the diffs and updating submodule pointers in order.

    41k GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Git Workflow and Versioning

    addyosmani/agent-skills

    Sets git habits for every change: short-lived branches, atomic commits with descriptive messages, clean pull requests, plus versioning, tagging and changelogs for releases.

    103k GitHub starsUsed in 2 repos~3.5k tokens
    DevelopmentAuto-check: notes
  • React Router Pull Request Creator

    remix-run/react-router

    Packages finished React Router work into a draft pull request: branch, commit, push, a written PR body and the right GitHub labels.

    57k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Commits changes in the Saleor codebase and works through pre-commit hook failures from ruff, mypy, the GraphQL schema check and the migrations check.

    23k GitHub stars~575 tokensUpdated today
    DevelopmentAuto-check passed
  • Emoji Commit Conventions

    baptisteArno/typebot.io

    Sets the repository's convention for commit messages and pull request titles: one emoji prefix for the main intent, a concise title and clean follow-up commits.

    11k GitHub stars~424 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Draft Pull Request Creator

    wordpress-mobile/WordPress-Android

    Commits and pushes current changes, writes a pull request title and body from the branch history and template, and opens a draft PR on GitHub after you approve it.

    3.2k GitHub stars~881 tokensUpdated today
    DevelopmentAuto-check: notes

More from laolaoshiren/claude-code-skills-zh

All 19 skills in this repo
  • API Tester

    laolaoshiren/claude-code-skills-zh

    依据真实 OpenAPI、路由实现和现有测试生成并验证 API 测试。用于用户要求测试接口、补集成测试、验证 API 契约、生成回归用例或排查接口兼容性时;区分“生成测试”和“执行请求”的授权,不猜测状态码、响应结构或 SLA,不在未确认环境中发送写请求。

    879 GitHub stars~614 tokensUpdated 4 days ago
    Auto-check passed
  • Dep Auditor

    laolaoshiren/claude-code-skills-zh

    审计 Node.js、Python、Go、Rust、JVM、Ruby 项目的依赖漏洞、版本健康度与许可证事实;当用户要求检查 package.json、lockfile、requirements、go.mod、Cargo.toml、pom.xml、Gemfile.lock,或生成不改依赖的中文审计报告时使用

    879 GitHub stars~895 tokensUpdated 4 days ago
    Auto-check passed
  • Eslint Fix

    laolaoshiren/claude-code-skills-zh

    安全诊断并修复 ESLint error、warning 和配置兼容问题。用于用户要求运行 lint、解释 ESLint 报错、限定范围自动修复或迁移 ESLint 配置时;优先使用项目锁定的包管理器与版本,先预检再修改,不自动下载最新版或批量改写无关源码。

    879 GitHub stars~436 tokensUpdated 4 days ago
    Auto-check passed
  • GitHub Actions Gen

    laolaoshiren/claude-code-skills-zh

    分析真实项目并生成或修订安全、可验证的 GitHub Actions workflow;当用户要求创建 CI、测试矩阵、构建、Release、部署、缓存、Secrets、OIDC、PR 自动化或排查 workflow 配置时使用

    879 GitHub stars~1.1k tokensUpdated 4 days ago
    Auto-check: notes
  • Skill Curator

    laolaoshiren/claude-code-skills-zh

    中文 Skill 收录评估器。用于核验 GitHub 上的 Claude Code、Codex、Agent Skills、Plugin、MCP、CLI 或 Agent 工作流是否值得加入精选列表;检查真实资产、安装方式、活跃度、重复项和安全边界,并生成分类、中文描述与可追溯证据。

    879 GitHub stars~756 tokensUpdated 4 days ago
    Auto-check passed
  • Zh Readme

    laolaoshiren/claude-code-skills-zh

    中文 README 生成器 - 先分析项目,再生成面向中文开发者的高质量 README. An agent skill from laolaoshiren/claude-code-skills-zh.

    879 GitHub stars~477 tokensUpdated 4 days ago
    Auto-check passed

Works with

Categories

Questions about Git Workflow

What does Git Workflow do?

安全处理 Git 状态检查、提交信息、commit、分支、push、PR 和 rebase。用于用户要求检查改动、生成或创建提交、管理分支、推送、发起 PR 或整理历史时;严格区分每个动作的授权,并保护工作树中已有和无关的修改。. Git Workflow is an agent skill from laolaoshiren/claude-code-skills-zh.

When should I use Git Workflow?

Git Workflow fits situations like: tasks that involve Git workflow; tasks that involve Commit messages.

How do I install Git Workflow in Claude Code?

Run `npx skills add laolaoshiren/claude-code-skills-zh --skill git-workflow -a claude-code`. Or copy the skill folder (skills/git-workflow in laolaoshiren/claude-code-skills-zh) into .claude/skills/git-workflow in your project. Claude Code loads it when a task matches its description.

How do I install Git Workflow in Codex?

Run `npx skills add laolaoshiren/claude-code-skills-zh --skill git-workflow -a codex`. Or copy the skill folder (skills/git-workflow in laolaoshiren/claude-code-skills-zh) into .agents/skills/git-workflow in your project. Codex loads it when a task matches its description.

Can I use Git Workflow in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add laolaoshiren/claude-code-skills-zh --skill git-workflow -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/git-workflow, .gemini/skills/git-workflow, .github/skills/git-workflow and .opencode/skills/git-workflow in your project.

What does Git Workflow need to run?

Going by SKILL.md and its folder, Git Workflow needs the command-line tools its instructions call (git).

Does Git Workflow access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Git Workflow safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Git Workflow use?

Git Workflow is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Git Workflow use?

About 513 tokens (SKILL.md is roughly 2.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Git Workflow?

Skills that share tags, products or a category with Git Workflow: ToolJet Multi-Repo Commit (ToolJet/ToolJet, 41k stars), Git Workflow and Versioning (addyosmani/agent-skills, 103k stars), React Router Pull Request Creator (remix-run/react-router, 57k stars) and Saleor Commit Workflow (saleor/saleor, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Git Workflow?

laolaoshiren (a GitHub user) maintains it in laolaoshiren/claude-code-skills-zh, which has 879 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 5, 2026.

Source: laolaoshiren/claude-code-skills-zh on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.