{"id":"dd0fe0fd-0019-408c-8f5f-30e0c8bf0173","entityType":"agent","slug":"clawhub-534422530-laosi-git-commit-helper","name":"Git Commit Helper Pro","canonicalUrl":"https://www.xpersona.co/agent/clawhub-534422530-laosi-git-commit-helper","canonicalPath":"/agent/clawhub-534422530-laosi-git-commit-helper","generatedAt":"2026-10-12T09:09:06.097Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-11T19:40:18.468Z","emptyReason":null},"description":"Git助手 - 自动生成提交信息/查看状�?分支管理/diff分析，基于Conventional Commits规范 Skill: Git Commit Helper Pro Owner: 534422530 Summary: Git助手 - 自动生成提交信息/查看状�?分支管理/diff分析，基于Conventional Commits规范 Tags: commit:2.0.0, development:1.0.0, git:2.0.0, latest:2.0.0, pro:2.0.0, version-control:2.0.0 Version history: v2.0.0 | 2026-05-29T23:31:39.896Z | auto Version 2.0.0 adds premium badge and hub.json, updates documentation. - Added premium badge and new metadata in SKILL.md. - Introduced hub.json for imp","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s170k9770tgh0506hw0dwtb6pd83kwyq:laosi-git-commit-helper","sourceUrl":"https://clawhub.ai/534422530/laosi-git-commit-helper","homepage":"https://clawhub.ai/534422530/skills/laosi-git-commit-helper","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/534422530/laosi-git-commit-helper","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/534422530/skills/laosi-git-commit-helper","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Git助手 - 自动生成提交信息/查看状�?分支管理/diff分析，基于Conventional Commits规范 Skill: Git Commit Helper Pro Owner: 534422530 Summary: Git助手 - 自动生成提交信息/查看状�?分支管理/diff分析，基于Convention"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T19:40:18.468Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T19:40:18.468Z","emptyReason":null},"stars":null,"forks":null,"downloads":1002,"likes":null,"task":null,"library":null,"packageName":null,"latestVersion":"2.0.0","tractionLabel":"1K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T19:40:18.399Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T19:40:18.468Z","lastCrawledAt":"2026-10-11T19:40:18.399Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T19:40:18.399Z","lastVerifiedAt":null,"highlights":[{"version":"2.0.0","createdAt":"2026-05-29T23:31:39.896Z","changelog":"Version 2.0.0 adds premium badge and hub.json, updates documentation. - Added premium badge and new metadata in SKILL.md. - Introduced hub.json for improved distribution. - Updated skill version number to 2.0.0. - Made minor text and formatting changes in documentation.","fileCount":4,"zipByteSize":4538},{"version":"1.0.0","createdAt":"2026-05-29T01:26:46.641Z","changelog":"Initial release of git-commit-helper. - Automatically generates Conventional Commits style commit messages based on file changes. - Provides quick git status overview, including staged, modified, and untracked files. - Supports branch management: listing, creating, and switching branches. - Analyzes diffs with file-level change statistics. - Shows recent commit history with author and date. - Built in Python; requires Python 3.8+ and git CLI.","fileCount":3,"zipByteSize":4129}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s170k9770tgh0506hw0dwtb6pd83kwyq:laosi-git-commit-helper","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-git-commit-helper/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-git-commit-helper/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-git-commit-helper/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-git-commit-helper/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-git-commit-helper/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-git-commit-helper/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-12T09:09:06.097Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-git-commit-helper/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-git-commit-helper/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-git-commit-helper/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-git-commit-helper/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-11T19:40:18.468Z","emptyReason":null},"readme":"Skill: Git Commit Helper Pro\n\nOwner: 534422530\n\nSummary: Git助手 - 自动生成提交信息/查看状�?分支管理/diff分析，基于Conventional Commits规范\n\nTags: commit:2.0.0, development:1.0.0, git:2.0.0, latest:2.0.0, pro:2.0.0, version-control:2.0.0\n\nVersion history:\n\nv2.0.0 | 2026-05-29T23:31:39.896Z | auto\n\nVersion 2.0.0 adds premium badge and hub.json, updates documentation.\n\n- Added premium badge and new metadata in SKILL.md.\n- Introduced hub.json for improved distribution.\n- Updated skill version number to 2.0.0.\n- Made minor text and formatting changes in documentation.\n\nv1.0.0 | 2026-05-29T01:26:46.641Z | auto\n\nInitial release of git-commit-helper.\n\n- Automatically generates Conventional Commits style commit messages based on file changes.\n- Provides quick git status overview, including staged, modified, and untracked files.\n- Supports branch management: listing, creating, and switching branches.\n- Analyzes diffs with file-level change statistics.\n- Shows recent commit history with author and date.\n- Built in Python; requires Python 3.8+ and git CLI.\n\nArchive index:\n\nArchive v2.0.0: 4 files, 4538 bytes\n\nFiles: hub.json (565b), skill-card.md (1757b), SKILL.md (7682b), _meta.json (142b)\n\nFile v2.0.0:SKILL.md\n\n---\nbadge: premium\nname: git-commit-helper\nversion: 2.0.0\ndescription: Git助手 - 自动生成提交信息/查看状�?分支管理/diff分析，基于Conventional Commits规范\ntags: [git, commit, version-control, development, automation]\nauthor: laosi\nsource: original\n---\n\n# Git Commit Helper - Git操作助手\n\n> 激活词: git / 提交 / commit / 分支\n\n## 功能\n\n- 自动生成Conventional Commits格式的提交信�?- 查看Git状态和变更摘要\n- 分支管理（创�?切换/列出�?- Diff分析（变更统计）\n- 提交历史查看\n\n## Python 实现\n\n```python\nimport 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(\"|\")\n                stats.append({\n                    \"file\": parts[0].strip(),\n                    \"changes\": parts[1].strip()\n                })\n        \n        summary = lines[-1] if lines else \"\"\n        return {\"success\": True, \"files\": stats, \"summary\": summary}\n    \n    def generate_commit_message(self) -> str:\n        \"\"\"根据变更自动生成提交信息\"\"\"\n        status = self.status()\n        if not status[\"success\"]:\n            return \"fix: update files\"\n        \n        staged = status.get(\"staged\", [])\n        modified = status.get(\"modified\", [])\n        untracked = status.get(\"untracked\", [])\n        \n        all_files = staged + modified + untracked\n        \n        if not all_files:\n            return \"chore: no changes\"\n        \n        # 分析文件类型\n        py_files = [f for f in all_files if f.endswith(\".py\")]\n        js_files = [f for f in all_files if f.endswith((\".js\", \".ts\", \".jsx\", \".tsx\"))]\n        md_files = [f for f in all_files if f.endswith(\".md\")]\n        test_files = [f for f in all_files if \"test\" in f.lower()]\n        \n        # 判断类型\n        if test_files:\n            prefix = \"test\"\n        elif py_files or js_files:\n            prefix = \"feat\"\n        elif md_files:\n            prefix = \"docs\"\n        elif len(all_files) > 5:\n            prefix = \"refactor\"\n        else:\n            prefix = \"fix\"\n        \n        # 生成描述\n        if len(all_files) == 1:\n            desc = os.path.basename(all_files[0])\n        elif len(all_files) <= 3:\n            desc = \", \".join(os.path.basename(f) for f in all_files)\n        else:\n            desc = f\"{len(all_files)} files\"\n        \n        return f\"{prefix}: update {desc}\"\n    \n    def branches(self) -> dict:\n        \"\"\"列出分支\"\"\"\n        current = self._run([\"git\", \"branch\", \"--show-current\"])\n        all_branches = self._run([\"git\", \"branch\", \"-a\"])\n        \n        branches = []\n        if all_branches[\"success\"]:\n            for line in all_branches[\"stdout\"].split(\"\\n\"):\n                line = line.strip()\n                if line.startswith(\"* \"):\n                    branches.append({\"name\": line[2:], \"current\": True})\n                elif line:\n                    branches.append({\"name\": line, \"current\": False})\n        \n        return {\n            \"current\": current.get(\"stdout\", \"\"),\n            \"branches\": branches,\n        }\n    \n    def log(self, limit: int = 5) -> List[dict]:\n        \"\"\"查看提交历史\"\"\"\n        result = self._run([\n            \"git\", \"log\", f\"--oneline\", f\"-{limit}\",\n            \"--format=%H|%s|%an|%ai\"\n        ])\n        if not result[\"success\"]:\n            return []\n        \n        commits = []\n        for line in result[\"stdout\"].split(\"\\n\"):\n            if \"|\" in line:\n                parts = line.split(\"|\", 3)\n                if len(parts) >= 4:\n                    commits.append({\n                        \"hash\": parts[0][:8],\n                        \"message\": parts[1],\n                        \"author\": parts[2],\n                        \"date\": parts[3][:10],\n                    })\n        return commits\n    \n    def commit(self, message: str = None) -> dict:\n        \"\"\"提交变更\"\"\"\n        if not message:\n            message = self.generate_commit_message()\n        \n        # Stage all\n        self._run([\"git\", \"add\", \"-A\"])\n        # Commit\n        result = self._run([\"git\", \"commit\", \"-m\", message])\n        return {\n            \"success\": result[\"success\"],\n            \"message\": message,\n            \"output\": result.get(\"stdout\", \"\"),\n        }\n\n# 使用示例\ngit = GitHelper()\n\n# 查看状�?status = git.status()\nprint(f\"变更: {status.get('total_changes', 0)} 个文�?)\nprint(f\"  已暂�? {len(status.get('staged', []))}\")\nprint(f\"  已修�? {len(status.get('modified', []))}\")\nprint(f\"  未追�? {len(status.get('untracked', []))}\")\n\n# 自动生成提交信息\nmsg = git.generate_commit_message()\nprint(f\"\\n建议提交信息: {msg}\")\n\n# 查看分支\nbranches = git.branches()\nprint(f\"\\n当前分支: {branches['current']}\")\nprint(f\"所有分�? {[b['name'] for b in branches['branches'][:5]]}\")\n\n# 查看最近提�?commits = git.log(3)\nprint(f\"\\n最近提�?\")\nfor c in commits:\n    print(f\"  {c['hash']} {c['message']} ({c['date']})\")\n```\n\n## Conventional Commits规范\n\n```\n<type>[optional scope]: <description>\n\n[optional body]\n\n[optional footer]\n```\n\n| 类型 | 说明 | 示例 |\n|------|------|------|\n| feat | 新功�?| feat(auth): add OAuth2 login |\n| fix | 修复bug | fix(api): handle null response |\n| docs | 文档更新 | docs: update README |\n| style | 格式调整 | style: format code with black |\n| refactor | 重构 | refactor(db): simplify queries |\n| test | 测试 | test: add unit tests for User |\n| chore | 杂项 | chore: update dependencies |\n\n## 使用场景\n\n1. **日常提交**: 自动生成规范的提交信�?2. **代码审查**: 快速查看变更摘�?3. **分支管理**: 列出和切换分�?4. **历史追溯**: 查看提交历史和作�?\n## 依赖\n\n- Python 3.8+\n- git（命令行工具�?\n\nFile v2.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn71pk44ca87scz3pstt90r66n80xhaa\",\n  \"slug\": \"laosi-git-commit-helper\",\n  \"version\": \"2.0.0\",\n  \"publishedAt\": 1780097499896\n}\n\nFile v2.0.0:skill-card.md\n\n## Description:\n\nGit Commit Helper Pro helps agents generate Conventional Commits messages, inspect repository status and diffs, list branches, view recent history, and create commits.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[534422530](https://clawhub.ai/user/534422530)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and software engineering agents use this skill to summarize Git changes, generate conventional commit messages, inspect branches and history, and automate simple commit workflows.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The commit helper can stage every changed, deleted, and untracked file before committing, which may include secrets or unrelated work.\n\nMitigation: Review git status, git diff, and the staged file list before using commit automation; avoid running it in repositories with sensitive or unrelated changes.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/534422530/skills/laosi-git-commit-helper)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, code, shell commands, guidance]\n\n**Output Format:** [Markdown or plain text with optional Python code examples and Git command output summaries]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May propose or execute Git commit workflows depending on the hosting agent's tool permissions.]\n\n## Skill Version(s):\n\n2.0.0 (source: release evidence, SKILL.md frontmatter, hub.json)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v2.0.0:hub.json\n\n{\r\n    \"description\":  \"Premium version with full implementation, examples, and enterprise support\",\r\n    \"minOpenClawVersion\":  \"1.2.0\",\r\n    \"version\":  \"2.0.0\",\r\n    \"tags\":  [\r\n                 \"git\",\r\n                 \"commit\",\r\n                 \"version-control\",\r\n                 \"pro\"\r\n             ],\r\n    \"author\":  \"laosi\",\r\n    \"name\":  \"git-commit-helper\",\r\n    \"pricing\":  {\r\n                    \"price\":  1500,\r\n                    \"model\":  \"one-time\"\r\n                },\r\n    \"license\":  \"MIT\",\r\n    \"displayName\":  \"Git Commit Helper Pro\"\r\n}\n\nArchive v1.0.0: 3 files, 4129 bytes\n\nFiles: skill-card.md (1899b), SKILL.md (7687b), _meta.json (142b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: git-commit-helper\nversion: 1.0.0\ndescription: Git助手 - 自动生成提交信息/查看状态/分支管理/diff分析，基于Conventional Commits规范\ntags: [git, commit, version-control, development, automation]\nauthor: laosi\nsource: original\n---\n\n# Git Commit Helper - Git操作助手\n\n> 激活词: git / 提交 / commit / 分支\n\n## 功能\n\n- 自动生成Conventional Commits格式的提交信息\n- 查看Git状态和变更摘要\n- 分支管理（创建/切换/列出）\n- Diff分析（变更统计）\n- 提交历史查看\n\n## Python 实现\n\n```python\nimport 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]:  # 最后一行是汇总\n            if \"|\" in line:\n                parts = line.split(\"|\")\n                stats.append({\n                    \"file\": parts[0].strip(),\n                    \"changes\": parts[1].strip()\n                })\n        \n        summary = lines[-1] if lines else \"\"\n        return {\"success\": True, \"files\": stats, \"summary\": summary}\n    \n    def generate_commit_message(self) -> str:\n        \"\"\"根据变更自动生成提交信息\"\"\"\n        status = self.status()\n        if not status[\"success\"]:\n            return \"fix: update files\"\n        \n        staged = status.get(\"staged\", [])\n        modified = status.get(\"modified\", [])\n        untracked = status.get(\"untracked\", [])\n        \n        all_files = staged + modified + untracked\n        \n        if not all_files:\n            return \"chore: no changes\"\n        \n        # 分析文件类型\n        py_files = [f for f in all_files if f.endswith(\".py\")]\n        js_files = [f for f in all_files if f.endswith((\".js\", \".ts\", \".jsx\", \".tsx\"))]\n        md_files = [f for f in all_files if f.endswith(\".md\")]\n        test_files = [f for f in all_files if \"test\" in f.lower()]\n        \n        # 判断类型\n        if test_files:\n            prefix = \"test\"\n        elif py_files or js_files:\n            prefix = \"feat\"\n        elif md_files:\n            prefix = \"docs\"\n        elif len(all_files) > 5:\n            prefix = \"refactor\"\n        else:\n            prefix = \"fix\"\n        \n        # 生成描述\n        if len(all_files) == 1:\n            desc = os.path.basename(all_files[0])\n        elif len(all_files) <= 3:\n            desc = \", \".join(os.path.basename(f) for f in all_files)\n        else:\n            desc = f\"{len(all_files)} files\"\n        \n        return f\"{prefix}: update {desc}\"\n    \n    def branches(self) -> dict:\n        \"\"\"列出分支\"\"\"\n        current = self._run([\"git\", \"branch\", \"--show-current\"])\n        all_branches = self._run([\"git\", \"branch\", \"-a\"])\n        \n        branches = []\n        if all_branches[\"success\"]:\n            for line in all_branches[\"stdout\"].split(\"\\n\"):\n                line = line.strip()\n                if line.startswith(\"* \"):\n                    branches.append({\"name\": line[2:], \"current\": True})\n                elif line:\n                    branches.append({\"name\": line, \"current\": False})\n        \n        return {\n            \"current\": current.get(\"stdout\", \"\"),\n            \"branches\": branches,\n        }\n    \n    def log(self, limit: int = 5) -> List[dict]:\n        \"\"\"查看提交历史\"\"\"\n        result = self._run([\n            \"git\", \"log\", f\"--oneline\", f\"-{limit}\",\n            \"--format=%H|%s|%an|%ai\"\n        ])\n        if not result[\"success\"]:\n            return []\n        \n        commits = []\n        for line in result[\"stdout\"].split(\"\\n\"):\n            if \"|\" in line:\n                parts = line.split(\"|\", 3)\n                if len(parts) >= 4:\n                    commits.append({\n                        \"hash\": parts[0][:8],\n                        \"message\": parts[1],\n                        \"author\": parts[2],\n                        \"date\": parts[3][:10],\n                    })\n        return commits\n    \n    def commit(self, message: str = None) -> dict:\n        \"\"\"提交变更\"\"\"\n        if not message:\n            message = self.generate_commit_message()\n        \n        # Stage all\n        self._run([\"git\", \"add\", \"-A\"])\n        # Commit\n        result = self._run([\"git\", \"commit\", \"-m\", message])\n        return {\n            \"success\": result[\"success\"],\n            \"message\": message,\n            \"output\": result.get(\"stdout\", \"\"),\n        }\n\n# 使用示例\ngit = GitHelper()\n\n# 查看状态\nstatus = git.status()\nprint(f\"变更: {status.get('total_changes', 0)} 个文件\")\nprint(f\"  已暂存: {len(status.get('staged', []))}\")\nprint(f\"  已修改: {len(status.get('modified', []))}\")\nprint(f\"  未追踪: {len(status.get('untracked', []))}\")\n\n# 自动生成提交信息\nmsg = git.generate_commit_message()\nprint(f\"\\n建议提交信息: {msg}\")\n\n# 查看分支\nbranches = git.branches()\nprint(f\"\\n当前分支: {branches['current']}\")\nprint(f\"所有分支: {[b['name'] for b in branches['branches'][:5]]}\")\n\n# 查看最近提交\ncommits = git.log(3)\nprint(f\"\\n最近提交:\")\nfor c in commits:\n    print(f\"  {c['hash']} {c['message']} ({c['date']})\")\n```\n\n## Conventional Commits规范\n\n```\n<type>[optional scope]: <description>\n\n[optional body]\n\n[optional footer]\n```\n\n| 类型 | 说明 | 示例 |\n|------|------|------|\n| feat | 新功能 | feat(auth): add OAuth2 login |\n| fix | 修复bug | fix(api): handle null response |\n| docs | 文档更新 | docs: update README |\n| style | 格式调整 | style: format code with black |\n| refactor | 重构 | refactor(db): simplify queries |\n| test | 测试 | test: add unit tests for User |\n| chore | 杂项 | chore: update dependencies |\n\n## 使用场景\n\n1. **日常提交**: 自动生成规范的提交信息\n2. **代码审查**: 快速查看变更摘要\n3. **分支管理**: 列出和切换分支\n4. **历史追溯**: 查看提交历史和作者\n\n## 依赖\n\n- Python 3.8+\n- git（命令行工具）\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn71pk44ca87scz3pstt90r66n80xhaa\",\n  \"slug\": \"laosi-git-commit-helper\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1780018006641\n}\n\nFile v1.0.0:skill-card.md\n\n## Description: <br>\nGit Commit Helper Pro helps agents generate Conventional Commits messages, summarize Git status and diffs, manage branches, and inspect recent commit history. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[534422530](https://clawhub.ai/user/534422530) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and engineering agents use this skill to review repository changes, generate conventional commit messages, inspect diffs, manage branches, and view recent Git history during normal development workflows. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The helper may stage all repository changes before committing, including unrelated work or sensitive files. <br>\nMitigation: Review git status and the staged diff before committing, avoid repositories with secrets or unrelated local work, and prefer explicit file selection or staged-only commits. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/534422530/laosi-git-commit-helper) <br>\n- [ClawHub Publisher Profile](https://clawhub.ai/user/534422530) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, Code, Shell commands, Guidance] <br>\n**Output Format:** [Markdown and plain text with Git command guidance and Python code examples] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May propose commit messages and Git workflow actions based on repository state.] <br>\n\n## Skill Version(s): <br>\n1.0.0 (source: frontmatter and server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>","readmeExcerpt":"Skill: Git Commit Helper Pro Owner: 534422530 Summary: Git助手 - 自动生成提交信息/查看状�?分支管理/diff分析，基于Conventional Commits规范 Tags: commit:2.0.0, development:1.0.0, git:2.0.0, latest:2.0.0, pro:2.0.0, version-control:2.0.0 Version history: v2.0.0 | 2026-05-29T23:31:39.896Z | auto Version 2.0.0 adds premium badge and hub.json, updates documentation. - Added premium badge and new metadata in SKILL.md. - Introduced hub.json for imp","codeSnippets":[],"executableExamples":[{"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(\"|\""},{"language":"text","snippet":"<type>[optional scope]: <description>\n\n[optional body]\n\n[optional footer]"},{"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]:  # 最后一行是汇总\n            if \"|\" in line:\n                parts = line.split(\"|\""},{"language":"text","snippet":"<type>[optional scope]: <description>\n\n[optional body]\n\n[optional footer]"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nbadge: premium\nname: git-commit-helper\nversion: 2.0.0\ndescription: Git助手 - 自动生成提交信息/查看状�?分支管理/diff分析，基于Conventional Commits规范\ntags: [git, commit, version-control, development, automation]\nauthor: laosi\nsource: original\n---\n\n# Git Commit Helper - Git操作助手\n\n> 激活词: git / 提交 / commit / 分支\n\n## 功能\n\n- 自动生成Conventional Commits格式的提交信�?- 查看Git状态和变更摘要\n- 分支管理（创�?切换/列出�?- Diff分析（变更统计）\n- 提交历史查看\n\n## Python 实现\n\n```python\nimport 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(\"|\")\n                stats.append({\n                    \"file\": parts[0].strip(),\n                    \"changes\": parts[1].strip()\n                })\n        \n        summary = lines[-1] if lines else \"\"\n        return {\"success\": True, \"files\": stats, \"summary\": summary}\n    \n    def generate_commit_message(self) -> str:\n        \"\"\"根据变更自动生成提交信息\"\"\"\n        status = self.status()\n        if not status[\"success\"]:\n            return \"fix: update files\"\n        \n        staged = status.get(\"staged\", [])\n        modified = status.get(\"modified\", [])\n        untracked = status.get(\"untracke"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn71pk44ca87scz3pstt90r66n80xhaa\",\n  \"slug\": \"laosi-git-commit-helper\",\n  \"version\": \"2.0.0\",\n  \"publishedAt\": 1780097499896\n}"},{"path":"skill-card.md","content":"## Description:\n\nGit Commit Helper Pro helps agents generate Conventional Commits messages, inspect repository status and diffs, list branches, view recent history, and create commits.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[534422530](https://clawhub.ai/user/534422530)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and software engineering agents use this skill to summarize Git changes, generate conventional commit messages, inspect branches and history, and automate simple commit workflows.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The commit helper can stage every changed, deleted, and untracked file before committing, which may include secrets or unrelated work.\n\nMitigation: Review git status, git diff, and the staged file list before using commit automation; avoid running it in repositories with sensitive or unrelated changes.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/534422530/skills/laosi-git-commit-helper)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, code, shell commands, guidance]\n\n**Output Format:** [Markdown or plain text with optional Python code examples and Git command output summaries]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May propose or execute Git commit workflows depending on the hosting agent's tool permissions.]\n\n## Skill Version(s):\n\n2.0.0 (source: release evidence, SKILL.md frontmatter, hub.json)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."},{"path":"hub.json","content":"{\r\n    \"description\":  \"Premium version with full implementation, examples, and enterprise support\",\r\n    \"minOpenClawVersion\":  \"1.2.0\",\r\n    \"version\":  \"2.0.0\",\r\n    \"tags\":  [\r\n                 \"git\",\r\n                 \"commit\",\r\n                 \"version-control\",\r\n                 \"pro\"\r\n             ],\r\n    \"author\":  \"laosi\",\r\n    \"name\":  \"git-commit-helper\",\r\n    \"pricing\":  {\r\n                    \"price\":  1500,\r\n                    \"model\":  \"one-time\"\r\n                },\r\n    \"license\":  \"MIT\",\r\n    \"displayName\":  \"Git Commit Helper Pro\"\r\n}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Git助手 - 自动生成提交信息/查看状�?分支管理/diff分析，基于Conventional Commits规范 Skill: Git Commit Helper Pro Owner: 534422530 Summary: Git助手 - 自动生成提交信息/查看状�?分支管理/diff分析，基于Conventional Commits规范 Tags: commit:2.0.0, development:1.0.0, git:2.0.0, latest:2.0.0, pro:2.0.0, version-control:2.0.0 Version history: v2.0.0 | 2026-05-29T23:31:39.896Z | auto Version 2.0.0 adds premium badge and hub.json, updates documentation. - Added premium badge and new metadata in SKILL.md. - Introduced hub.json for imp","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1017,"uniquenessScore":49,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T19:40:18.468Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T19:40:18.468Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-12T09:09:06.097Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}