{"id":"dd0fe0fd-0019-408c-8f5f-30e0c8bf0173","slug":"clawhub-534422530-laosi-git-commit-helper","name":"Git Commit Helper Pro","description":"Git助手 - 自动生成提交信息/查看状�?分支管理/diff分析，基于Conventional Commits规范","canonicalUrl":"https://www.xpersona.co/agent/clawhub-534422530-laosi-git-commit-helper","sourceUrl":"https://clawhub.ai/534422530/laosi-git-commit-helper","homepage":"https://clawhub.ai/534422530/skills/laosi-git-commit-helper","source":"CLAWHUB","vendor":{"slug":"clawhub","label":"Clawhub","url":"https://clawhub.ai/534422530/skills/laosi-git-commit-helper"},"protocols":["OPENCLEW"],"capabilities":[],"trustScore":null,"trustConfidence":"unknown","artifactCount":0,"benchmarkCount":0,"lastRelease":"2.0.0","freshnessAt":"2026-10-11T19:40:18.399Z","freshnessLabel":"Oct 11, 2026","securityReviewed":true,"openapiReady":false,"stats":[{"label":"Trust score","value":"Unknown"},{"label":"Compatibility","value":"OpenClaw"},{"label":"Freshness","value":"Oct 11, 2026"},{"label":"Vendor","value":"Clawhub"},{"label":"Artifacts","value":"0"},{"label":"Benchmarks","value":"0"},{"label":"Last release","value":"2.0.0"}],"factsPreview":[{"factKey":"vendor","category":"vendor","label":"Vendor","value":"Clawhub","href":"https://clawhub.ai/534422530/skills/laosi-git-commit-helper","sourceUrl":"https://clawhub.ai/534422530/skills/laosi-git-commit-helper","sourceType":"profile","confidence":"medium","observedAt":"2026-10-11T19:40:18.468Z","isPublic":true},{"factKey":"protocols","category":"compatibility","label":"Protocol compatibility","value":"OpenClaw","href":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-git-commit-helper/contract","sourceUrl":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-git-commit-helper/contract","sourceType":"contract","confidence":"medium","observedAt":"2026-10-11T19:40:18.468Z","isPublic":true},{"factKey":"traction","category":"adoption","label":"Adoption signal","value":"1K downloads","href":"https://clawhub.ai/534422530/laosi-git-commit-helper","sourceUrl":"https://clawhub.ai/534422530/laosi-git-commit-helper","sourceType":"profile","confidence":"medium","observedAt":"2026-10-11T19:40:18.468Z","isPublic":true},{"factKey":"latest_release","category":"release","label":"Latest release","value":"2.0.0","href":"https://clawhub.ai/534422530/laosi-git-commit-helper","sourceUrl":"https://clawhub.ai/534422530/laosi-git-commit-helper","sourceType":"release","confidence":"medium","observedAt":"2026-05-29T23:31:39.896Z","isPublic":true},{"factKey":"handshake_status","category":"security","label":"Handshake status","value":"UNKNOWN","href":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-git-commit-helper/trust","sourceUrl":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-git-commit-helper/trust","sourceType":"trust","confidence":"medium","observedAt":null,"isPublic":true}],"highlights":["1K downloads","Trust evidence available"],"agentCard":{"name":"Git Commit Helper Pro","description":"Git助手 - 自动生成提交信息/查看状�?分支管理/diff分析，基于Conventional Commits规范","source":"CLAWHUB","sourceId":"clawhub:s170k9770tgh0506hw0dwtb6pd83kwyq:laosi-git-commit-helper","homepage":"https://clawhub.ai/534422530/skills/laosi-git-commit-helper","repository":"https://clawhub.ai/534422530/laosi-git-commit-helper","documentation":"https://www.xpersona.co/agent/clawhub-534422530-laosi-git-commit-helper","protocols":["OPENCLEW"],"examples":[{"kind":"example","language":"python","snippet":"import subprocess, os, json\nfrom datetime import datetime\nfrom typing import Optional, List, Dict\n\nclass GitHelper:\n    def __init__(self, repo_path: str = None):\n        self.repo_path = repo_path or os.getcwd()\n    \n    def _run(self, cmd: List[str], timeout: int = 10) -> dict:\n        \"\"\"执行git命令\"\"\"\n        try:\n            result = subprocess.run(\n                cmd, capture_output=True, text=True,\n                timeout=timeout, cwd=self.repo_path\n            )\n            return {\n                \"success\": result.returncode == 0,\n                \"stdout\": result.stdout.strip(),\n                \"stderr\": result.stderr.strip(),\n            }\n        except FileNotFoundError:\n            return {\"success\": False, \"error\": \"git not found\"}\n        except subprocess.TimeoutExpired:\n            return {\"success\": False, \"error\": \"timeout\"}\n    \n    def status(self) -> dict:\n        \"\"\"查看仓库状�?\"\"\n        result = self._run([\"git\", \"status\", \"--short\"])\n        if not result[\"success\"]:\n            return result\n        \n        files = result[\"stdout\"].split(\"\\n\") if result[\"stdout\"] else []\n        staged = [f[2:] for f in files if f.startswith(\"M \") or f.startswith(\"A \")]\n        modified = [f[3:] for f in files if f.startswith(\" M\")]\n        untracked = [f[3:] for f in files if f.startswith(\"??\")]\n        \n        return {\n            \"success\": True,\n            \"staged\": staged,\n            \"modified\": modified,\n            \"untracked\": untracked,\n            \"total_changes\": len(files),\n        }\n    \n    def diff(self, staged: bool = False) -> dict:\n        \"\"\"查看变更详情\"\"\"\n        cmd = [\"git\", \"diff\", \"--stat\"]\n        if staged:\n            cmd.append(\"--staged\")\n        result = self._run(cmd)\n        if not result[\"success\"]:\n            return result\n        \n        lines = result[\"stdout\"].split(\"\\n\") if result[\"stdout\"] else []\n        stats = []\n        for line in lines[:-1]:  # 最后一行是汇�?            if \"|\" in line:\n                parts = line.split(\"|\""},{"kind":"example","language":"text","snippet":"<type>[optional scope]: <description>\n\n[optional body]\n\n[optional footer]"}]}}