Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

clone-repos

БесплатноБез исполняемых скриптовНе проверен

Clone SGLang, FlashInfer, sgl-cookbook, and flashinfer-trace repositories to tmp/. Use when setting up the project, preparing for kernel extraction, or when…

flashinfer-aiот flashinfer-ai★ 314 звёзд на GitHub17 установок в других каталогах

Об этом скилле

Clone Repositories

Clone SGLang, FlashInfer, sgl-cookbook, and flashinfer-trace repositories to the tmp/ directory.

Description

This skill sets up the required repositories for kernel extraction, testing, and workload collection workflows. It:

  1. Clones SGLang, FlashInfer, sgl-cookbook, and flashinfer-trace repositories to tmp/ directory (if not already present) with all submodules
  2. Updates repositories by pulling latest changes from remote and updating submodules (if repos already exist)
  3. Checks out the main branch by default (or specified branch)
  4. Installs SGLang and FlashInfer packages from source in the current environment

Repositories:

  • SGLang: Inference engine with model implementations and kernel calls
  • FlashInfer: GPU kernel library with optimized implementations (ground truth)
  • sgl-cookbook: Best serving configurations for each architecture and model (TP, EP flags)
  • flashinfer-trace: Workload dataset and kernel definitions — cloned to tmp/flashinfer-trace

Usage

# Clone all repos to ./tmp directory, update if exists, and install from source
/clone-repos

# Clone specific branches
/clone-repos --sglang-branch v0.4.0 --flashinfer-branch v0.2.0

Parameters

  • sglang_branch (optional): SGLang branch to checkout (default: "main")
  • flashinfer_branch (optional): FlashInfer branch to checkout (default: "main")
  • cookbook_branch (optional): sgl-cookbook branch to checkout (default: "main")

Implementation Steps

When executing this skill:

  1. Create tmp directory if needed:

    mkdir -p tmp
    
  2. Handle SGLang repository:

    # Check if repo exists
    if [ -d "tmp/sglang/.git" ]; then
        echo "SGLang exists, pulling latest changes..."
        (cd tmp/sglang && git fetch origin && git checkout "${sglang_branch:-main}" && git reset --hard "origin/${sglang_branch:-main}" && git submodule update --init --recursive)
    else
        echo "Cloning SGLang with submodules..."
        git clone --recurse-submodules https://github.com/sgl-project/sglang.git tmp/sglang
        (cd tmp/sglang && git checkout "${sglang_branch:-main}")
    fi
    

    Note: Using (cd ...) subshell syntax ensures directory changes are isolated and don't affect subsequent commands.

  3. Handle FlashInfer repository:

    # Check if repo exists
    if [ -d "tmp/flashinfer/.git" ]; then
        echo "FlashInfer exists, pulling latest changes..."
        (cd tmp/flashinfer && git fetch origin && git checkout "${flashinfer_branch:-main}" && git reset --hard "origin/${flashinfer_branch:-main}" && git submodule update --init --recursive)
    else
        echo "Cloning FlashInfer with submodules..."
        git clone --recurse-submodules https://github.com/flashinfer-ai/flashinfer.git tmp/flashinfer
        (cd tmp/flashinfer && git checkout "${flashinfer_branch:-main}")
    fi
    

    Note: Using (cd ...) subshell syntax ensures directory changes are isolated and don't affect subsequent commands.

  4. Handle sgl-cookbook repository:

    # Check if repo exists
    if [ -d "tmp/sgl-cookbook/.git" ]; then
        echo "sgl-cookbook exists, pulling latest changes..."
        (cd tmp/sgl-cookbook && git fetch origin && git checkout "${cookbook_branch:-main}" && git reset --hard "origin/${cookbook_branch:-main}")
    else
        echo "Cloning sgl-cookbook..."
        git clone https://github.com/sgl-project/sgl-cookbook.git tmp/sgl-cookbook
        (cd tmp/sgl-cookbook && git checkout "${cookbook_branch:-main}")
    fi
    

    Note: sgl-cookbook doesn't require submodules or installation. It contains serving configuration files only.

  5. Handle flashinfer-trace repository:

    # Check if repo exists
    if [ -d "tmp/flashinfer-trace/.git" ]; then
        echo "flashinfer-trace exists, pulling latest changes..."
        (cd tmp/flashinfer-trace && git fetch origin && git checkout main && git reset --hard origin/main)
    else
        echo "Cloning flashinfer-trace..."
        git clone https://huggingface.co/datasets/flashinfer-ai/flashinfer-trace tmp/flashinfer-trace
    fi
    

    Note: flashinfer-trace is a HuggingFace dataset repo (not GitHub). It contains kernel definitions, workloads, and blob safetensors. All workload collection writes to this directory.

  6. Install packages from source:

    # Upgrade pip once
    pip install --upgrade pip
    
    # Install FlashInfer (pyproject.toml in repo root)
    (cd tmp/flashinfer && python -m pip install --no-build-isolation -e . -v)
    
    # Install SGLang (pyproject.toml in python/ subdirectory)
    (cd tmp/sglang && pip install -e "python")
    

    Note: Subshell syntax (cd ... && command) keeps working directory unchanged.

  7. Verify installations:

    # Test imports
    python -c "import sglang; print(f'SGLang: {sglang.__version__}')"
    python -c "import flashinfer; print(f'FlashInfer: {flashinfer.__version__}')"
    
    # V
    
Полный SKILL.md на GitHub

Установить clone-repos в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл clone-repos?

Clone SGLang, FlashInfer, sgl-cookbook, and flashinfer-trace repositories to tmp/. Use when setting up the project, preparing for kernel extraction, or when the user needs the source repositories.

Как установить скилл clone-repos?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл clone-repos запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить clone-repos с