Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计提醒

gitlab-batch-clonerGitLab batch cloner 搜索

Agent Skill

用于围绕 GitLab 项目、Merge Request、Issue、分支、流水线和代码审查流程提供辅助能力。它适合让 Agent 查询项目状态、整理提交差异、辅助检查合并请求或汇总 CI 结果。使用时需要确认项目权限、访问 token 和目标分支范围;涉及合并、推送、改工单或触发流水线时,应先预览影响并核对团队流程。

总安装

8,054

周安装

329

GitHub Stars

公开资料未说明

下载量

2,579
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install gitlab-batch-cloner

简介

批量克隆 GitLab 组项目,支持分支检出与 Excel 索引管理。

  • 适用于需要从 GitLab 组快速获取所有项目副本的场景。
  • 通过命令行工具按组组织项目克隆任务,自动处理分支和索引。
  • 需配置访问 token 并确认项目权限,避免误操作影响现有代码库。
  • gitlab-batch-cloner 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
pf-clone-gitlab
description
Batch clone GitLab group projects with branch checkout and Excel indexing. Use when user needs to clone all projects from a GitLab group, organize by group structure, checkout multiple branches (master/default + latest + release/prod), and generate an Excel index file with project metadata and branch information.

Clone GitLab Skill

Batch clone all projects from GitLab group(s), maintain folder hierarchy, checkout key branches, and generate an Excel index.

When to Use

  • User wants to batch clone all projects from one or more GitLab top-level groups
  • Need to maintain original group/subgroup folder hierarchy locally
  • Need to checkout multiple branches (default + latest active + release/prod)
  • Need an Excel index file (01.Index.xlsx) with per-group sheets

Requirements

Before starting, collect from user:

ParameterRequiredDefaultNotes
GitLab URLe.g. https://gitlab.company.com
Personal Access TokenNeeds read_api + read_repository scopes
Target Group(s)Group/sub-group/project paths, comma-separated. Supports: top-level group (myGroup), sub-group path (myGroup/mySubGroup), or direct project path (myGroup/mySubGroup/my-project)
Local Storage Path~/Desktop/CodeWhere repos are stored
Auth MethodHTTPS+TokenOr SSH if key is configured
Modecloneclone (default), update (pull only), or sync (clone+pull+cleanup stale Excel rows)
Workers4Parallel clone workers (GITLAB_WORKERS)
Total Timeout0 (none)Global timeout in seconds (GITLAB_TOTAL_TIMEOUT). 0=no limit

Workflow

Step 1: Collect Input

Ask user for the 4 parameters above. Pass them as environment variables to the script:

GITLAB_URL, GITLAB_TOKEN, GITLAB_GROUPS (comma-separated), GITLAB_BASE_DIR

Step 2: Run the Script

cd <skill-dir>/scripts
python3 clone_and_index.py

The script handles everything:

  1. Resolves each input path — auto-detects if it's a top-level group, sub-group, or direct project
  2. For top-level groups: fetches all subgroups recursively (skips if access denied)
  3. For sub-group paths (e.g. myGroup/mySubGroup): directly resolves and syncs that sub-group and its descendants only
  4. For direct project paths: syncs only that specific project
  5. Clones new projects / pulls existing ones (with 5-min timeout per project)
  6. Uses multiprocessing for parallel clone/pull (process-group kill on timeout to prevent orphan git processes)
  7. Checks out branches: default + latest active + release/prod
  8. Incrementally updates 01.Index.xlsx every 50 projects (so partial results survive crashes)
  9. On SIGTERM/SIGINT, emergency-flushes pending results to Excel before exit
  10. Prints per-group project counts during discovery and real-time progress with elapsed time
  11. In sync mode, the final Excel write removes rows for deleted/archived projects and handles cross-group migrations

Step 3: Report Results

After the script finishes, report:

  • Total projects cloned/updated
  • Any failed/timed-out projects (the script prints a summary table)

Modes

Update Only

If projects already exist and user just wants to update:

GITLAB_MODE=update python3 clone_and_index.py

This skips clone, only does git fetch --all && git pull on existing repos, re-checkouts branches, and refreshes the Excel.

Sync (Full Sync with Cleanup)

For a complete sync that also cleans up stale data in the Excel:

GITLAB_MODE=sync python3 clone_and_index.py

This behaves like clone mode (new repos are cloned, existing ones are pulled), but additionally:

  • Removes Excel rows for projects that no longer exist on GitLab (deleted/archived)
  • Handles projects that moved between groups (updates path, removes old row)
  • Only cleans up sheets belonging to the groups specified in GITLAB_GROUPS (won't touch other groups' data)

Excel Specification

File: 01.Index.xlsx inside <local-path>/ (e.g. ~/Desktop/Code/01.Index.xlsx)

Sheets: One sheet per top-level group (sheet name = group name, e.g. "myGroup")

Columns:

ColFieldContent
A主Group名称Top-level group (e.g. myGroup)
B子Group路径Full group path without project name
CProject路径Full path (e.g. myGroup/mySubGroup/myProject)
DProject名称Project name
EProject描述GitLab description
F已checkout分支All local branches, one per line
G分支最新提交时间Corresponding commit times, one per line
HSSH Git链接ssh_url_to_repo
I下载时间Clone/update timestamp
JProject IDGitLab project ID (hidden column, used for matching)

Sort: A (asc) → B (asc) → D (asc)

Formatting: Frozen header row, thin borders on all cells, F/G columns left-aligned with wrap, other columns center-aligned, UTF-8 encoding.

Security

  • Token is passed via environment variable, never logged
  • After clone, remote URL is reset to remove embedded token
  • If clone times out or crashes, a cleanup step removes token from .git/config

Output Structure

~/Desktop/Code/
├── 01.Index.xlsx
├── myGroup/
│   ├── SubGroup1/
│   │   ├── project-a/
│   │   └── project-b/
│   └── SubGroup2/
│       └── project-c/
└── AnotherGroup/
    └── ...

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

71.4%
按下载量换算1,841

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

敏感数据

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills