← 返回 Skills 市场
openlang-cn

Git cli

作者 openlang · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
1513
总下载
1
收藏
17
当前安装
2
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (SKILL.md)

\r \r

Git CLI Skill — How to Work\r

\r 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.\r \r

Your Workflow\r

\r

  1. Confirm context: Ensure Git is on PATH and the user is in (or will run commands in) a repo. If unsure, suggest git status or run scripts/is-repo.sh from the skill directory.\r
  2. Safety first: Prefer read-only commands (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.\r
  3. Give the right level of detail:\r
    • Quick answer: Use the Quick Reference table below and reply with the exact command(s).\r
    • Step-by-step or edge cases: Point to or quote from reference/ (e.g. reference/workflows.md, reference/troubleshooting.md).\r
    • Automation / repeatable checks: Use or adapt scripts in scripts/ and tell the user how to run them.\r
    • Templates (commit message, .gitignore): Use or copy from assets/.\r \r

Quick Reference (use this first)\r

\r | Task | Command |\r |------|--------|\r | State & diff | git status · git diff · git diff --staged · git diff --stat |\r | Stage / unstage | git add \x3Cpath> or git add . · git restore --staged \x3Cpath> |\r | Commit | git commit -m "message" |\r | Branch | git branch · git branch -a · git switch -c new · git switch existing |\r | Sync remote | git fetch · git pull · git push -u origin \x3Cbranch> then git push |\r | Stash | git stash · git stash list · git stash apply / git stash pop |\r | History | git log --oneline --decorate --graph -n 20 · git blame \x3Cfile> |\r | Clone / init | git clone \x3Curl> · git init · git remote add origin \x3Curl> |\r | Remotes | git remote -v · git remote show origin · git branch -vv |\r | Discard (destructive) | git restore \x3Cfile> (working tree) · git restore --staged \x3Cfile> (unstage) |\r | Amend | git commit --amend --no-edit or -m "message" |\r | Tags | git tag · git tag v1.0 · git push origin v1.0 or --tags |\r | Merge / rebase | git merge \x3Cbranch> · git rebase \x3Cbranch> · conflict → fix → git addgit commit or git rebase --continue |\r \r

Where to Look\r

\r | Need | Location |\r |------|----------|\r | Full command list, options, examples | reference/commands.md |\r | Step-by-step workflows (branch, release, conflict) | reference/workflows.md |\r | Errors, recovery, detached HEAD, .gitignore | reference/troubleshooting.md |\r | Run checks (is repo, status summary, branch info) | scripts/ — run from repo root |\r | Commit message or .gitignore template | assets/ |\r \r

Scripts (run from repository root)\r

\r

  • scripts/is-repo.sh — Exit 0 if current dir is a Git repo, else 1. Use to confirm context before suggesting commands.\r
  • scripts/status-summary.sh — Short status + branch + last commit. Use when user asks "what’s my current state?"\r
  • scripts/branch-list.sh — Local and remote branches with upstream. Use when user asks about branches or push target.\r \r On Windows: run in Git Bash or WSL (e.g. bash scripts/status-summary.sh).\r \r

Assets\r

\r

  • assets/commit-msg-template.txt — Template for conventional or structured commit messages; suggest when user asks for commit message format.\r
  • assets/gitignore-common.txt — Common .gitignore patterns; suggest when user has many untracked files or asks for .gitignore examples.\r \r 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.\r
安全使用建议
This skill appears to be what it says: a Git CLI helper with readable docs and small local scripts. Before running it, ensure Git is installed and run scripts from the intended repository root. Be aware that any commands the agent suggests (or executes, if you allow execution) that change state — especially push/pull/reset/force operations — will modify your repository or transmit data to configured remotes using whatever credentials are present in your environment; avoid running destructive commands unless you understand and approve them. If you are uncomfortable with agents executing commands that could push code, restrict command execution or review/confirm commands before running them. The included scripts are short and local (inspect them yourself if you want extra assurance).
功能分析
Type: OpenClaw Skill Name: git-cli Version: 1.0.1 The git-cli skill bundle is a well-structured tool designed to assist users with Git operations. It includes safety-oriented instructions in SKILL.md that prioritize read-only commands and warn against destructive actions. The provided Bash scripts (e.g., scripts/is-repo.sh, scripts/status-summary.sh) are simple wrappers for standard Git commands with no evidence of malicious intent, data exfiltration, or obfuscation.
能力评估
Purpose & Capability
Name/description match the included files: SKILL.md gives Git CLI usage, reference docs expand commands/workflows, scripts provide small local helpers, and assets include commit/.gitignore templates. Nothing in the bundle requests unrelated services or credentials.
Instruction Scope
Runtime instructions limit actions to Git commands and the included shell scripts, prefer read-only commands, and explicitly warn about destructive commands. Scripts operate on the local repo and do not reference external endpoints or read unrelated system config.
Install Mechanism
No install spec; this is instruction-only with three small shell scripts. Nothing is downloaded or extracted from third-party URLs and the scripts are simple git wrappers.
Credentials
The skill declares no required environment variables, credentials, or config paths. The assets include a .gitignore example that mentions .env (as guidance to avoid committing secrets), which is appropriate and not a request for secrets.
Persistence & Privilege
always is false and the skill does not request permanent privileges or modify other skills. The default ability for the agent to invoke the skill autonomously remains, which is normal for skills.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install git-cli
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /git-cli 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Major update: Added reference, assets, and scripts directories to provide quick references, check scripts, and templates. - Added quick reference table for common Git tasks and commands. - Introduced scripts for checking Git repo state, status summary, and branch listing. - Included assets with commit message and .gitignore templates for easy reuse. - Added detailed reference and troubleshooting guides in the reference directory. - Emphasized safety and context confirmation, with improved workflow and pointers to reusable content.
v1.0.0
Initial release of git-cli skill. - Provides guidance for common Git CLI tasks: inspecting changes, staging, committing, branching, stashing, and syncing with remotes. - Includes safety guidelines to avoid destructive commands unless requested. - Covers troubleshooting steps for common Git issues. - Lists essential Git commands and usage examples for everyday development.
元数据
Slug git-cli
版本 1.0.1
许可证 MIT-0
累计安装 18
当前安装数 17
历史版本数 2
常见问题

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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1513 次。

如何安装 Git cli?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install git-cli」即可一键安装,无需额外配置。

Git cli 是免费的吗?

是的,Git cli 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Git cli 支持哪些平台?

Git cli 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Git cli?

由 openlang(@openlang-cn)开发并维护,当前版本 v1.0.1。

💬 留言讨论