/flagos-skills:install-stack-flagosfrom flagos-skills
Installs the 5-package multi-chip software stack (vLLM, FlagTree, FlagGems, FlagCX, vllm-plugin-FL) inside a GPU container with network mirror detection and dependency ordering.
Ships in flagos-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Install 5 packages inside a running GPU container, in dependency order, with per-package validation and structured error reporting.
install-stack/
├── SKILL.md # This file — execution flow
├── scripts/
│ ├── detect_network.py # Probe GitHub/PyPI, return mirror config (JSON)
│ ├── collect_env_info.py # Python/glibc/arch/vendor/disk info (JSON)
│ ├── select_flagtree_wheel.py # Match vendor+python+glibc → wheel specifier (JSON)
│ └── validate_packages.py # Import-test all 5 packages, report status (JSON)
└── references/
├── vendor-mappings.md # FlagCX make flags, adaptor names, dependency chain
└── network-mirrors.md # GitHub/PyPI mirror config rules
/gpu-container-setup)If invoked standalone, ask the user for container name and GPU vendor.
If invoked from /flagrelease orchestrator, these are passed as context.
Verify the container is running:
docker inspect --format='{{.State.Status}}' <CONTAINER> | grep -q running
Copy and run scripts/collect_env_info.py inside the container to get vendor,
Python version, glibc version, architecture, and free disk space:
docker cp <SKILL_DIR>/scripts/collect_env_info.py <CONTAINER>:/tmp/
docker exec <CONTAINER> python3 /tmp/collect_env_info.py
If vendor is unknown and user didn't provide --vendor, ask the user.
Copy and run scripts/detect_network.py inside the container:
docker cp <SKILL_DIR>/scripts/detect_network.py <CONTAINER>:/tmp/
docker exec <CONTAINER> python3 /tmp/detect_network.py
Parse the JSON output to get GITHUB_PREFIX and PIP_INDEX for all subsequent
commands. See references/network-mirrors.md for fallback rules.
From collect_env_info.py output, verify at least 10GB free. If not, warn user
and ask whether to proceed.
See references/vendor-mappings.md for dependency chain and install order:
vLLM → FlagTree → FlagGems → FlagCX → vllm-plugin-FL
docker exec <CONTAINER> pip install ${PIP_INDEX} vllm==0.13.0
Quick validate:
docker exec <CONTAINER> python3 -c "import vllm; assert vllm.__version__ == '0.13.0'"
GATE: If vLLM install fails → record error and EXIT the skill.
Run scripts/select_flagtree_wheel.py to find the correct wheel:
python3 <SKILL_DIR>/scripts/select_flagtree_wheel.py \
--vendor <VENDOR> --python <PY_VER> --glibc <GLIBC_VER>
If status is FOUND, uninstall stock triton and install the wheel:
docker exec <CONTAINER> bash -c '
python3 -m pip uninstall -y triton
python3 -m pip uninstall -y triton
python3 -m pip install <SPECIFIER> <PIP_ARGS>
'
If status is NOT_FOUND, record the mismatch and continue (do not exit).
docker exec <CONTAINER> bash -c "
cd /tmp && git clone ${GITHUB_PREFIX}/FlagOpen/FlagGems
cd FlagGems && pip install ${PIP_INDEX} -e .
"
Failure → record and continue.
Read references/vendor-mappings.md to look up the correct Make flag and
FLAGCX_ADAPTOR for the detected vendor.
Phase 1: Build C++ library:
docker exec <CONTAINER> bash -c "
cd /tmp && git clone ${GITHUB_PREFIX}/flagos-ai/FlagCX
cd FlagCX && git submodule update --init --recursive
make <MAKE_FLAG> -j\$(nproc)
"
Phase 2: Install PyTorch plugin:
docker exec <CONTAINER> bash -c "
cd /tmp/FlagCX/plugin/torch
FLAGCX_ADAPTOR=<ADAPTOR> pip install -e . --no-build-isolation
"
Failure → record and continue.
docker exec <CONTAINER> bash -c "
cd /tmp && git clone ${GITHUB_PREFIX}/flagos-ai/vllm-plugin-FL
cd vllm-plugin-FL
pip install ${PIP_INDEX} -r requirements.txt
pip install --no-build-isolation -e .
"
On Iluvatar, if requirements.txt fails, retry with requirements_iluvatar.txt.
GATE: If vllm-plugin-FL fails → record error and EXIT the skill.
Copy and run scripts/validate_packages.py inside the container:
docker cp <SKILL_DIR>/scripts/validate_packages.py <CONTAINER>:/tmp/
docker exec <CONTAINER> python3 /tmp/validate_packages.py
This produces a comprehensive JSON report of all 5 packages with import status, versions, and gate check.
If FlagCX installed successfully, persist FLAGCX_PATH:
docker exec <CONTAINER> bash -c "echo 'export FLAGCX_PATH=/tmp/FlagCX' >> ~/.bashrc"
Combine all results into structured output:
{
"status": "PASS | PARTIAL | FAIL",
"stage": "install-stack",
"container": "<name>",
"vendor": "<vendor>",
"network": {"github_mirror": true, "pypi_mirror": true},
"python_version": "3.11",
"glibc_version": "2.34",
"packages": {
"vllm": {"status": "PASS", "version": "0.13.0"},
"flagtree": {"status": "PASS", "version": "0.4.1+ascend3.2"},
"flaggems": {"status": "PASS", "version": "..."},
"flagcx": {"status": "PASS", "version": "0.10.0"},
"vllm_plugin_fl": {"status": "PASS", "version": "..."}
},
"flagcx_path": "/tmp/FlagCX",
"gate_passed": true,
"errors": []
}
Status logic:
PASS — all 5 packages installed and validatedPARTIAL — vLLM + plugin installed, some of FlagTree/FlagGems/FlagCX failedFAIL — vLLM or plugin failed (gate failed)| Failure | Behavior |
|---|---|
| Container not running | Report error, exit |
| Network unreachable (both direct and mirror) | Report, exit |
| pip install fails | Report package, full error, continue (unless gate) |
| Build from source fails | Report compiler error, continue |
| No matching FlagTree wheel | Report vendor/python/glibc mismatch, continue |
| Import fails after install | Report traceback, continue |
| Disk space < 10GB | Warn user, ask whether to proceed |
| Timeout (any command) | All commands use timeout; report which step |
| Operation | Timeout |
|---|---|
| pip install (per package) | 300s |
| git clone | 120s |
| make (FlagCX) | 300s |
| Network probe | 5s |
| Validation (import) | 30s |
references/network-mirrors.md (opens in a new tab)references/vendor-mappings.md (opens in a new tab)scripts/__pycache__/collect_env_info.cpython-313.pyc (opens in a new tab)scripts/__pycache__/detect_network.cpython-313.pyc (opens in a new tab)scripts/__pycache__/select_flagtree_wheel.cpython-313.pyc (opens in a new tab)scripts/__pycache__/validate_packages.cpython-313.pyc (opens in a new tab)scripts/collect_env_info.py (opens in a new tab)scripts/detect_network.py (opens in a new tab)scripts/select_flagtree_wheel.py (opens in a new tab)scripts/validate_packages.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
install-stack, flagos, gpu-container, multi-chip, vllm, package-installation
12 skills in this plugin
/flaggems-pr-review-flagosThis skill should be used when reviewing FlagGems operator PRs, performing code review, self-reviewing before submission, or when the user mentions "review PR", "审PR", "代码review", "code review", "review #123", "self-review", "自审", "检查PR", "审查算子", "review operator". It fetches PR diffs, applies FlagGems domain-specific review rules (structural checks, naming, registration, tests, benchmarks), and posts inline review comments directly on GitHub.
/flaggems-pr-submit-flagosThis skill should be used when submitting FlagGems operator PRs, reviewing operator code before submission, preparing operator code for PR, or when the user mentions "提PR", "提交算子", "submit operator", "PR提交", "代码审核", "pre-commit". It automates code review, validates completeness and compliance, runs pre-commit and worktree tests, and directly submits PR to upstream with full description including speedup data.
/flagrelease-entrance-flagosFull FlagRelease pipeline orchestrator. Runs the complete LLM deployment, verification,
and benchmarking pipeline for multi-chip GPU backends. Executes: install-stack →
env-verify → model-verify → perf-test in sequence, passing state between steps
and producing a final structured report. Assumes gpu-container-setup (Step 1) is
already done — a running container with PyTorch + GPU access must exist.
/gpu-container-setup-flagosAutomatically detect GPU vendor, find appropriate PyTorch container image,
launch with correct mounts, and validate GPU functionality. Supports NVIDIA,
Ascend, Metax, Iluvatar, and AMD/ROCm. Use when user says "setup container",
"start pytorch container", or invokes /gpu-container-setup.
/kernelgen-flagosUnified GPU kernel operator generation and optimization skill. Automatically detects the target repository type (FlagGems, vLLM, or general Python/Triton) and dispatches to the appropriate specialized sub-skill. Includes operator generation, MCP-based iterative optimization, and feedback submission sub-skills. Use this skill when the user wants to generate or optimize a GPU kernel operator, create a Triton kernel, or says things like "generate an operator", "create a kernel for X", "optimize triton kernel", or "/kernelgen-flagos".
/model-migrate-flagosMigrate a model from the latest vLLM upstream repository into the vllm-plugin-FL project (pinned at vLLM v0.13.0). Use this skill whenever someone wants to add support for a new model to vllm-plugin-FL, port model code from upstream vLLM, or backport a newly released model. Trigger when the user says things like "migrate X model", "add X model support", "port X from upstream vLLM", "make X work with the FL plugin", or simply "/model-migrate-flagos model_name". The model_name argument uses snake_case (e.g. qwen3_5, kimi_k25, deepseek_v4). Do NOT use for models already supported by vLLM 0.13.0 core, or for multimodal-only components that don't need backporting.
npx claudepluginhub flagos-ai/skills --plugin flagos-skillsOther plugins' skills for the same job