Tokf Run
mpecan/tokf
Compress verbose CLI output with tokf before returning results.
Self-healing China mirror source resolver. An agent skill from LeoYeAI/openclaw-master-skills.
$ npx skills add LeoYeAI/openclaw-master-skills --skill china-mirror-resolver -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills china-mirror-resolver --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/china-mirror-resolver .claude/skills/china-mirror-resolver && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "china-mirror-resolver" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/china-mirror-resolver into .claude/skills/china-mirror-resolver/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "china-mirror-resolver", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/china-mirror-resolverType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add LeoYeAI/openclaw-master-skills --skill china-mirror-resolver -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills china-mirror-resolver --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/china-mirror-resolver .agents/skills/china-mirror-resolver && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "china-mirror-resolver" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/china-mirror-resolver into .agents/skills/china-mirror-resolver/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "china-mirror-resolver", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LeoYeAI/openclaw-master-skills --skill china-mirror-resolver -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills china-mirror-resolver --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/china-mirror-resolver .cursor/skills/china-mirror-resolver && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "china-mirror-resolver" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/china-mirror-resolver into .cursor/skills/china-mirror-resolver/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "china-mirror-resolver", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/LeoYeAI/openclaw-master-skills.git --path skills/china-mirror-resolver--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add LeoYeAI/openclaw-master-skills --skill china-mirror-resolver -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills china-mirror-resolver --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/china-mirror-resolver .gemini/skills/china-mirror-resolver && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "china-mirror-resolver" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/china-mirror-resolver into .gemini/skills/china-mirror-resolver/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "china-mirror-resolver", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install LeoYeAI/openclaw-master-skills china-mirror-resolverInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add LeoYeAI/openclaw-master-skills --skill china-mirror-resolver -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/china-mirror-resolver .github/skills/china-mirror-resolver && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "china-mirror-resolver" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/china-mirror-resolver into .github/skills/china-mirror-resolver/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "china-mirror-resolver", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LeoYeAI/openclaw-master-skills --skill china-mirror-resolver -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills china-mirror-resolver --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/china-mirror-resolver .opencode/skills/china-mirror-resolver && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "china-mirror-resolver" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/china-mirror-resolver into .opencode/skills/china-mirror-resolver/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "china-mirror-resolver", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
china-mirror-resolverSelf-healing China mirror source resolver. An agent skill from LeoYeAI/openclaw-master-skills.
China Mirror Resolver is an agent skill from LeoYeAI/openclaw-master-skills. Self-healing China mirror source resolver. Automatically discovers, validates, and configures domestic mirror sources for pip/npm/yarn/pnpm/conda/Docker/Go/ Rust/Maven/Gradle/Homebrew/apt/yum/GitHub/HuggingFace when downloads are slow or timing out in mainland China. Trigger keywords: "换源", "镜像源", "下载慢", "超时", "timeout", "mirror", "registry", "proxy", "connection refused", "SSL error", "443", "ETIMEDOUT", "CondaHTTPError", "pip install failed".
Its SKILL.md is about 4.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts and reference files (for example `CHANGELOG.md`, `CONTRIBUTING.md` and `README.md`). Compatibility notes: Requires terminal/shell access and internet connectivity. Works on Windows (PowerShell), macOS (bash/zsh), and Linux (bash). Designed for Claude Code…
It sits in DevOps & Cloud, covering GraphQL, Model hubs and datasets and Containers. It works with Gradle, Docker, pnpm and Homebrew. The repository describes itself as: 🧠 Curated collection of 1209+ best OpenClaw skills — weekly updated by MyClaw.ai. The licence is MIT.
9 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit e5199b5. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
WebSearchWebFetchterminalfile-readfile-writeFrom allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/ (Shell), which the agent can run.
Shell commands in SKILL.md call:
npmyarncondapippnpmgobashdockergitcargoaptyumFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
mirrors.tuna.tsinghua.edu.cnmirrors.ustc.edu.cnmirrors.aliyun.comrepo.huaweicloud.comrsproxy.cnmaven.aliyun.comregistry.npmjs.orgregistry.yarnpkg.compypi.tuna.tsinghua.edu.cnpypi.mirrors.ustc.edu.cnmirrors.cloud.tencent.comregistry.npmmirror.comdocker.1ms.rundocker.xuanyuan.medocker.m.daocloud.ioFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Requires terminal/shell access and internet connectivity. Works on Windows (PowerShell), macOS (bash/zsh), and Linux (bash). Designed for Claude Code, StepFun, and similar agentic coding assistants. Adaptable to Cursor (.mdc rules) and Windsurf (.md rules) — see Section 9. Agents without web search capability can still use baseline sources (Section 2).
From compatibility in the SKILL.md frontmatter.
China Mirror Resolver loads about 4.6k tokens when it runs, and up to ~6.1k if it reads all its reference files. Until then it costs about 118 tokens; SKILL.md has 1,553 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
r host in `/etc/apt/sources.list`, then `sudo apt update`, replace `baseurl` in repo files, then `sudo yum makecache`re `/etc/apt/sources.list` from backup, `sudo apt update` |estore `/etc/yum.repos.d/` from backup, `sudo yum makecache` |Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from LeoYeAI/openclaw-master-skills at commit e5199b5, republished under its MIT licence (© LeoYeAI). 1,553 words, ~4,556 tokens.
.claude/skills/china-mirror-resolver/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.Mirror URLs break frequently. This skill teaches the agent a self-healing workflow: discover → validate → configure the best available source. A baseline table provides offline fallback; web search enables self-repair.
User error / request
│
▼
1. Identify tool type (Section 1)
│
▼
2. Detect current source config
│
▼
3. Try ALL baseline sources for that tool (Section 2)
Validate each with Section 4 thresholds (< 3s = good, 3–10s = acceptable)
├─ At least one source < 10s → pick fastest → go to step 6
└─ All sources > 10s or failed ↓
▼
4. [IF search capable] Search for latest sources (Section 3)
├─ Found candidates → go to step 5
└─ No candidates found → report to user with baseline table as reference
[IF no search] Report baseline failure to user, suggest manual URL
│
▼
5. Validate ALL candidates (Section 4), pick fastest passing one
├─ At least one passes → go to step 6
└─ All fail → report failure to user, suggest checking network/proxy
│
▼
6. Backup original config → write new config → verify with test command
│
▼
7. Confirm result to user (show old source → new source, response time)Graceful degradation: If the agent has no web search capability, skip step 4 and use only the baseline table. The skill remains functional with reduced self-healing ability.
Speed selection: When multiple sources pass validation, always select the one with the lowest response time. Test all candidates, not just the first.
Match error keywords to identify the tool, then check current config:
| Error keywords | Tool | Detect current source |
|---|---|---|
pip / PyPI / setup.py / No matching distribution | pip | pip config get global.index-url |
npm ERR / FETCH_ERROR | npm | npm config get registry |
yarn / ESOCKETTIMEDOUT | yarn | yarn config get registry (v1) / yarn config get npmRegistryServer (v2+) |
pnpm / ERR_PNPM | pnpm | pnpm config get registry |
conda / CondaHTTPError / PackagesNotFoundError | conda | conda config --show channels |
docker / pull / manifest / toomanyrequests | Docker | Linux/macOS: docker info | grep -A5 "Registry Mirrors" / Win: Docker Desktop → Settings → Docker Engine |
go: downloading / GOPROXY / dial tcp | Go | go env GOPROXY |
cargo / crates.io / Blocking waiting | Rust (cargo) | check ~/.cargo/config.toml (Linux/macOS) or %USERPROFILE%\.cargo\config.toml (Win) |
rustup / could not download | Rust (rustup) | echo $RUSTUP_DIST_SERVER / $env:RUSTUP_DIST_SERVER |
maven / pom.xml / BUILD FAILURE / Could not resolve | Maven | check ~/.m2/settings.xml or C:\Users\<user>\.m2\settings.xml |
gradle / Could not resolve / build.gradle | Gradle | check build.gradle / build.gradle.kts or ~/.gradle/init.gradle |
brew / Homebrew / Fetching | Homebrew | echo $HOMEBREW_BOTTLE_DOMAIN |
apt / dpkg / E: Failed to fetch | apt (Debian/Ubuntu) | check /etc/apt/sources.list |
yum / dnf / Cannot find a valid baseurl | yum/dnf (CentOS/RHEL/Fedora) | check /etc/yum.repos.d/ |
git clone / github.com / RPC failed | GitHub accelerator | N/A |
huggingface / hf_hub / ConnectionError | Hugging Face | echo $HF_ENDPOINT / $env:HF_ENDPOINT |
High-stability institutional mirrors. Try these first. If all fail or are too slow (> 10s), proceed to Section 3 (search). Agents without search capability stop here.
| Provider | URL |
|---|---|
| Tsinghua TUNA | https://pypi.tuna.tsinghua.edu.cn/simple |
| Aliyun | https://mirrors.aliyun.com/pypi/simple/ |
| USTC | https://pypi.mirrors.ustc.edu.cn/simple/ |
| Tencent | https://mirrors.cloud.tencent.com/pypi/simple/ |
| Provider | URL |
|---|---|
| npmmirror | https://registry.npmmirror.com |
| Huawei | https://repo.huaweicloud.com/repository/npm/ |
| Provider | URL |
|---|---|
| Tsinghua TUNA | https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main |
| USTC | https://mirrors.ustc.edu.cn/anaconda/pkgs/main |
| Aliyun | https://mirrors.aliyun.com/anaconda/pkgs/main |
| Provider | URL |
|---|---|
| 1ms.run | https://docker.1ms.run |
| xuanyuan.me | https://docker.xuanyuan.me |
| DaoCloud | https://docker.m.daocloud.io |
| linkedbus | https://docker.linkedbus.com |
| Provider | URL |
|---|---|
| goproxy.cn | https://goproxy.cn |
| goproxy.io | https://goproxy.io |
| Provider | cargo registry | rustup server |
|---|---|---|
| USTC | sparse+https://mirrors.ustc.edu.cn/crates.io-index/ | https://mirrors.ustc.edu.cn/rustup |
| Tsinghua TUNA | sparse+https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/ | https://mirrors.tuna.tsinghua.edu.cn/rustup |
| RsProxy.cn | sparse+https://rsproxy.cn/crates.io-index/ | https://rsproxy.cn/rustup |
| Provider | URL |
|---|---|
| Aliyun Public | https://maven.aliyun.com/repository/public |
| Aliyun Google | https://maven.aliyun.com/repository/google |
| Huawei | https://repo.huaweicloud.com/repository/maven |
| Provider | HOMEBREW_BOTTLE_DOMAIN |
|---|---|
| Tsinghua TUNA | https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles |
| USTC | https://mirrors.ustc.edu.cn/homebrew-bottles |
| Provider | Base URL |
|---|---|
| Tsinghua TUNA | https://mirrors.tuna.tsinghua.edu.cn |
| Aliyun | https://mirrors.aliyun.com |
| USTC | https://mirrors.ustc.edu.cn |
| Provider | Base URL |
|---|---|
| Tsinghua TUNA | https://mirrors.tuna.tsinghua.edu.cn |
| Aliyun | https://mirrors.aliyun.com |
| USTC | https://mirrors.ustc.edu.cn |
| Provider | Prefix URL |
|---|---|
| ghfast.top | https://ghfast.top/ |
| gh-proxy.com | https://gh-proxy.com/ |
| ghp.ci | https://ghp.ci/ |
| Provider | HF_ENDPOINT |
|---|---|
| hf-mirror.com | https://hf-mirror.com |
Capability gate: This section requires web search. If the agent lacks search capability, skip to Section 5 using only baseline sources.
Replace <YEAR> with current year. Use the agent's available search mechanism.
Provide both Chinese and English queries for better coverage:
| Tool | Chinese query | English query |
|---|---|---|
| pip | pip 国内镜像源 <YEAR> 可用 | pip china mirror source <YEAR> working |
| npm | npm 国内镜像 registry <YEAR> | npm china registry mirror <YEAR> |
| conda | conda 国内镜像源 channels <YEAR> | conda china mirror channel <YEAR> |
| Docker | docker 镜像加速源 <YEAR> 可用 | docker registry mirror china <YEAR> working |
| Go | GOPROXY 国内代理 <YEAR> | GOPROXY china proxy <YEAR> |
| Rust | cargo crates 国内镜像 <YEAR> | cargo crates china mirror <YEAR> |
| Maven | maven 国内镜像 仓库地址 <YEAR> | maven china mirror repository <YEAR> |
| Homebrew | homebrew 国内镜像 <YEAR> | homebrew china mirror <YEAR> |
| apt | ubuntu apt 国内源 <YEAR> | ubuntu apt china mirror <YEAR> |
| yum/dnf | centos yum 国内镜像源 <YEAR> | centos yum china mirror <YEAR> |
| GitHub | github 加速 代理 镜像站 <YEAR> | github proxy accelerator china <YEAR> |
| HuggingFace | huggingface 国内镜像 下载加速 <YEAR> | huggingface china mirror download <YEAR> |
Prioritize results in this order:
Reject: undated articles, posts > 6 months old, zero-reply forum threads, unverifiable personal blogs.
Extracted URLs must:
Security warning: Never use mirror sources from unknown individuals or unverifiable personal servers. Malicious mirrors can inject tampered packages. Especially for Docker and pip, only use sources from recognized institutions.
Every candidate must pass validation before being written to config.
# Linux / macOS
start=$(date +%s%N 2>/dev/null || perl -MTime::HiRes=time -e 'printf "%d\n",time()*1e9')
code=$(curl -o /dev/null -s -w "%{http_code}" --max-time 10 "<URL>")
end=$(date +%s%N 2>/dev/null || perl -MTime::HiRes=time -e 'printf "%d\n",time()*1e9')
echo "HTTP $code | $(( (end - start) / 1000000 ))ms"# Windows PowerShell
$sw = [System.Diagnostics.Stopwatch]::StartNew()
try { $r = Invoke-WebRequest -Uri "<URL>" -TimeoutSec 10 -UseBasicParsing -ErrorAction Stop
$sw.Stop(); "OK: HTTP $($r.StatusCode) | $($sw.ElapsedMilliseconds)ms"
} catch { $sw.Stop(); "FAIL: $_" }| Tool | Command / Check | Success Criteria |
|---|---|---|
| pip | pip install --dry-run requests -i <URL> --trusted-host <HOST> | Would install or already satisfied |
| npm | npm view lodash version --registry <URL> | Returns version number |
| yarn v1 | yarn info lodash version --registry <URL> | Returns version number |
| pnpm | pnpm view lodash version --registry <URL> | Returns version number |
| conda | conda search numpy -c <URL> --override-channels | Returns package list |
| Docker | HTTP GET <URL>/v2/ | HTTP 401 (auth required = service alive) |
| Go | HTTP GET <URL>/github.com/gin-gonic/gin/@v/list | Returns version list |
| Rust | HTTP GET the sparse index URL | HTTP 200 |
| Maven | HTTP GET <URL>/org/apache/commons/commons-lang3/maven-metadata.xml | Returns XML content |
| HuggingFace | HTTP GET <URL>/api/models?limit=1 | Returns JSON |
| Response Time | Rating | Action |
|---|---|---|
| < 3000ms | Excellent | Use this source |
| 3000–10000ms | Acceptable | Use if no faster alternative found |
| > 10000ms or timeout | Unusable | Try next candidate |
Selection rule: Test ALL available candidates (baseline + search-discovered), then select the one with the lowest response time that passes validation.
Pre-built scripts in scripts/:
scripts/validate.sh — Linux / macOS (bash). Supports --json flag for machine-readable output.scripts/validate.ps1 — Windows (PowerShell)bash scripts/validate.sh # test all, colored output
bash scripts/validate.sh pip # test pip only
bash scripts/validate.sh all --json # machine-readable JSON output
trusted-hostwarning: Using--trusted-hostwith pip disables SSL certificate verification for that host. This is a security trade-off. Only use it when the mirror is a known institution (e.g., .edu.cn, major cloud vendor) and the connection is within a trusted network. Prefer mirrors that have valid SSL certificates and do not requiretrusted-host.
Detailed configuration templates for each tool are in
references/config-templates.md. Below is a quick reference of the key commands.
pip: pip config set global.index-url <URL>
npm: npm config set registry <URL>
yarn v1: yarn config set registry <URL>
yarn v2+: yarn config set npmRegistryServer <URL>
pnpm: pnpm config set registry <URL>
conda: conda config --add channels <URL> && conda config --set show_channel_urls yes
Docker: Read existing daemon.json, add/update registry-mirrors array, write back, restart Docker. See references/config-templates.md for merge logic.
Go: go env -w GOPROXY=<URL>,direct && go env -w GOSUMDB=sum.golang.google.cn
Rust (cargo): Write [source.crates-io] + [source.mirror] to ~/.cargo/config.toml
Rust (rustup): Set RUSTUP_DIST_SERVER and RUSTUP_UPDATE_ROOT env vars
Maven: Add <mirror> block to ~/.m2/settings.xml
Gradle (Groovy): Add maven { url '<URL>' } to repositories block
Gradle (Kotlin): Add maven(url = "<URL>") to repositories block
Homebrew: Set HOMEBREW_BREW_GIT_REMOTE, HOMEBREW_CORE_GIT_REMOTE, HOMEBREW_BOTTLE_DOMAIN env vars
apt: Replace archive.ubuntu.com with mirror host in /etc/apt/sources.list, then sudo apt update
yum/dnf: Backup /etc/yum.repos.d/, replace baseurl in repo files, then sudo yum makecache
GitHub: Prepend accelerator prefix: git clone <PREFIX>https://github.com/<owner>/<repo>.git
HuggingFace: Set HF_ENDPOINT=<URL> env var
| Tool | Restore Command |
|---|---|
| pip | pip config unset global.index-url |
| npm | npm config set registry https://registry.npmjs.org |
| yarn v1 | yarn config set registry https://registry.yarnpkg.com |
| yarn v2+ | yarn config set npmRegistryServer https://registry.yarnpkg.com |
| pnpm | pnpm config set registry https://registry.npmjs.org |
| conda | conda config --remove-key channels |
| Go | go env -w GOPROXY=https://proxy.golang.org,direct |
| Docker | Remove registry-mirrors from daemon.json (keep other fields), restart |
| Rust (cargo) | Remove [source.*] sections from config.toml |
| Rust (rustup) | unset RUSTUP_DIST_SERVER RUSTUP_UPDATE_ROOT |
| Maven | Remove <mirror> block from settings.xml |
| Homebrew | unset HOMEBREW_BREW_GIT_REMOTE HOMEBREW_CORE_GIT_REMOTE HOMEBREW_BOTTLE_DOMAIN |
| apt | Restore /etc/apt/sources.list from backup, sudo apt update |
| yum/dnf | Restore /etc/yum.repos.d/ from backup, sudo yum makecache |
| HuggingFace | unset HF_ENDPOINT |
HTTP_PROXY / HTTPS_PROXY env vars are set, some tools may bypass mirrors and go through the proxy insteadscripts/validate.sh or scripts/validate.ps1 for periodic health checksThis section is informational. Always validate before use rather than relying solely on this list, which may itself become outdated.
| Source | Status (2026-03) | Notes |
|---|---|---|
pypi.douban.com (pip) | Dead | Connection reset |
ghproxy.cc (GitHub) | Dead | SSL certificate untrusted |
mirrors.aliyun.com/goproxy/ (Go) | Unstable | Homepage 404, module downloads intermittent |
| Capability | Required? | Used in | If absent |
|---|---|---|---|
| Terminal/shell | Required | Steps 2, 4, 5, 6 | Cannot function |
| File read/write | Required | Steps 5, 6 | Cannot write config |
| Web search | Optional | Step 4 | Use baseline table only (Section 2) |
| Web fetch | Optional | Step 4 | Use curl / Invoke-WebRequest via terminal |
Claude Code / StepFun: Native support. Place folder in ~/.claude/skills/ or ~/.stepfun/skills/.
Cursor: Create .cursor/rules/china-mirror-resolver.mdc with this content:
---
description: Resolve slow package downloads in China by switching to domestic mirrors. Triggers on: timeout, mirror, 换源, 镜像源, 下载慢
globs:
alwaysApply: false
---
[Paste the content of this SKILL.md here, excluding the YAML frontmatter]Windsurf: Create .windsurf/rules/china-mirror-resolver.md with this content:
---
trigger: auto
---
[Paste the content of this SKILL.md here, excluding the YAML frontmatter]Generic LLM (no skill system): Include Section 2 (baseline table) and Section 5 (config quick reference) in the system prompt. Skip Section 3 (search) if the LLM has no search tool.
© LeoYeAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 6 other files (scripts, references) in skills/china-mirror-resolver of LeoYeAI/openclaw-master-skills.
Open the folder on GitHubat commit e5199b5
China Mirror Resolver next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| China Mirror Resolver this skillLeoYeAI/openclaw-master-skills | 2.2k | — | ~4.6k | Automated safety check: Notes | MIT | |
| Tokf Runmpecan/tokf | 199 | — | ~571 | Automated safety check: Pass | MIT | |
| Uv WorkflowAedelon/claude-code-blueprint | 120 | — | ~1.2k | Automated safety check: Notes | Custom licence | |
| Gating Production DeploysPostHog/posthog | 40k | — | ~751 | Automated safety check: Pass | Custom licence | |
| Devcontainer Devstacklok/toolhive-studio | 171 | — | ~3.8k | Automated safety check: Notes | Apache-2.0 | |
| Flowfile Build and Environment SetupEdwardvaneechoud/Flowfile | 385 | — | ~7.3k | Automated safety check: Notes | MIT |
mpecan/tokf
Compress verbose CLI output with tokf before returning results.
Aedelon/claude-code-blueprint
Master uv package manager for Python: project setup, dependency management, virtual environments, lockfiles, CI/CD integration, Docker builds, and migration from pip/poetry.
PostHog/posthog
A skill your agent uses when adding or editing a GitHub Actions workflow that pushes a container image to a registry (ECR/ghcr/Docker Hub via build-push-action) or dispatches a production deploy (a…
stacklok/toolhive-studio
Spin up and interact with ToolHive Studio's containerized dev environment (Xvfb + noVNC + DinD).
Edwardvaneechoud/Flowfile
Recreates every Flowfile development and build environment from scratch, with exact version pins and an explanation of what each Makefile target really does.
shopsys/shopsys
The command catalog for this Shopsys project — how to build, run, test, check code, access the database, and sync the GraphQL schema, including the macOS Mutagen workflow.
LeoYeAI/openclaw-master-skills
Manages pipelines on a DevOps quality and efficiency platform through its OpenAPI: list workspaces and templates, create, update, run and cancel pipelines, and read run records.
LeoYeAI/openclaw-master-skills
Patches OpenClaw's Feishu extension so an edited document triggers an isolated agent session that reads the doc and replies inline, turning it into a live chat space.
LeoYeAI/openclaw-master-skills
Multi-context memory management system for OpenClaw agents with group-isolated storage, global shared memory, workspace organization, and group-specific skills isolation.
LeoYeAI/openclaw-master-skills
Runs a brand's AI-search visibility work end to end: diagnosing how AI platforms represent it, repositioning it, producing AI-optimized content and monitoring ongoing mentions.
LeoYeAI/openclaw-master-skills
Installs and authenticates the gws CLI, then automates Gmail, Drive, Sheets, Calendar, Docs, Chat and Tasks with ready-made recipes, persona bundles and security audits.
LeoYeAI/openclaw-master-skills
Runs four advisor roles, a fitness coach, nutritionist, data analyst and TCM practitioner, to build a health profile and track workouts, diet and wellness over time.
Self-healing China mirror source resolver. An agent skill from LeoYeAI/openclaw-master-skills. China Mirror Resolver is an agent skill from LeoYeAI/openclaw-master-skills. Self-healing China mirror source resolver.
China Mirror Resolver fits situations like: connection refused; pip install failed.
Run `npx skills add LeoYeAI/openclaw-master-skills --skill china-mirror-resolver -a claude-code`. Or copy the skill folder (skills/china-mirror-resolver in LeoYeAI/openclaw-master-skills) into .claude/skills/china-mirror-resolver in your project. Claude Code loads it when a task matches its description.
Run `npx skills add LeoYeAI/openclaw-master-skills --skill china-mirror-resolver -a codex`. Or copy the skill folder (skills/china-mirror-resolver in LeoYeAI/openclaw-master-skills) into .agents/skills/china-mirror-resolver in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LeoYeAI/openclaw-master-skills --skill china-mirror-resolver -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/china-mirror-resolver, .gemini/skills/china-mirror-resolver, .github/skills/china-mirror-resolver and .opencode/skills/china-mirror-resolver in your project.
Going by SKILL.md and its folder, China Mirror Resolver needs a shell for the scripts in its folder and the command-line tools its instructions call (npm, yarn, conda, pip, pnpm and go). Our summary lists: Python 3; A Bash shell; Docker. Its frontmatter pre-approves these tools: WebSearch, WebFetch, terminal, file-read, file-write. Compatibility (from SKILL.md): Requires terminal/shell access and internet connectivity. Works on Windows (PowerShell), macOS (bash/zsh), and Linux (bash). Designed for Claude Code, StepFun, and similar agentic coding assistants. Adaptable to Cursor (.mdc rules) and Windsurf (.md rules) — see Section 9. Agents without web search capability can still use baseline sources (Section 2). .
SKILL.md names 15 domains. In commands or code: mirrors.tuna.tsinghua.edu.cn, mirrors.ustc.edu.cn, mirrors.aliyun.com, repo.huaweicloud.com, rsproxy.cn, maven.aliyun.com, registry.npmjs.org, registry.yarnpkg.com, pypi.tuna.tsinghua.edu.cn, pypi.mirrors.ustc.edu.cn, mirrors.cloud.tencent.com, registry.npmmirror.com, docker.1ms.run, docker.xuanyuan.me and docker.m.daocloud.io; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
China Mirror Resolver is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.6k tokens (SKILL.md is roughly 18k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.6k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with China Mirror Resolver: Tokf Run (mpecan/tokf, 199 stars), Uv Workflow (Aedelon/claude-code-blueprint, 120 stars), Gating Production Deploys (PostHog/posthog, 40k stars) and Devcontainer Dev (stacklok/toolhive-studio, 171 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
LeoYeAI (a GitHub user) maintains it in LeoYeAI/openclaw-master-skills, which has 2,161 GitHub stars. The repository holds 1,235 skills in this directory. The repository was last updated on July 20, 2026.
Source: LeoYeAI/openclaw-master-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.