← 返回 Skills 市场
306
总下载
0
收藏
3
当前安装
1
版本数
在 OpenClaw 中安装
/install git-cli-1-0-0
功能描述
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 Helper\r
\r This skill explains how to use the Git command line for everyday development tasks in a repository.\r \r
When to Use\r
\r Use this skill when:\r \r
- The user wants to know “what changed” in the working tree.\r
- The user wants to stage, unstage, or commit files.\r
- The user wants to create or switch branches.\r
- The user wants to pull from or push to a remote.\r
- The user needs help with stashing, viewing history, or inspecting diffs.\r \r
Requirements\r
\r
- Git is installed and available on the PATH (for example
git --versionsucceeds).\r - The current directory is either:\r
- Inside a Git repository, or\r
- A location where the user intends to run
git initorgit clone.\r \r When uncertain, suggest the user run:\r \r
git status\r
```\r
\r
to see whether the current folder is a Git repository.\r
\r
## Safety Guidelines\r
\r
- Prefer **read-only commands** first (`git status`, `git diff`, `git log`) before suggesting changing commands.\r
- Avoid destructive suggestions such as:\r
- `git reset --hard`\r
- `git clean -fdx`\r
- `git push --force`\r
- Only mention or recommend such commands if the user explicitly asks and understands the risk.\r
\r
## Common Workflows\r
\r
### 1. Inspect current state\r
\r
Check what has changed and whether there are untracked files:\r
\r
```bash\r
git status\r
```\r
\r
See detailed changes in the working tree:\r
\r
```bash\r
git diff # unstaged changes\r
git diff --staged # staged (to-be-committed) changes\r
```\r
\r
### 2. Stage and unstage changes\r
\r
Stage a specific file:\r
\r
```bash\r
git add path/to/file\r
```\r
\r
Stage all tracked and untracked changes:\r
\r
```bash\r
git add .\r
```\r
\r
Unstage a file (keep changes in the working tree):\r
\r
```bash\r
git restore --staged path/to/file\r
```\r
\r
### 3. Create commits\r
\r
Create a commit with a message:\r
\r
```bash\r
git commit -m "short, descriptive message"\r
```\r
\r
If the user prefers a multi-line message, suggest:\r
\r
```bash\r
git commit\r
```\r
\r
which opens their editor.\r
\r
### 4. Branching and switching\r
\r
Create and switch to a new branch:\r
\r
```bash\r
git checkout -b feature/my-branch\r
```\r
\r
Switch to an existing branch:\r
\r
```bash\r
git checkout main\r
```\r
\r
List local branches:\r
\r
```bash\r
git branch\r
```\r
\r
### 5. Synchronize with remote\r
\r
If the repository already has a remote (for example `origin`):\r
\r
- Fetch latest remote data:\r
\r
```bash\r
git fetch\r
```\r
\r
- Pull latest changes into current branch:\r
\r
```bash\r
git pull\r
```\r
\r
- Push the current branch and set upstream:\r
\r
```bash\r
git push -u origin \x3Cbranch-name>\r
```\r
\r
For subsequent pushes on the same branch:\r
\r
```bash\r
git push\r
```\r
\r
### 6. Cloning and initializing\r
\r
Clone an existing remote repository:\r
\r
```bash\r
git clone \x3Crepo-url>\r
```\r
\r
Initialize a new repository in the current folder:\r
\r
```bash\r
git init\r
```\r
\r
Optionally add a remote:\r
\r
```bash\r
git remote add origin \x3Crepo-url>\r
```\r
\r
### 7. Stashing work-in-progress\r
\r
When the user needs to temporarily put aside local changes:\r
\r
```bash\r
git stash\r
```\r
\r
List stashes:\r
\r
```bash\r
git stash list\r
```\r
\r
Apply and keep the top stash:\r
\r
```bash\r
git stash apply\r
```\r
\r
Apply and drop the top stash:\r
\r
```bash\r
git stash pop\r
```\r
\r
## Viewing History and Blame\r
\r
Show recent commits (compact format):\r
\r
```bash\r
git log --oneline --decorate --graph --all\r
```\r
\r
See who last changed each line of a file:\r
\r
```bash\r
git blame path/to/file\r
```\r
\r
## Troubleshooting Tips\r
\r
- If Git reports “not a git repository”, suggest:\r
- Running commands in the correct project folder, or\r
- Initializing with `git init` (if appropriate), or\r
- Cloning with `git clone \x3Crepo-url>`.\r
- If a push is rejected because the remote has new commits, suggest:\r
- `git pull --rebase` or `git pull` (depending on the team’s policy), then retry `git push`.\r
- If there are merge conflicts, explain:\r
- The user must edit the conflicted files,\r
- Mark conflicts as resolved by `git add`,\r
- Then complete the merge or rebase with `git commit` or `git rebase --continue`.\r
\r
安全使用建议
This skill is coherent and safe from a request/permission perspective: it only contains Git command guidance and asks for no secrets or installs. Before allowing an agent to execute commands, confirm you want those git operations performed (especially push, reset, clean, or force-push). Keep backups or ensure local changes are committed/stashed if you are concerned, and don't permit the agent to run destructive commands unless you explicitly request them.
功能分析
Type: OpenClaw Skill
Name: git-cli-1-0-0
Version: 1.0.0
The skill bundle is a standard helper for Git CLI operations, providing common commands for repository management, branching, and synchronization. It includes explicit safety guidelines in SKILL.md to avoid destructive commands like 'git reset --hard' and contains no evidence of malicious intent, data exfiltration, or prompt injection.
能力评估
Purpose & Capability
Name, description, and content all describe Git CLI usage (status, diff, add, commit, branch, stash, fetch/pull/push, clone, init). There are no unrelated environment variables, binaries, or install steps declared.
Instruction Scope
SKILL.md gives concrete, scoped Git command examples and safety guidance. It does not instruct reading unrelated files, accessing extra environment variables, or sending data to external endpoints beyond normal git remotes. Destructive commands are discouraged and only to be suggested with explicit user consent.
Install Mechanism
No install spec or code files — instruction-only. Nothing will be written to disk or downloaded by the skill itself.
Credentials
No required environment variables, credentials, or config paths are declared. The skill's needs (a system Git binary and being inside a repo) match the documented instructions.
Persistence & Privilege
always:false (default) and the skill does not request persistent presence or modify other skills/config. Autonomous invocation is allowed by platform default but the skill itself has no elevated privileges.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install git-cli-1-0-0 - 安装完成后,直接呼叫该 Skill 的名称或使用
/git-cli-1-0-0触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of git-cli skill.
- Provides clear guidance for common Git CLI tasks: inspection, staging, committing, branching, stashing, syncing, and history.
- Emphasizes safety by prioritizing non-destructive commands and cautioning against risky operations.
- Offers troubleshooting and workflow tips for both beginners and experienced users.
- Designed to assist users in understanding and performing essential Git operations from the command line.
元数据
常见问题
Git Cli 1.0.0 是什么?
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 插件,目前累计下载 306 次。
如何安装 Git Cli 1.0.0?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install git-cli-1-0-0」即可一键安装,无需额外配置。
Git Cli 1.0.0 是免费的吗?
是的,Git Cli 1.0.0 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Git Cli 1.0.0 支持哪些平台?
Git Cli 1.0.0 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Git Cli 1.0.0?
由 kenswj(@kenswj)开发并维护,当前版本 v1.0.0。
推荐 Skills