Helper for using the Git CLI to inspect, stage, commit, branch, and synchronize code changes. Use when the user wants to understand or perform Git operations...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install git-cli或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install git-cli⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/git-cli/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: git-cli description: Helper for using the Git CLI to inspect, stage, commit, branch, and synchronize code changes. Use when the user wants to understand or perform Git operations from the command line, including safe status checks, diffs, branching, stashing, and syncing with remotes. ---
Use this skill when the user asks about Git from the command line: what changed, staging/committing, branching, push/pull, stashing, history, tags, merge/rebase, or cloning.
git status or run scripts/is-repo.sh from the skill directory.
git status, git diff, git log). Do not suggest destructive commands (git reset --hard, git clean -fdx, git push --force) unless the user explicitly asks and understands the risk. For recovery, use git reflog to find a commit before suggesting reset/checkout.
- Quick answer: Use the Quick Reference table below and reply with the exact command(s). - Step-by-step or edge cases: Point to or quote from reference/ (e.g. reference/workflows.md, reference/troubleshooting.md). - Automation / repeatable checks: Use or adapt scripts in scripts/ and tell the user how to run them. - Templates (commit message, .gitignore): Use or copy from assets/.
| Task | Command |
|------|--------|
| State & diff | git status · git diff · git diff --staged · git diff --stat |
| Stage / unstage | git add or git add . · git restore --staged |
| Commit | git commit -m "message" |
| Branch | git branch · git branch -a · git switch -c new · git switch existing |
| Sync remote | git fetch · git pull · git push -u origin then git push |
| Stash | git stash · git stash list · git stash apply / git stash pop |
| History | git log --oneline --decorate --graph -n 20 · git blame |
| Clone / init | git clone · git init · git remote add origin |
| Remotes | git remote -v · git remote show origin · git branch -vv |
| Discard (destructive) | git restore (working tree) · git restore --staged (unstage) |
| Amend | git commit --amend --no-edit or -m "message" |
| Tags | git tag · git tag v1.0 · git push origin v1.0 or --tags |
| Merge / rebase | git merge · git rebase · conflict → fix → git add → git commit or git rebase --continue |
| Need | Location | |------|----------| | Full command list, options, examples | reference/commands.md | | Step-by-step workflows (branch, release, conflict) | reference/workflows.md | | Errors, recovery, detached HEAD, .gitignore | reference/troubleshooting.md | | Run checks (is repo, status summary, branch info) | scripts/ — run from repo root | | Commit message or .gitignore template | assets/ |
On Windows: run in Git Bash or WSL (e.g. bash scripts/status-summary.sh).
When the user needs a diagram (e.g. branch/merge flow), describe it in text or point to reference; only create or reference images in assets/ if the user explicitly asks for a visual.
安装 Git cli 后,可以对 AI 说这些话来触发它
Help me get started with Git cli
Explains what Git cli does, walks through the setup, and runs a quick demo based on your current project
Use Git cli to helper for using the Git CLI to inspect, stage, commit, branch, and...
Invokes Git cli with the right parameters and returns the result directly in the conversation
What can I do with Git cli in my developer & devops workflow?
Lists the top use cases for Git cli, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/git-cli/ 目录(个人级,所有项目可用),或 .claude/skills/git-cli/(项目级)。重启 AI 客户端后,用 /git-cli 主动调用,或让 AI 根据上下文自动发现并使用。
Git cli 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Git cli 可免费安装使用。请查阅仓库了解许可证信息。
Helper for using the Git CLI to inspect, stage, commit, branch, and synchronize code changes. Use when the user wants to understand or perform Git operations...
Git cli 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using Git cli
Identifies repetitive steps in your workflow and sets up Git cli to handle them automatically