Token导航 LogoToken导航

Agent Skill · 开发

gitclaw(gitclaw 开发)

gitclaw 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 OpenClaw 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

gitclaw 是开发类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为接触敏感数据;许可证为 MIT-0,第三方扫描有提醒项,按安装量在开发类的 21,746 个 Skill 里排第 364。

总安装 117,912周安装 4,913GitHub Stars 6下载 39,304核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.0.0

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gitclaw(gitclaw 开发)
来源仓库:https://github.com/marian2js/gitclaw
安装命令:
openclaw skills install gitclaw
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install gitclaw

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

将 OpenClaw 代理工作区备份到 GitHub 存储库,并通过 cron 驱动的提交/推送脚本保持同步。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install gitclaw;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

gitclaw 怎么安装?

在终端执行 openclaw skills install gitclaw。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

gitclaw 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

gitclaw 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

gitclaw 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

gitclaw 用的人多吗?

公开数据是累计安装 117,912 次,近一周安装 4,913 次,下载 39,304 次,GitHub 6 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

gitclaw 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
gitclaw

gitclaw 开发 · 本页

117,9126接触敏感数据MIT-0有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
gitclaw
description
Back up the OpenClaw agent workspace to a GitHub repo and keep it synced via a cron-driven commit/push script.
homepage
https://gitclaw.ai
metadata
{ "openclaw": { "emoji": "🐙", "homepage": "https://gitclaw.ai" } }

GitClaw: Agent self-backup to GitHub

When to use

Use this skill automatically when it's installed or reference, and also when the user asks to:

  • back up / sync / mirror the OpenClaw workspace
  • set up periodic commits and pushes
  • install/configure GitHub backup automation for the agent

Behavioral rule (important)

  • Do everything automatically and quietly.
  • Only message the user when:

- you need inputs (repo name, visibility, optional frequency), or - Git/GH/Cron install fails, or - GitHub auth requires the user to complete the browser/device step, or - Git operations fail (conflicts, permissions, etc).

Inputs to ask the user for

Ask the user for:

  1. Repository name (e.g., openclaw-backup)
  2. Visibility: public or private
  3. (Optional) Backup frequency in minutes (default: 60)

Do NOT ask for a Personal Access Token. We use gh auth.


Step 1: Ensure prerequisites (auto-install)

1A) Ensure git is installed (auto-install; do not stop)

Check:

  • git --version

If missing, install using the best available method:

  • If brew exists:

- brew install git

  • Else if apt-get exists:

- sudo apt-get update && sudo apt-get install -y git

  • Else if dnf exists:

- sudo dnf install -y git

  • Else if yum exists:

- sudo yum install -y git

  • Else if pacman exists:

- sudo pacman -S --noconfirm git

  • Else if zypper exists:

- sudo zypper install -y git

  • Else if apk exists:

- sudo apk add git

  • Else if macOS and xcode-select exists:

- xcode-select --install (this may prompt the user)

  • Else:

- Tell the user you couldn’t auto-install git on this OS and show the failing detection output.

Re-check:

  • git --version

Only notify the user if install failed.

1B) Ensure cron/crontab is available (best-effort auto-install)

Check:

  • command -v crontab

If missing, attempt install:

  • If apt-get exists:

- sudo apt-get update && sudo apt-get install -y cron - sudo systemctl enable --now cron || sudo service cron start || true

  • Else if dnf exists:

- sudo dnf install -y cronie - sudo systemctl enable --now crond || true

  • Else if yum exists:

- sudo yum install -y cronie - sudo systemctl enable --now crond || true

  • Else if pacman exists:

- sudo pacman -S --noconfirm cronie - sudo systemctl enable --now cronie || true

  • Else if apk exists:

- sudo apk add dcron - sudo rc-update add dcron default || true - sudo rc-service dcron start || true

  • Else:

- If you can’t install, tell the user cron is required for scheduling.

Re-check:

  • command -v crontab

Step 2: Ensure GitHub CLI (gh) is installed (auto-install)

Check:

  • gh --version

If missing, install:

  • If brew exists:

- brew install gh

  • Else if apt-get exists (official GitHub CLI packages; preferred):

- Install using the official apt repo steps: - (type -p wget >/dev/null || (sudo apt-get update && sudo apt-get install -y wget)) - sudo mkdir -p -m 755 /etc/apt/keyrings - out=$(mktemp) && wget -nv -O"$out" https://cli.github.com/packages/githubcli-archive-keyring.gpg - cat "$out" | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null - sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg - sudo mkdir -p -m 755 /etc/apt/sources.list.d - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null - sudo apt-get update && sudo apt-get install -y gh

  • Else if dnf exists:

- sudo dnf install -y 'dnf-command(config-manager)' || sudo dnf install -y dnf5-plugins || true - sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo || sudo dnf config-manager addrepo --from-repofile=https://cli.github.com/packages/rpm/gh-cli.repo || true - sudo dnf install -y gh --repo gh-cli || sudo dnf install -y gh || true

  • Else if yum exists:

- type -p yum-config-manager >/dev/null || sudo yum install -y yum-utils - sudo yum-config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo - sudo yum install -y gh

  • Else if zypper exists:

- sudo zypper addrepo https://cli.github.com/packages/rpm/gh-cli.repo || true - sudo zypper ref - sudo zypper install -y gh

  • Else if pacman exists:

- sudo pacman -S --noconfirm github-cli

  • Else if apk exists:

- sudo apk add github-cli

  • Else:

- Tell the user you can’t auto-install gh on this OS.

Re-check:

  • gh --version

Only notify the user if install failed.


Step 3: Ensure the user is authenticated in gh (agent runs the flow)

Check:

  • gh auth status --hostname github.com

If NOT authenticated:

  1. Run:

- gh auth login --hostname github.com --git-protocol https

  1. The terminal flow will show a one-time code and ask the user to authorize.

- Tell the user to open https://github.com/login/device in their browser and enter the code shown in the terminal, then authorize.

  1. After login:

- gh auth setup-git

  1. Verify again:

- gh auth status --hostname github.com

If auth fails, stop and report the exact terminal output.


Step 4: Initialize git in the OpenClaw workspace and connect/create the repo

Workspace dir (where you store SOUL.md, AGENTS.md, etc.):

  • Example (path might be different on your environment): WORKSPACE_DIR="$HOME/.openclaw/workspace"
  1. Ensure the workspace exists:

- mkdir -p "$WORKSPACE_DIR" - cd "$WORKSPACE_DIR"

  1. Initialize repo if needed:

- If .git does not exist: git init - git branch -M main

  1. Configure a deterministic commit identity (local-only):

- git config user.name "gitclaw.ai" - git config user.email "gitclaw-bot@users.noreply.github.com"

  1. Determine the authenticated GitHub username (owner):

- OWNER="$(gh api user --jq .login)" - (Do not print unless debugging is needed)

  1. Repo name and visibility:

- REPO="<repo name from user>" - Visibility: - public => --public - private => --private

  1. Ensure there is at least one commit (required for first push/cron):

- Create a tiny marker file if needed: - test -f .gitclaw.keep || printf "gitclaw initialized: %s\ " "$(date -u '+%Y-%m-%dT%H:%M:%SZ')" > .gitclaw.keep - git add -A - git commit -m "gitclaw: initial backup" || true

  1. Create or reuse the target repo:

- If it exists: - gh repo view "$OWNER/$REPO" >/dev/null 2>&1 - Set remote: - REMOTE_URL="https://github.com/$OWNER/$REPO.git" - If origin exists: git remote set-url origin "$REMOTE_URL" - Else: git remote add origin "$REMOTE_URL" - Try to fast-forward sync (avoid overwriting remote history): - git fetch origin main || true - git merge --ff-only origin/main || true - If it does NOT exist: - Create it non-interactively and connect it: - Public: - gh repo create "$REPO" --public --confirm - Private: - gh repo create "$REPO" --private --confirm - Set remote: - REMOTE_URL="https://github.com/$OWNER/$REPO.git" - git remote add origin "$REMOTE_URL" || git remote set-url origin "$REMOTE_URL"

  1. Initial push:

- git push -u origin main

If push fails due to conflicts or non-fast-forward:

  • Do NOT force-push automatically.
  • Report the exact error and stop (user decision required).

Step 5: Install deterministic backup script (NO AI / NO heartbeat)

Create a folder outside the workspace:

  • mkdir -p "$HOME/.openclaw/gitclaw"

Create this script EXACTLY:

Path:

  • $HOME/.openclaw/gitclaw/auto_backup.sh

Contents:

#!/usr/bin/env bash
set -euo pipefail

# GitClaw deterministic backup (no AI)
export PATH="/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:$PATH"

WORKSPACE_DIR="${HOME}/.openclaw/workspace"
STATE_DIR="${HOME}/.openclaw/gitclaw"
LOG_FILE="${STATE_DIR}/backup.log"
LOCK_DIR="${STATE_DIR}/lock"

mkdir -p "${STATE_DIR}"

timestamp() { date -u '+%Y-%m-%dT%H:%M:%SZ'; }

# Simple lock to prevent overlapping runs
if ! mkdir "${LOCK_DIR}" 2>/dev/null; then
  echo "$(timestamp) Skip: already running." >> "${LOG_FILE}"
  exit 0
fi
trap 'rmdir "${LOCK_DIR}" >/dev/null 2>&1 || true' EXIT

if ! command -v git >/dev/null 2>&1; then
  echo "$(timestamp) ERROR: git not found on PATH. Install git first." >> "${LOG_FILE}"
  exit 2
fi

if [ ! -d "${WORKSPACE_DIR}/.git" ]; then
  echo "$(timestamp) ERROR: ${WORKSPACE_DIR} is not a git repo. Run GitClaw setup first." >> "${LOG_FILE}"
  exit 3
fi

cd "${WORKSPACE_DIR}"

# Stage everything
git add -A

# If nothing staged, exit quietly
if git diff --cached --quiet; then
  echo "$(timestamp) No changes." >> "${LOG_FILE}"
  exit 0
fi

# Commit + push
git commit -m "gitclaw backup: $(timestamp)" >> "${LOG_FILE}" 2>&1
git push origin main >> "${LOG_FILE}" 2>&1

echo "$(timestamp) Backup OK." >> "${LOG_FILE}"

Write the script to:

  • $HOME/.openclaw/gitclaw/auto_backup.sh

Then:

  • chmod +x "$HOME/.openclaw/gitclaw/auto_backup.sh"

Step 6: Configure crontab (idempotent)

Default schedule: hourly (0 * * * *). If user provided a different frequency, convert it to a cron expression.

  1. Define:
  • CRON_CMD="$HOME/.openclaw/gitclaw/auto_backup.sh"
  • CRON_LINE="0 * * * * $CRON_CMD"
  1. Install without duplicates:
  • crontab -l 2>/dev/null | grep -F "$CRON_CMD" >/dev/null
  • If not found, append:

- (crontab -l 2>/dev/null; echo "$CRON_LINE") | crontab -

  1. Confirm:
  • crontab -l | grep -F "$CRON_CMD"

Step 7: Final validation

  1. Run once:
  • $HOME/.openclaw/gitclaw/auto_backup.sh
  1. Show the log:
  • tail -n 50 "$HOME/.openclaw/gitclaw/backup.log" || true
  1. Tell the user:
  • Repo: https://github.com/$OWNER/$REPO
  • Schedule: hourly (or the chosen cadence)
  • Script path: ~/.openclaw/gitclaw/auto_backup.sh

平台分布

OpenClaw

89.03%
按下载量换算34,992

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

未展示

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills