闲社服务运行正常AI智能体自动化平台
c

中国镜像解析器

技能标识:china-mirror-resolver

>

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 2.1.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

中国镜像解析器

China Mirror Resolver

镜像URL经常失效。本技能教给智能体一个自愈工作流:发现→验证→配置最佳可用源。
基准表提供离线备用方案;网络搜索实现自我修复。


执行流程

用户错误/请求
│
▼
1. 识别工具类型(第1节)
│
▼
2. 检测当前源配置
│
▼
3. 尝试该工具的所有基准源(第2节)
用第4节的阈值验证每个源(< 3秒 = 良好,3–10秒 = 可接受)
├─ 至少有一个源 < 10秒 → 选择最快的 → 转到步骤6
└─ 所有源 > 10秒或失败 ↓
▼
4. [如果有搜索能力] 搜索最新源(第3节)
├─ 找到候选源 → 转到步骤5
└─ 未找到候选源 → 向用户报告,并提供基准表作为参考
[如果没有搜索能力] 向用户报告基准源失败,建议手动提供URL
│
▼
5. 验证所有候选源(第4节),选择最快通过的那个
├─ 至少有一个通过 → 转到步骤6
└─ 全部失败 → 向用户报告失败,建议检查网络/代理
│
▼
6. 备份原始配置 → 写入新配置 → 用测试命令验证
│
▼
7. 向用户确认结果(显示旧源 → 新源,响应时间)

优雅降级:如果智能体没有网络搜索能力,跳过步骤4,仅使用基准表。该技能仍然可用,但自愈能力降低。

速度选择:当多个源通过验证时,始终选择响应时间最低的那个。测试所有候选源,而不仅仅是第一个。


1. 诊断表

将错误关键词与工具匹配,然后检查当前配置:

错误关键词工具检测当前源
pip / PyPI / setup.py / No matching distributionpippip 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 → 设置 → Docker Engine |
| go: downloading / GOPROXY / dial tcp | Go | go env GOPROXY |
| cargo / crates.io / Blocking waiting | Rust (cargo) | 检查 ~/.cargo/config.toml (Linux/macOS) 或 %USERPROFILE%\.cargo\config.toml (Win) |
| rustup / could not download | Rust (rustup) | echo $RUSTUPDISTSERVER / $env:RUSTUPDISTSERVER |
| maven / pom.xml / BUILD FAILURE / Could not resolve | Maven | 检查 ~/.m2/settings.xml 或 C:\Users\\.m2\settings.xml |
| gradle / Could not resolve / build.gradle | Gradle | 检查 build.gradle / build.gradle.kts 或 ~/.gradle/init.gradle |
| brew / Homebrew / Fetching | Homebrew | echo $HOMEBREWBOTTLEDOMAIN |
| apt / dpkg / E: Failed to fetch | apt (Debian/Ubuntu) | 检查 /etc/apt/sources.list |
| yum / dnf / Cannot find a valid baseurl | yum/dnf (CentOS/RHEL/Fedora) | 检查 /etc/yum.repos.d/ |
| git clone / github.com / RPC failed | GitHub加速器 | 不适用 |
| huggingface / hfhub / ConnectionError | Hugging Face | echo $HFENDPOINT / $env:HF_ENDPOINT |


2. 基准源

高稳定性机构镜像。优先尝试这些源。如果全部失败或速度过慢(> 10秒),则进入第3节(搜索)。
没有搜索能力的智能体在此处停止。

pip
提供商URL
清华 TUNAhttps://pypi.tuna.tsinghua.edu.cn/simple
阿里云
https://mirrors.aliyun.com/pypi/simple/ |

| 中科大 | https://pypi.mirrors.ustc.edu.cn/simple/ | | 腾讯 | https://mirrors.cloud.tencent.com/pypi/simple/ |

npm / yarn / pnpm
提供商URL
npmmirrorhttps://registry.npmmirror.com
华为
https://repo.huaweicloud.com/repository/npm/ |

conda
提供商URL
清华 TUNAhttps://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
中科大
https://mirrors.ustc.edu.cn/anaconda/pkgs/main |

| 阿里云 | https://mirrors.aliyun.com/anaconda/pkgs/main |

Docker
提供商URL
1ms.runhttps://docker.1ms.run
xuanyuan.me
https://docker.xuanyuan.me |

| DaoCloud | https://docker.m.daocloud.io | | linkedbus | https://docker.linkedbus.com |

Go
提供商URL
goproxy.cnhttps://goproxy.cn
goproxy.io
https://goproxy.io |

Rust
提供商cargo registryrustup server
中科大sparse+https://mirrors.ustc.edu.cn/crates.io-index/https://mirrors.ustc.edu.cn/rustup
清华 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 |

Maven / Gradle
提供商URL
阿里云公共https://maven.aliyun.com/repository/public
阿里云Google
https://maven.aliyun.com/repository/google |

| 华为 | https://repo.huaweicloud.com/repository/maven |

Homebrew (macOS / Linuxbrew)
提供商HOMEBREWBOTTLEDOMAIN
清华 TUNAhttps://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles
中科大
https://mirrors.ustc.edu.cn/homebrew-bottles |

apt (Debian / Ubuntu)
提供商基础URL
清华 TUNAhttps://mirrors.tuna.tsinghua.edu.cn
阿里云
https://mirrors.aliyun.com |

| 中科大 | https://mirrors.ustc.edu.cn |

yum / dnf (CentOS / RHEL / Fedora)
提供商基础URL
清华 TUNAhttps://mirrors.tuna.tsinghua.edu.cn
阿里云
https://mirrors.aliyun.com |

| 中科大 | https://mirrors.ustc.edu.cn |

GitHub加速器
提供商前缀URL
ghfast.tophttps://ghfast.top/
gh-proxy.com
https://gh-proxy.com/ |

| ghp.ci | https://ghp.

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 china-mirror-resolver-1776190755 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 china-mirror-resolver-1776190755 技能

通过命令行安装

skillhub install china-mirror-resolver-1776190755

下载

⬇ 下载 china-mirror-resolver v2.1.0(免费)

文件大小: 18.11 KB | 发布时间: 2026-4-15 13:56

v2.1.0 最新 2026-4-15 13:56
China Mirror Resolver 2.1.0 — Self-healing mirror source selection & configuration for dev tools in mainland China

- Introduced an execution flow that discovers, validates, and configures the fastest domestic mirror for popular developer tools (pip, npm, conda, Docker, Go, Rust, Maven, etc.).
- Added baseline mirror source tables for each supported tool as an offline fallback.
- Integrated error keyword detection and current source diagnostics for rapid troubleshooting.
- Implemented graceful degradation: supports both web search-capable and offline-only environments.
- Expanded documentation, including tool-specific validation and configuration steps, trigger keywords, and agent compatibility details.
返回顶部