{
  "schemaVersion": "1.0",
  "item": {
    "slug": "gitclaw",
    "name": "GitClaw",
    "source": "tencent",
    "type": "skill",
    "category": "效率提升",
    "sourceUrl": "https://clawhub.ai/marian2js/gitclaw",
    "canonicalUrl": "https://clawhub.ai/marian2js/gitclaw",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/gitclaw",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=gitclaw",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/gitclaw"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/gitclaw",
    "agentPageUrl": "https://openagent3.xyz/skills/gitclaw/agent",
    "manifestUrl": "https://openagent3.xyz/skills/gitclaw/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/gitclaw/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "When to use",
        "body": "Use this skill automatically when it's installed or reference, and also when the user asks to:\n\nback up / sync / mirror the OpenClaw workspace\nset up periodic commits and pushes\ninstall/configure GitHub backup automation for the agent"
      },
      {
        "title": "Behavioral rule (important)",
        "body": "Do everything automatically and quietly.\nOnly message the user when:\n\nyou need inputs (repo name, visibility, optional frequency), or\nGit/GH/Cron install fails, or\nGitHub auth requires the user to complete the browser/device step, or\nGit operations fail (conflicts, permissions, etc)."
      },
      {
        "title": "Inputs to ask the user for",
        "body": "Ask the user for:\n\nRepository name (e.g., openclaw-backup)\nVisibility: public or private\n(Optional) Backup frequency in minutes (default: 60)\n\nDo NOT ask for a Personal Access Token. We use gh auth."
      },
      {
        "title": "1A) Ensure git is installed (auto-install; do not stop)",
        "body": "Check:\n\ngit --version\n\nIf missing, install using the best available method:\n\nIf brew exists:\n\nbrew install git\n\n\nElse if apt-get exists:\n\nsudo apt-get update && sudo apt-get install -y git\n\n\nElse if dnf exists:\n\nsudo dnf install -y git\n\n\nElse if yum exists:\n\nsudo yum install -y git\n\n\nElse if pacman exists:\n\nsudo pacman -S --noconfirm git\n\n\nElse if zypper exists:\n\nsudo zypper install -y git\n\n\nElse if apk exists:\n\nsudo apk add git\n\n\nElse if macOS and xcode-select exists:\n\nxcode-select --install (this may prompt the user)\n\n\nElse:\n\nTell the user you couldn’t auto-install git on this OS and show the failing detection output.\n\nRe-check:\n\ngit --version\n\nOnly notify the user if install failed."
      },
      {
        "title": "1B) Ensure cron/crontab is available (best-effort auto-install)",
        "body": "Check:\n\ncommand -v crontab\n\nIf missing, attempt install:\n\nIf apt-get exists:\n\nsudo apt-get update && sudo apt-get install -y cron\nsudo systemctl enable --now cron || sudo service cron start || true\n\n\nElse if dnf exists:\n\nsudo dnf install -y cronie\nsudo systemctl enable --now crond || true\n\n\nElse if yum exists:\n\nsudo yum install -y cronie\nsudo systemctl enable --now crond || true\n\n\nElse if pacman exists:\n\nsudo pacman -S --noconfirm cronie\nsudo systemctl enable --now cronie || true\n\n\nElse if apk exists:\n\nsudo apk add dcron\nsudo rc-update add dcron default || true\nsudo rc-service dcron start || true\n\n\nElse:\n\nIf you can’t install, tell the user cron is required for scheduling.\n\nRe-check:\n\ncommand -v crontab"
      },
      {
        "title": "Step 2: Ensure GitHub CLI (gh) is installed (auto-install)",
        "body": "Check:\n\ngh --version\n\nIf missing, install:\n\nIf brew exists:\n\nbrew install gh\n\n\n\nElse if apt-get exists (official GitHub CLI packages; preferred):\n\nInstall using the official apt repo steps:\n\n(type -p wget >/dev/null || (sudo apt-get update && sudo apt-get install -y wget))\nsudo mkdir -p -m 755 /etc/apt/keyrings\nout=$(mktemp) && wget -nv -O\"$out\" https://cli.github.com/packages/githubcli-archive-keyring.gpg\ncat \"$out\" | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null\nsudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg\nsudo mkdir -p -m 755 /etc/apt/sources.list.d\necho \"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\nsudo apt-get update && sudo apt-get install -y gh\n\n\n\n\n\nElse if dnf exists:\n\nsudo dnf install -y 'dnf-command(config-manager)' || sudo dnf install -y dnf5-plugins || true\nsudo 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\nsudo dnf install -y gh --repo gh-cli || sudo dnf install -y gh || true\n\n\n\nElse if yum exists:\n\ntype -p yum-config-manager >/dev/null || sudo yum install -y yum-utils\nsudo yum-config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo\nsudo yum install -y gh\n\n\n\nElse if zypper exists:\n\nsudo zypper addrepo https://cli.github.com/packages/rpm/gh-cli.repo || true\nsudo zypper ref\nsudo zypper install -y gh\n\n\n\nElse if pacman exists:\n\nsudo pacman -S --noconfirm github-cli\n\n\n\nElse if apk exists:\n\nsudo apk add github-cli\n\n\n\nElse:\n\nTell the user you can’t auto-install gh on this OS.\n\nRe-check:\n\ngh --version\n\nOnly notify the user if install failed."
      },
      {
        "title": "Step 3: Ensure the user is authenticated in gh (agent runs the flow)",
        "body": "Check:\n\ngh auth status --hostname github.com\n\nIf NOT authenticated:\n\nRun:\n\ngh auth login --hostname github.com --git-protocol https\n\n\n\nThe terminal flow will show a one-time code and ask the user to authorize.\n\nTell the user to open https://github.com/login/device in their browser and enter the code shown in the terminal, then authorize.\n\n\n\nAfter login:\n\ngh auth setup-git\n\n\n\nVerify again:\n\ngh auth status --hostname github.com\n\nIf auth fails, stop and report the exact terminal output."
      },
      {
        "title": "Step 4: Initialize git in the OpenClaw workspace and connect/create the repo",
        "body": "Workspace dir (where you store SOUL.md, AGENTS.md, etc.):\n\nExample (path might be different on your environment): WORKSPACE_DIR=\"$HOME/.openclaw/workspace\"\n\nEnsure the workspace exists:\n\nmkdir -p \"$WORKSPACE_DIR\"\ncd \"$WORKSPACE_DIR\"\n\n\n\nInitialize repo if needed:\n\nIf .git does not exist: git init\ngit branch -M main\n\n\n\nConfigure a deterministic commit identity (local-only):\n\ngit config user.name \"gitclaw.ai\"\ngit config user.email \"gitclaw-bot@users.noreply.github.com\"\n\n\n\nDetermine the authenticated GitHub username (owner):\n\nOWNER=\"$(gh api user --jq .login)\"\n(Do not print unless debugging is needed)\n\n\n\nRepo name and visibility:\n\nREPO=\"<repo name from user>\"\nVisibility:\n\npublic => --public\nprivate => --private\n\n\n\n\n\nEnsure there is at least one commit (required for first push/cron):\n\nCreate a tiny marker file if needed:\n\ntest -f .gitclaw.keep || printf \"gitclaw initialized: %s\\n\" \"$(date -u '+%Y-%m-%dT%H:%M:%SZ')\" > .gitclaw.keep\n\n\ngit add -A\ngit commit -m \"gitclaw: initial backup\" || true\n\n\n\nCreate or reuse the target repo:\n\nIf it exists:\n\ngh repo view \"$OWNER/$REPO\" >/dev/null 2>&1\nSet remote:\n\nREMOTE_URL=\"https://github.com/$OWNER/$REPO.git\"\nIf origin exists: git remote set-url origin \"$REMOTE_URL\"\nElse: git remote add origin \"$REMOTE_URL\"\n\n\nTry to fast-forward sync (avoid overwriting remote history):\n\ngit fetch origin main || true\ngit merge --ff-only origin/main || true\n\n\n\n\nIf it does NOT exist:\n\nCreate it non-interactively and connect it:\n\nPublic:\n\ngh repo create \"$REPO\" --public  --confirm\n\n\nPrivate:\n\ngh repo create \"$REPO\" --private --confirm\n\n\n\n\nSet remote:\n\nREMOTE_URL=\"https://github.com/$OWNER/$REPO.git\"\ngit remote add origin \"$REMOTE_URL\" || git remote set-url origin \"$REMOTE_URL\"\n\n\n\n\n\n\n\nInitial push:\n\ngit push -u origin main\n\nIf push fails due to conflicts or non-fast-forward:\n\nDo NOT force-push automatically.\nReport the exact error and stop (user decision required)."
      },
      {
        "title": "Step 5: Install deterministic backup script (NO AI / NO heartbeat)",
        "body": "Create a folder outside the workspace:\n\nmkdir -p \"$HOME/.openclaw/gitclaw\"\n\nCreate this script EXACTLY:\n\nPath:\n\n$HOME/.openclaw/gitclaw/auto_backup.sh\n\nContents:\n\n#!/usr/bin/env bash\nset -euo pipefail\n\n# GitClaw deterministic backup (no AI)\nexport PATH=\"/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:$PATH\"\n\nWORKSPACE_DIR=\"${HOME}/.openclaw/workspace\"\nSTATE_DIR=\"${HOME}/.openclaw/gitclaw\"\nLOG_FILE=\"${STATE_DIR}/backup.log\"\nLOCK_DIR=\"${STATE_DIR}/lock\"\n\nmkdir -p \"${STATE_DIR}\"\n\ntimestamp() { date -u '+%Y-%m-%dT%H:%M:%SZ'; }\n\n# Simple lock to prevent overlapping runs\nif ! mkdir \"${LOCK_DIR}\" 2>/dev/null; then\n  echo \"$(timestamp) Skip: already running.\" >> \"${LOG_FILE}\"\n  exit 0\nfi\ntrap 'rmdir \"${LOCK_DIR}\" >/dev/null 2>&1 || true' EXIT\n\nif ! command -v git >/dev/null 2>&1; then\n  echo \"$(timestamp) ERROR: git not found on PATH. Install git first.\" >> \"${LOG_FILE}\"\n  exit 2\nfi\n\nif [ ! -d \"${WORKSPACE_DIR}/.git\" ]; then\n  echo \"$(timestamp) ERROR: ${WORKSPACE_DIR} is not a git repo. Run GitClaw setup first.\" >> \"${LOG_FILE}\"\n  exit 3\nfi\n\ncd \"${WORKSPACE_DIR}\"\n\n# Stage everything\ngit add -A\n\n# If nothing staged, exit quietly\nif git diff --cached --quiet; then\n  echo \"$(timestamp) No changes.\" >> \"${LOG_FILE}\"\n  exit 0\nfi\n\n# Commit + push\ngit commit -m \"gitclaw backup: $(timestamp)\" >> \"${LOG_FILE}\" 2>&1\ngit push origin main >> \"${LOG_FILE}\" 2>&1\n\necho \"$(timestamp) Backup OK.\" >> \"${LOG_FILE}\"\n\nWrite the script to:\n\n$HOME/.openclaw/gitclaw/auto_backup.sh\n\nThen:\n\nchmod +x \"$HOME/.openclaw/gitclaw/auto_backup.sh\""
      },
      {
        "title": "Step 6: Configure crontab (idempotent)",
        "body": "Default schedule: hourly (0 * * * *). If user provided a different frequency, convert it to a cron expression.\n\nDefine:\n\nCRON_CMD=\"$HOME/.openclaw/gitclaw/auto_backup.sh\"\nCRON_LINE=\"0 * * * * $CRON_CMD\"\n\nInstall without duplicates:\n\ncrontab -l 2>/dev/null | grep -F \"$CRON_CMD\" >/dev/null\nIf not found, append:\n\n(crontab -l 2>/dev/null; echo \"$CRON_LINE\") | crontab -\n\nConfirm:\n\ncrontab -l | grep -F \"$CRON_CMD\""
      },
      {
        "title": "Step 7: Final validation",
        "body": "Run once:\n\n$HOME/.openclaw/gitclaw/auto_backup.sh\n\nShow the log:\n\ntail -n 50 \"$HOME/.openclaw/gitclaw/backup.log\" || true\n\nTell the user:\n\nRepo: https://github.com/$OWNER/$REPO\nSchedule: hourly (or the chosen cadence)\nScript path: ~/.openclaw/gitclaw/auto_backup.sh"
      }
    ],
    "body": "GitClaw: Agent self-backup to GitHub\nWhen to use\n\nUse this skill automatically when it's installed or reference, and also when the user asks to:\n\nback up / sync / mirror the OpenClaw workspace\nset up periodic commits and pushes\ninstall/configure GitHub backup automation for the agent\nBehavioral rule (important)\nDo everything automatically and quietly.\nOnly message the user when:\nyou need inputs (repo name, visibility, optional frequency), or\nGit/GH/Cron install fails, or\nGitHub auth requires the user to complete the browser/device step, or\nGit operations fail (conflicts, permissions, etc).\nInputs to ask the user for\n\nAsk the user for:\n\nRepository name (e.g., openclaw-backup)\nVisibility: public or private\n(Optional) Backup frequency in minutes (default: 60)\n\nDo NOT ask for a Personal Access Token. We use gh auth.\n\nStep 1: Ensure prerequisites (auto-install)\n1A) Ensure git is installed (auto-install; do not stop)\n\nCheck:\n\ngit --version\n\nIf missing, install using the best available method:\n\nIf brew exists:\nbrew install git\nElse if apt-get exists:\nsudo apt-get update && sudo apt-get install -y git\nElse if dnf exists:\nsudo dnf install -y git\nElse if yum exists:\nsudo yum install -y git\nElse if pacman exists:\nsudo pacman -S --noconfirm git\nElse if zypper exists:\nsudo zypper install -y git\nElse if apk exists:\nsudo apk add git\nElse if macOS and xcode-select exists:\nxcode-select --install (this may prompt the user)\nElse:\nTell the user you couldn’t auto-install git on this OS and show the failing detection output.\n\nRe-check:\n\ngit --version\n\nOnly notify the user if install failed.\n\n1B) Ensure cron/crontab is available (best-effort auto-install)\n\nCheck:\n\ncommand -v crontab\n\nIf missing, attempt install:\n\nIf apt-get exists:\nsudo apt-get update && sudo apt-get install -y cron\nsudo systemctl enable --now cron || sudo service cron start || true\nElse if dnf exists:\nsudo dnf install -y cronie\nsudo systemctl enable --now crond || true\nElse if yum exists:\nsudo yum install -y cronie\nsudo systemctl enable --now crond || true\nElse if pacman exists:\nsudo pacman -S --noconfirm cronie\nsudo systemctl enable --now cronie || true\nElse if apk exists:\nsudo apk add dcron\nsudo rc-update add dcron default || true\nsudo rc-service dcron start || true\nElse:\nIf you can’t install, tell the user cron is required for scheduling.\n\nRe-check:\n\ncommand -v crontab\nStep 2: Ensure GitHub CLI (gh) is installed (auto-install)\n\nCheck:\n\ngh --version\n\nIf missing, install:\n\nIf brew exists:\n\nbrew install gh\n\nElse if apt-get exists (official GitHub CLI packages; preferred):\n\nInstall using the official apt repo steps:\n(type -p wget >/dev/null || (sudo apt-get update && sudo apt-get install -y wget))\nsudo mkdir -p -m 755 /etc/apt/keyrings\nout=$(mktemp) && wget -nv -O\"$out\" https://cli.github.com/packages/githubcli-archive-keyring.gpg\ncat \"$out\" | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null\nsudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg\nsudo mkdir -p -m 755 /etc/apt/sources.list.d\necho \"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\nsudo apt-get update && sudo apt-get install -y gh\n\nElse if dnf exists:\n\nsudo dnf install -y 'dnf-command(config-manager)' || sudo dnf install -y dnf5-plugins || true\nsudo 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\nsudo dnf install -y gh --repo gh-cli || sudo dnf install -y gh || true\n\nElse if yum exists:\n\ntype -p yum-config-manager >/dev/null || sudo yum install -y yum-utils\nsudo yum-config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo\nsudo yum install -y gh\n\nElse if zypper exists:\n\nsudo zypper addrepo https://cli.github.com/packages/rpm/gh-cli.repo || true\nsudo zypper ref\nsudo zypper install -y gh\n\nElse if pacman exists:\n\nsudo pacman -S --noconfirm github-cli\n\nElse if apk exists:\n\nsudo apk add github-cli\n\nElse:\n\nTell the user you can’t auto-install gh on this OS.\n\nRe-check:\n\ngh --version\n\nOnly notify the user if install failed.\n\nStep 3: Ensure the user is authenticated in gh (agent runs the flow)\n\nCheck:\n\ngh auth status --hostname github.com\n\nIf NOT authenticated:\n\nRun:\n\ngh auth login --hostname github.com --git-protocol https\n\nThe terminal flow will show a one-time code and ask the user to authorize.\n\nTell the user to open https://github.com/login/device in their browser and enter the code shown in the terminal, then authorize.\n\nAfter login:\n\ngh auth setup-git\n\nVerify again:\n\ngh auth status --hostname github.com\n\nIf auth fails, stop and report the exact terminal output.\n\nStep 4: Initialize git in the OpenClaw workspace and connect/create the repo\n\nWorkspace dir (where you store SOUL.md, AGENTS.md, etc.):\n\nExample (path might be different on your environment): WORKSPACE_DIR=\"$HOME/.openclaw/workspace\"\n\nEnsure the workspace exists:\n\nmkdir -p \"$WORKSPACE_DIR\"\ncd \"$WORKSPACE_DIR\"\n\nInitialize repo if needed:\n\nIf .git does not exist: git init\ngit branch -M main\n\nConfigure a deterministic commit identity (local-only):\n\ngit config user.name \"gitclaw.ai\"\ngit config user.email \"gitclaw-bot@users.noreply.github.com\"\n\nDetermine the authenticated GitHub username (owner):\n\nOWNER=\"$(gh api user --jq .login)\"\n(Do not print unless debugging is needed)\n\nRepo name and visibility:\n\nREPO=\"<repo name from user>\"\nVisibility:\npublic => --public\nprivate => --private\n\nEnsure there is at least one commit (required for first push/cron):\n\nCreate a tiny marker file if needed:\ntest -f .gitclaw.keep || printf \"gitclaw initialized: %s\\n\" \"$(date -u '+%Y-%m-%dT%H:%M:%SZ')\" > .gitclaw.keep\ngit add -A\ngit commit -m \"gitclaw: initial backup\" || true\n\nCreate or reuse the target repo:\n\nIf it exists:\ngh repo view \"$OWNER/$REPO\" >/dev/null 2>&1\nSet remote:\nREMOTE_URL=\"https://github.com/$OWNER/$REPO.git\"\nIf origin exists: git remote set-url origin \"$REMOTE_URL\"\nElse: git remote add origin \"$REMOTE_URL\"\nTry to fast-forward sync (avoid overwriting remote history):\ngit fetch origin main || true\ngit merge --ff-only origin/main || true\nIf it does NOT exist:\nCreate it non-interactively and connect it:\nPublic:\ngh repo create \"$REPO\" --public --confirm\nPrivate:\ngh repo create \"$REPO\" --private --confirm\nSet remote:\nREMOTE_URL=\"https://github.com/$OWNER/$REPO.git\"\ngit remote add origin \"$REMOTE_URL\" || git remote set-url origin \"$REMOTE_URL\"\n\nInitial push:\n\ngit push -u origin main\n\nIf push fails due to conflicts or non-fast-forward:\n\nDo NOT force-push automatically.\nReport the exact error and stop (user decision required).\nStep 5: Install deterministic backup script (NO AI / NO heartbeat)\n\nCreate a folder outside the workspace:\n\nmkdir -p \"$HOME/.openclaw/gitclaw\"\n\nCreate this script EXACTLY:\n\nPath:\n\n$HOME/.openclaw/gitclaw/auto_backup.sh\n\nContents:\n\n#!/usr/bin/env bash\nset -euo pipefail\n\n# GitClaw deterministic backup (no AI)\nexport PATH=\"/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:$PATH\"\n\nWORKSPACE_DIR=\"${HOME}/.openclaw/workspace\"\nSTATE_DIR=\"${HOME}/.openclaw/gitclaw\"\nLOG_FILE=\"${STATE_DIR}/backup.log\"\nLOCK_DIR=\"${STATE_DIR}/lock\"\n\nmkdir -p \"${STATE_DIR}\"\n\ntimestamp() { date -u '+%Y-%m-%dT%H:%M:%SZ'; }\n\n# Simple lock to prevent overlapping runs\nif ! mkdir \"${LOCK_DIR}\" 2>/dev/null; then\n  echo \"$(timestamp) Skip: already running.\" >> \"${LOG_FILE}\"\n  exit 0\nfi\ntrap 'rmdir \"${LOCK_DIR}\" >/dev/null 2>&1 || true' EXIT\n\nif ! command -v git >/dev/null 2>&1; then\n  echo \"$(timestamp) ERROR: git not found on PATH. Install git first.\" >> \"${LOG_FILE}\"\n  exit 2\nfi\n\nif [ ! -d \"${WORKSPACE_DIR}/.git\" ]; then\n  echo \"$(timestamp) ERROR: ${WORKSPACE_DIR} is not a git repo. Run GitClaw setup first.\" >> \"${LOG_FILE}\"\n  exit 3\nfi\n\ncd \"${WORKSPACE_DIR}\"\n\n# Stage everything\ngit add -A\n\n# If nothing staged, exit quietly\nif git diff --cached --quiet; then\n  echo \"$(timestamp) No changes.\" >> \"${LOG_FILE}\"\n  exit 0\nfi\n\n# Commit + push\ngit commit -m \"gitclaw backup: $(timestamp)\" >> \"${LOG_FILE}\" 2>&1\ngit push origin main >> \"${LOG_FILE}\" 2>&1\n\necho \"$(timestamp) Backup OK.\" >> \"${LOG_FILE}\"\n\n\nWrite the script to:\n\n$HOME/.openclaw/gitclaw/auto_backup.sh\n\nThen:\n\nchmod +x \"$HOME/.openclaw/gitclaw/auto_backup.sh\"\nStep 6: Configure crontab (idempotent)\n\nDefault schedule: hourly (0 * * * *). If user provided a different frequency, convert it to a cron expression.\n\nDefine:\nCRON_CMD=\"$HOME/.openclaw/gitclaw/auto_backup.sh\"\nCRON_LINE=\"0 * * * * $CRON_CMD\"\nInstall without duplicates:\ncrontab -l 2>/dev/null | grep -F \"$CRON_CMD\" >/dev/null\nIf not found, append:\n(crontab -l 2>/dev/null; echo \"$CRON_LINE\") | crontab -\nConfirm:\ncrontab -l | grep -F \"$CRON_CMD\"\nStep 7: Final validation\nRun once:\n$HOME/.openclaw/gitclaw/auto_backup.sh\nShow the log:\ntail -n 50 \"$HOME/.openclaw/gitclaw/backup.log\" || true\nTell the user:\nRepo: https://github.com/$OWNER/$REPO\nSchedule: hourly (or the chosen cadence)\nScript path: ~/.openclaw/gitclaw/auto_backup.sh"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/marian2js/gitclaw",
    "publisherUrl": "https://clawhub.ai/marian2js/gitclaw",
    "owner": "marian2js",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/gitclaw",
    "downloadUrl": "https://openagent3.xyz/downloads/gitclaw",
    "agentUrl": "https://openagent3.xyz/skills/gitclaw/agent",
    "manifestUrl": "https://openagent3.xyz/skills/gitclaw/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/gitclaw/agent.md"
  }
}