Agent skill

China Mirror Resolver

by LeoYeAI in LeoYeAI/openclaw-master-skills

Self-healing China mirror source resolver. An agent skill from LeoYeAI/openclaw-master-skills.

MITAuto-check: notesDevOps & Cloud

Install China Mirror Resolver

skills CLI
$ npx skills add LeoYeAI/openclaw-master-skills --skill china-mirror-resolver -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install LeoYeAI/openclaw-master-skills china-mirror-resolver --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ 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-src

Use ~/.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/

Facts

Skill name
china-mirror-resolver
GitHub stars
2.2k
Token cost
~4.6k tokens
SKILL.md length
1,553 words
Files
7 (incl. scripts, references)
Skills in repo
1,235
Repo updated
First seen
Licence
MIT

At a glance

Self-healing China mirror source resolver. An agent skill from LeoYeAI/openclaw-master-skills.

  • Works in 9 steps: Diagnostic Table → Baseline Sources → Search Strategy → …
  • Connection refused
  • SKILL.md covers Execution Flow, 1. Diagnostic Table, 2. Baseline Sources and 3. Search Strategy, plus 3 more sections
  • Runs Shell scripts from its folder; calls npm, yarn and conda; reaches mirrors.tuna.tsinghua.edu.cn and mirrors.ustc.edu.cn

What it does

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.

When your agent uses it

  • Connection refused
  • Pip install failed

Example prompts

  • “timeout”
  • “mirror”
  • “registry”
  • “/china-mirror-resolver”

Requirements

  • Python 3
  • A Bash shell
  • Docker
  • 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).
  • Pre-approved tools (allowed-tools): WebSearch, WebFetch, terminal, file-read, file-write

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. Diagnostic Table
  2. Baseline Sources
  3. Search Strategy
  4. Validation
  5. Configuration
  6. Restore Official Sources
  7. Notes
  8. Known Unstable Sources
  9. Cross-Agent Adaptation

What it can do on your machine

Read from SKILL.md and the folder at commit e5199b5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • WebSearch
    • WebFetch
    • terminal
    • file-read
    • file-write

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • npm
    • yarn
    • conda
    • pip
    • pnpm
    • go
    • bash
    • docker
    • git
    • cargo
    • apt
    • yum

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • 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
    • docker.m.daocloud.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    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.

Context cost

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.

Always · name and description, kept in context so the agent knows when to use it
~118
When it runs · the whole SKILL.md, loaded when a task matches
~4.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.1k

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.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteRuns commands with sudoSKILL.md:357
    r host in `/etc/apt/sources.list`, then `sudo apt update`
  • NoteRuns commands with sudoSKILL.md:359
    , replace `baseurl` in repo files, then `sudo yum makecache`
  • NoteRuns commands with sudoSKILL.md:383
    re `/etc/apt/sources.list` from backup, `sudo apt update` |
  • NoteRuns commands with sudoSKILL.md:384
    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.

SKILL.md

The full file from LeoYeAI/openclaw-master-skills at commit e5199b5, republished under its MIT licence (© LeoYeAI). 1,553 words, ~4,556 tokens.

Download SKILL.mdSave it as .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.
name
china-mirror-resolver
description
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".
allowed-tools
WebSearch, WebFetch, terminal, file-read, file-write
compatibility
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).
version
2.1.0
license
MIT
homepage
https://github.com/The-Ladder-of-Rrogress/china-mirror-resolver
metadata.author
community
metadata.category
devtools
metadata.region
china-mainland
metadata.last-verified
2026-03-08

China Mirror Resolver

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.


Execution Flow

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.


1. Diagnostic Table

Match error keywords to identify the tool, then check current config:

Error keywordsToolDetect current source
pip / PyPI / setup.py / No matching distributionpippip config get global.index-url
npm ERR / FETCH_ERRORnpmnpm config get registry
yarn / ESOCKETTIMEDOUTyarnyarn config get registry (v1) / yarn config get npmRegistryServer (v2+)
pnpm / ERR_PNPMpnpmpnpm config get registry
conda / CondaHTTPError / PackagesNotFoundErrorcondaconda config --show channels
docker / pull / manifest / toomanyrequestsDockerLinux/macOS: docker info | grep -A5 "Registry Mirrors" / Win: Docker Desktop → Settings → Docker Engine
go: downloading / GOPROXY / dial tcpGogo env GOPROXY
cargo / crates.io / Blocking waitingRust (cargo)check ~/.cargo/config.toml (Linux/macOS) or %USERPROFILE%\.cargo\config.toml (Win)
rustup / could not downloadRust (rustup)echo $RUSTUP_DIST_SERVER / $env:RUSTUP_DIST_SERVER
maven / pom.xml / BUILD FAILURE / Could not resolveMavencheck ~/.m2/settings.xml or C:\Users\<user>\.m2\settings.xml
gradle / Could not resolve / build.gradleGradlecheck build.gradle / build.gradle.kts or ~/.gradle/init.gradle
brew / Homebrew / FetchingHomebrewecho $HOMEBREW_BOTTLE_DOMAIN
apt / dpkg / E: Failed to fetchapt (Debian/Ubuntu)check /etc/apt/sources.list
yum / dnf / Cannot find a valid baseurlyum/dnf (CentOS/RHEL/Fedora)check /etc/yum.repos.d/
git clone / github.com / RPC failedGitHub acceleratorN/A
huggingface / hf_hub / ConnectionErrorHugging Faceecho $HF_ENDPOINT / $env:HF_ENDPOINT

2. Baseline Sources

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.

pip
ProviderURL
Tsinghua TUNAhttps://pypi.tuna.tsinghua.edu.cn/simple
Aliyunhttps://mirrors.aliyun.com/pypi/simple/
USTChttps://pypi.mirrors.ustc.edu.cn/simple/
Tencenthttps://mirrors.cloud.tencent.com/pypi/simple/
npm / yarn / pnpm
ProviderURL
npmmirrorhttps://registry.npmmirror.com
Huaweihttps://repo.huaweicloud.com/repository/npm/
conda
ProviderURL
Tsinghua TUNAhttps://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
USTChttps://mirrors.ustc.edu.cn/anaconda/pkgs/main
Aliyunhttps://mirrors.aliyun.com/anaconda/pkgs/main
Docker
ProviderURL
1ms.runhttps://docker.1ms.run
xuanyuan.mehttps://docker.xuanyuan.me
DaoCloudhttps://docker.m.daocloud.io
linkedbushttps://docker.linkedbus.com
Go
ProviderURL
goproxy.cnhttps://goproxy.cn
goproxy.iohttps://goproxy.io
Rust
Providercargo registryrustup server
USTCsparse+https://mirrors.ustc.edu.cn/crates.io-index/https://mirrors.ustc.edu.cn/rustup
Tsinghua TUNAsparse+https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/https://mirrors.tuna.tsinghua.edu.cn/rustup
RsProxy.cnsparse+https://rsproxy.cn/crates.io-index/https://rsproxy.cn/rustup
Maven / Gradle
ProviderURL
Aliyun Publichttps://maven.aliyun.com/repository/public
Aliyun Googlehttps://maven.aliyun.com/repository/google
Huaweihttps://repo.huaweicloud.com/repository/maven
Homebrew (macOS / Linuxbrew)
ProviderHOMEBREW_BOTTLE_DOMAIN
Tsinghua TUNAhttps://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles
USTChttps://mirrors.ustc.edu.cn/homebrew-bottles
apt (Debian / Ubuntu)
ProviderBase URL
Tsinghua TUNAhttps://mirrors.tuna.tsinghua.edu.cn
Aliyunhttps://mirrors.aliyun.com
USTChttps://mirrors.ustc.edu.cn
yum / dnf (CentOS / RHEL / Fedora)
ProviderBase URL
Tsinghua TUNAhttps://mirrors.tuna.tsinghua.edu.cn
Aliyunhttps://mirrors.aliyun.com
USTChttps://mirrors.ustc.edu.cn
GitHub Accelerator
ProviderPrefix URL
ghfast.tophttps://ghfast.top/
gh-proxy.comhttps://gh-proxy.com/
ghp.cihttps://ghp.ci/
Hugging Face
ProviderHF_ENDPOINT
hf-mirror.comhttps://hf-mirror.com

3. Search Strategy

Capability gate: This section requires web search. If the agent lacks search capability, skip to Section 5 using only baseline sources.

3.1 Search Query Templates

Replace <YEAR> with current year. Use the agent's available search mechanism. Provide both Chinese and English queries for better coverage:

ToolChinese queryEnglish query
pippip 国内镜像源 <YEAR> 可用pip china mirror source <YEAR> working
npmnpm 国内镜像 registry <YEAR>npm china registry mirror <YEAR>
condaconda 国内镜像源 channels <YEAR>conda china mirror channel <YEAR>
Dockerdocker 镜像加速源 <YEAR> 可用docker registry mirror china <YEAR> working
GoGOPROXY 国内代理 <YEAR>GOPROXY china proxy <YEAR>
Rustcargo crates 国内镜像 <YEAR>cargo crates china mirror <YEAR>
Mavenmaven 国内镜像 仓库地址 <YEAR>maven china mirror repository <YEAR>
Homebrewhomebrew 国内镜像 <YEAR>homebrew china mirror <YEAR>
aptubuntu apt 国内源 <YEAR>ubuntu apt china mirror <YEAR>
yum/dnfcentos yum 国内镜像源 <YEAR>centos yum china mirror <YEAR>
GitHubgithub 加速 代理 镜像站 <YEAR>github proxy accelerator china <YEAR>
HuggingFacehuggingface 国内镜像 下载加速 <YEAR>huggingface china mirror download <YEAR>
3.2 Source Credibility

Prioritize results in this order:

  1. Official mirror site docs (mirrors.tuna.tsinghua.edu.cn/help, developer.aliyun.com/mirror)
  2. Mirror provider's own site/README (goproxy.cn, npmmirror.com)
  3. Recent posts (< 3 months) from reputable tech communities
  4. GitHub repos with > 100 stars that aggregate mirror lists

Reject: undated articles, posts > 6 months old, zero-reply forum threads, unverifiable personal blogs.

3.3 Candidate Extraction Rules

Extracted URLs must:

  • Use HTTPS protocol
  • Belong to known institutions (.edu.cn, major cloud vendors, well-known OSS orgs) OR be cross-referenced in 2+ independent articles
  • Come from articles published within the last 6 months

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.


4. Validation

Every candidate must pass validation before being written to config.

4.1 Universal HTTP Check
bash
# 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"
powershell
# 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: $_" }
4.2 Tool-Specific Validation
ToolCommand / CheckSuccess Criteria
pippip install --dry-run requests -i <URL> --trusted-host <HOST>Would install or already satisfied
npmnpm view lodash version --registry <URL>Returns version number
yarn v1yarn info lodash version --registry <URL>Returns version number
pnpmpnpm view lodash version --registry <URL>Returns version number
condaconda search numpy -c <URL> --override-channelsReturns package list
DockerHTTP GET <URL>/v2/HTTP 401 (auth required = service alive)
GoHTTP GET <URL>/github.com/gin-gonic/gin/@v/listReturns version list
RustHTTP GET the sparse index URLHTTP 200
MavenHTTP GET <URL>/org/apache/commons/commons-lang3/maven-metadata.xmlReturns XML content
HuggingFaceHTTP GET <URL>/api/models?limit=1Returns JSON
4.3 Acceptance Criteria
Response TimeRatingAction
< 3000msExcellentUse this source
3000–10000msAcceptableUse if no faster alternative found
> 10000ms or timeoutUnusableTry next candidate

Selection rule: Test ALL available candidates (baseline + search-discovered), then select the one with the lowest response time that passes validation.

4.4 Batch Validation Scripts

Pre-built scripts in scripts/:

  • scripts/validate.sh — Linux / macOS (bash). Supports --json flag for machine-readable output.
  • scripts/validate.ps1 — Windows (PowerShell)
bash
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
Show full SKILL.md (649 more words)Show less
4.5 Security Notes on Validation

trusted-host warning: Using --trusted-host with 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 require trusted-host.


5. Configuration

Core Principles
  1. Backup first — Always backup the original config file before modifying
  2. Merge, don't overwrite — For JSON configs (Docker daemon.json), read existing content and merge new fields. Never blindly overwrite the entire file
  3. Permanent config — Write to config files, not just CLI flags
  4. Verify after write — Run a test command to confirm the new source works

Detailed configuration templates for each tool are in references/config-templates.md. Below is a quick reference of the key commands.

Quick Reference

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


6. Restore Official Sources

ToolRestore Command
pippip config unset global.index-url
npmnpm config set registry https://registry.npmjs.org
yarn v1yarn config set registry https://registry.yarnpkg.com
yarn v2+yarn config set npmRegistryServer https://registry.yarnpkg.com
pnpmpnpm config set registry https://registry.npmjs.org
condaconda config --remove-key channels
Gogo env -w GOPROXY=https://proxy.golang.org,direct
DockerRemove 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
MavenRemove <mirror> block from settings.xml
Homebrewunset HOMEBREW_BREW_GIT_REMOTE HOMEBREW_CORE_GIT_REMOTE HOMEBREW_BOTTLE_DOMAIN
aptRestore /etc/apt/sources.list from backup, sudo apt update
yum/dnfRestore /etc/yum.repos.d/ from backup, sudo yum makecache
HuggingFaceunset HF_ENDPOINT

7. Notes

  • Docker & GitHub accelerators have the highest churn rate — always validate before configuring
  • If the user has an enterprise Nexus/Artifactory, prefer that over public mirrors
  • WSL 1 and WSL 2 have different network stacks; WSL 2 has its own IP and needs separate Docker/apt config
  • If HTTP_PROXY / HTTPS_PROXY env vars are set, some tools may bypass mirrors and go through the proxy instead
  • On ARM architectures (Apple Silicon, ARM Linux), verify that the mirror hosts packages for your architecture
  • When multiple Python/Node versions coexist (pyenv, nvm, conda envs), config may need to target specific environments rather than global settings
  • Use scripts/validate.sh or scripts/validate.ps1 for periodic health checks

8. Known Unstable Sources

This section is informational. Always validate before use rather than relying solely on this list, which may itself become outdated.

SourceStatus (2026-03)Notes
pypi.douban.com (pip)DeadConnection reset
ghproxy.cc (GitHub)DeadSSL certificate untrusted
mirrors.aliyun.com/goproxy/ (Go)UnstableHomepage 404, module downloads intermittent

9. Cross-Agent Adaptation

Capability Requirements
CapabilityRequired?Used inIf absent
Terminal/shellRequiredSteps 2, 4, 5, 6Cannot function
File read/writeRequiredSteps 5, 6Cannot write config
Web searchOptionalStep 4Use baseline table only (Section 2)
Web fetchOptionalStep 4Use curl / Invoke-WebRequest via terminal
Platform Adaptation

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

Files

SKILL.md and 6 other files (scripts, references) in skills/china-mirror-resolver of LeoYeAI/openclaw-master-skills.

  • SKILL.md
  • CHANGELOG.md
  • CONTRIBUTING.md
  • README.md
  • _meta.json
  • references/config-templates.md
  • scripts/validate.sh

Open the folder on GitHubat commit e5199b5

Compare with similar skills

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.

China Mirror Resolver compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
China Mirror Resolver this skillLeoYeAI/openclaw-master-skills2.2k—~4.6kAutomated safety check: NotesMIT
Tokf Runmpecan/tokf199—~571Automated safety check: PassMIT
Uv WorkflowAedelon/claude-code-blueprint120—~1.2kAutomated safety check: NotesCustom licence
Gating Production DeploysPostHog/posthog40k—~751Automated safety check: PassCustom licence
Devcontainer Devstacklok/toolhive-studio171—~3.8kAutomated safety check: NotesApache-2.0
Flowfile Build and Environment SetupEdwardvaneechoud/Flowfile385—~7.3kAutomated safety check: NotesMIT

Similar skills

  • Tokf Run

    mpecan/tokf

    Compress verbose CLI output with tokf before returning results.

    199 GitHub stars~571 tokensUpdated today
    DevOps & CloudAuto-check passed
  • Uv Workflow

    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.

    120 GitHub stars~1.2k tokensUpdated 7 mo ago
    DevOps & CloudAuto-check: notes
  • Official

    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…

    40k GitHub stars~751 tokensUpdated today
    DevOps & CloudAuto-check passed
  • Devcontainer Dev

    stacklok/toolhive-studio

    Spin up and interact with ToolHive Studio's containerized dev environment (Xvfb + noVNC + DinD).

    171 GitHub stars~3.8k tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Flowfile Build and Environment Setup

    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.

    385 GitHub stars~7.3k tokensUpdated today
    DevelopmentAuto-check: notes
  • Shopsys Commands

    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.

    350 GitHub stars~1.3k tokensUpdated yesterday
    DevOps & CloudAuto-check: notes

More from LeoYeAI/openclaw-master-skills

All 1,235 skills in this repo
  • DevOps Pipeline Management

    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.

    2.2k GitHub stars~4.2k tokensUpdated 2 mo ago
    Auto-check: notes
  • Feishu Document Collaboration

    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.

    2.2k GitHub stars~2k tokensUpdated 2 mo ago
    Auto-check passed
  • Files Memory System

    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.

    2.2k GitHub stars~3.8k tokensUpdated 2 mo ago
    Auto-check passed
  • GEO-Claw AI Visibility Agent

    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.

    2.2k GitHub stars~4.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Google Workspace CLI

    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.

    2.2k GitHub stars~2.6k tokensUpdated 2 mo ago
    Auto-check: notes
  • HealthFit Health Advisors

    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.

    2.2k GitHub stars~4.4k tokensUpdated 2 mo ago
    Auto-check passed

Questions about China Mirror Resolver

What does China Mirror Resolver do?

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.

When should I use China Mirror Resolver?

China Mirror Resolver fits situations like: connection refused; pip install failed.

How do I install China Mirror Resolver in Claude Code?

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.

How do I install China Mirror Resolver in Codex?

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.

Can I use China Mirror Resolver in Cursor, Gemini CLI or GitHub Copilot?

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.

What does China Mirror Resolver need to run?

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). .

Does China Mirror Resolver access the network?

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.

Is China Mirror Resolver safe to install?

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.

What licence does China Mirror Resolver use?

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.

How many tokens does China Mirror Resolver use?

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.

What are the alternatives to China Mirror Resolver?

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.

Who maintains China Mirror Resolver?

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.