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

repo-setup回购设置

Agent Skill

repo-setup 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 OpenClaw 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,420

周安装

137

GitHub Stars

公开资料未说明

下载量

1,107
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install repo-setup

简介

回购设置用于分叉、克隆并配置 GitHub 仓库开发环境。

  • 自动处理上游远程与身份验证流程。
  • 通过 clawhub 安装后,按提示完成认证即可使用。
  • 首次使用前建议测试连接稳定性。适用宿主包括 OpenClaw,接入前应确认版本、权限和运行环境要求。
  • repo-setup 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
repo-setup
description
Fork, clone, and set up a GitHub repository for development or contribution. Handles fork creation, clone with authentication, upstream remote configuration, branch creation from upstream, and dependency installation. Use when starting work on a new open-source project, setting up a multi-repo development environment, or onboarding to a new codebase.

Repo Setup — Fork, Clone & Branch Setup

Overview

Automate the setup of a local development environment for contributing to or working on GitHub repositories. Handles the full fork → clone → branch → dependencies pipeline.

Use cases: Open-source contribution, multi-repo development, new project onboarding, codebase exploration.

Prerequisites

gh auth status   # Must show "Logged in"
git --version    # Git installed

If not configured, ask the user to provide:

  1. GitHub username — used for fork URLs and clone paths
  2. GitHub token — run gh auth login or set export GH_TOKEN=<token>

Token is required for: forking repos, cloning private forks, pushing code. Without it, git push and gh repo fork will fail.

Workflow

Step 1: Get Parameters

ParameterRequiredDefaultExample
Repositoryowner/repo
GitHub usernamemyusername
Branch name*(stay on default)*fix/bug-description
Working directory~/prs/{repo}~/dev/{repo}
Auth methodGH_TOKEN env varToken in URL, SSH

Step 2: Fork

gh repo fork {owner}/{repo} --clone=false

If fork already exists, this is a no-op. If the user already owns the repo, skip forking.

Step 3: Clone

WORKDIR="${WORK_BASE:-$HOME/prs}/{repo_name}"

if [ -d "$WORKDIR" ]; then
    cd "$WORKDIR"
    git fetch --all
else
    mkdir -p "$(dirname "$WORKDIR")"

    # With token auth
    git clone "https://${GH_TOKEN}@github.com/${username}/${repo_name}.git" "$WORKDIR"

    # Or with SSH
    # git clone "git@github.com:${username}/${repo_name}.git" "$WORKDIR"

    cd "$WORKDIR"
fi

Step 4: Configure Upstream Remote

if ! git remote get-url upstream &>/dev/null; then
    git remote add upstream "https://github.com/${owner}/${repo_name}.git"
fi
git fetch upstream

Step 5: Create Feature Branch

# Detect default branch
DEFAULT_BRANCH=$(git remote show upstream 2>/dev/null | grep 'HEAD branch' | awk '{print $NF}')
DEFAULT_BRANCH="${DEFAULT_BRANCH:-main}"

# Create branch from latest upstream
git checkout -b {branch_name} upstream/$DEFAULT_BRANCH

Branch Naming Conventions

TypePatternExample
Bug fixfix/{short-description}fix/null-pointer-on-empty-list
Featurefeat/{short-description}feat/add-retry-logic
Refactorrefactor/{short-description}refactor/extract-auth-module
Review iterationfix/{description}-v2fix/tool-guards-v2

Step 6: Install Dependencies

Detect the project type and install accordingly:

IndicatorLanguageInstall Command
pyproject.toml / setup.pyPythonpip install -e ".[dev]" or pip install -e .
requirements.txtPythonpip install -r requirements.txt
package.jsonNode.jsnpm install
go.modGogo mod download
Cargo.tomlRustcargo build
pom.xmlJavamvn install -DskipTests
build.gradleJava/Kotlin./gradlew build -x test

If full dev install fails (common with native dependencies):

  1. Install core deps individually
  2. Skip optional native/GPU deps
  3. Ensure test framework is installed at minimum

Step 7: Verify

# Check setup
echo "Directory: $(pwd)"
echo "Branch: $(git branch --show-current)"
echo "Upstream: $(git remote get-url upstream)"
echo "Fork: $(git remote get-url origin)"

# Quick build/import test
# Python: python -c "import {package}"
# Node: npm run build (if applicable)
# Go: go build ./...

Automation Script

A helper script is available if this Skill is installed alongside oss-pr-campaign:

# One-liner setup
scripts/setup_repo.sh owner/repo username fix/branch-name

Or implement the same logic step-by-step using the SOP above.

Output

  • Local repo at ~/prs/{repo}/ (or custom directory) on feature branch
  • Upstream remote configured
  • Dependencies installed
  • Ready for development

Tips

  • When used as part of a development pipeline, this follows issue-hunter and feeds into dev-test.
  • For exploring a codebase without contributing, skip the fork step and clone the original directly.
  • Store GH_TOKEN in your shell profile for persistent auth across sessions.
  • If working on multiple repos, keep them all under ~/prs/ for easy navigation.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

OpenClaw

76.12%
按下载量换算843

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

通过

权限和风险

敏感数据

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

安装前确认

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

来源信息

继续浏览同类 Skills