← 返回 Skills 市场
drumrobot

Git Repo

作者 es6kr · GitHub ↗ · v0.1.2 · MIT-0
cross-platform ⚠ suspicious
138
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install git-repo
功能描述
Git repository and SourceGit integration management. clone - ghq get with automatic SourceGit registration [clone.md], fix-worktree - bare repo worktree conf...
使用说明 (SKILL.md)

Git Repo

Git repository management and SourceGit GUI client integration.

Topics

Topic Description Guide
clone ghq get with automatic SourceGit registration (multi-account support) clone.md
fix-worktree bare repo worktree configuration recovery fix-worktree.md
merge-duplicate merge duplicate repositories with the same origin merge-duplicate.md
migrate migrate regular Git repositories to ghq directory structure migrate.md
patrol batch inspection of ghq repositories (status, stash, unpushed + commit-splitter integration) patrol.md
sourcegit SourceGit preference.json management (add repos, workspaces, folder rename) sourcegit.md

Quick Reference

ghq Clone (automatic SourceGit registration)

When ghq get \x3Curl> is executed, the following happens automatically:

  1. Clone the repository
  2. Register in SourceGit (under the appropriate group)
  3. Auto-create the group if it doesn't exist

Proceeds automatically without user confirmation

Detailed guide

SourceGit Management

Directly edit the SourceGit GUI client's configuration file to add repositories, create workspaces, rename folders, etc.

Key features:

  • Add/remove repositories
  • Create workspaces
  • Sync ghq repositories
  • Update paths on folder rename

Detailed guide

ghq Migration

Migrate regular Git repositories to ghq directory structure (~/ghq/host/group/repo/).

Key features:

  • Automatic bare+worktree structure conversion
  • Create symbolic links at original location
  • Nested group support (host/group/subgroup/repo)

Detailed guide

Repo Patrol (batch inspection)

Batch inspect and clean up the status of repositories under ghq.

Key features:

  • Parallel collection of status, stash, unpushed for all repositories
  • Status-based processing (commit-splitter integration, stash pop, push)
  • Optional fetch all at the end

Detailed guide

Common Workflow

  1. Repository migration: Migrate to ghq structure with migrate topic
  2. SourceGit update: Register new paths with sourcegit topic
  3. Batch inspection: Clean up uncommitted/unpushed changes with patrol topic

Scripts

  • ./scripts/repo-to-ghq.sh - Script to move repositories to ghq path
安全使用建议
This skill appears to implement the git and SourceGit workflows it describes, but there are several things to consider before installing: 1) Required tools are not declared: verify that ghq, git, gh (GitHub CLI), python3, and pgrep exist on your system — the scripts expect them. 2) Credential handling: the clone guide suggests embedding GH_TOKEN in an HTTPS URL for cloning; avoid exposing tokens on the command line (process lists, shell history). Prefer using credential helpers or manual authenticated gh/ssh flows. 3) Back up SourceGit preference.json and any repositories before using automated registration/migration. The skill will edit preference.json and move .git metadata (these are sensitive operations). 4) Confirm interactive safeguards: the docs are inconsistent about whether some operations run without confirmation. If you plan to let the agent invoke this skill autonomously, ensure AskUserQuestion prompts are enforced for operations that move/delete files or change config. 5) Review the included scripts (repo-to-ghq.sh and git-fix-worktree.sh) yourself or run them in a controlled test environment first. If you cannot validate prompts and credential handling, prefer manual execution of these workflows instead of allowing autonomous invocation.
功能分析
Type: OpenClaw Skill Name: git-repo Version: 0.1.2 The git-repo skill bundle provides advanced Git management and SourceGit integration, but it includes high-risk instructions that bypass user confirmation for automated tasks. Specifically, clone.md contains instructions to retrieve GitHub tokens using 'gh auth token' and perform clones 'automatically without user confirmation,' while sourcegit.md directs the agent to directly modify the SourceGit 'preference.json' configuration file. While these capabilities (and the associated scripts like repo-to-ghq.sh and git-fix-worktree.sh) are aligned with the stated purpose of repository management, the combination of token access and automated execution without oversight presents a significant attack surface for prompt injection.
能力评估
Purpose & Capability
The skill claims to manage git repos and SourceGit integration, which is consistent with the included documentation and scripts. However, the metadata declares no required binaries or environment variables while the instructions and scripts clearly rely on tools such as ghq, git, gh, pgrep, and python3 (and optionally GH_TOKEN). The absence of these declared requirements is an incoherence: an agent or user may not be warned that these tools/credentials are needed before the skill runs.
Instruction Scope
Runtime instructions and scripts perform high-impact local operations: editing SourceGit's preference.json, moving repositories with mv, creating symlinks, modifying .git metadata, rebuilding indexes, and (in workflows) removing .git directories or using rm -rf only after verification. The clone workflow also instructs temporarily embedding GH_TOKEN in a clone URL (credential in command line). The SKILL.md states that ghq+SourceGit registration 'proceeds automatically without user confirmation' in at least one place, but many other places require AskUserQuestion — this inconsistency is important because some operations can be destructive or expose credentials if executed without explicit user confirmation.
Install Mechanism
This is an instruction-only skill with bundled shell scripts and no install steps or remote downloads. There is no package install mechanism or network-downloaded code, so installation risk is low. The included scripts will be written to disk when the skill bundle is installed, which is normal for instruction-with-scripts packages.
Credentials
requires.env is empty, but the docs explicitly reference GH_TOKEN and commands like `gh auth token` and embedding tokens directly in https clone URLs. That exposes a credential handling mismatch: the skill uses sensitive data (GitHub tokens) but does not declare them as required nor explain safe handling. It also reads/writes files under the user's home (SourceGit preference.json, ghq and work directories) — appropriate for its purpose but sensitive. Overall the credential usage is proportionate to repo management, but the lack of explicit declaration and the recommendation to place tokens in clone URLs are concerning for credential exposure.
Persistence & Privilege
always:false and normal autonomous invocation defaults are used (agent may invoke the skill autonomously). The skill edits user files (preference.json) and moves filesystem data, which is powerful but expected for a repo-management tool. The combination of potential automatic behavior (the docs' 'proceeds automatically' statement) with autonomous invocation increases risk — verify agent prompts/AskUserQuestion behavior before allowing autonomous runs. The skill does not request persistent system-wide privileges or modify other skills' settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install git-repo
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /git-repo 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.2
Add fix-worktree topic for bare repo worktree configuration recovery
v0.1.1
Bump metadata version to 0.1.1
v0.1.0
Initial release: clone, fix-worktree, merge-duplicate, migrate, patrol, sourcegit
元数据
Slug git-repo
版本 0.1.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

Git Repo 是什么?

Git repository and SourceGit integration management. clone - ghq get with automatic SourceGit registration [clone.md], fix-worktree - bare repo worktree conf... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 138 次。

如何安装 Git Repo?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install git-repo」即可一键安装,无需额外配置。

Git Repo 是免费的吗?

是的,Git Repo 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Git Repo 支持哪些平台?

Git Repo 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Git Repo?

由 es6kr(@drumrobot)开发并维护,当前版本 v0.1.2。

💬 留言讨论