Token导航 LogoToken导航

Agent Skill · 效率

china-mirrors(中国镜子)

china-mirrors 用于辅助 Python 项目开发、测试和数据处理,适合在 OpenClaw 中需要阅读 Python 代码、运行测试或整理脚本流程时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

china-mirrors 是效率类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为执行命令;许可证为 MIT-0,第三方扫描已通过,按安装量在效率类的 21,003 个 Skill 里排第 12,497。

总安装 4,113周安装 168GitHub Stars 公开资料未说明下载 1,331核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.2.1

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:china-mirrors(中国镜子)
来源仓库:https://github.com/normdist-ai/china-mirrors
安装命令:
openclaw skills install china-mirrors
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install china-mirrors

这个 Skill 是做什么的

效率类 Skill 把重复的整理、汇总、转换工作交给助手完成,减少手工复制粘贴。

china-mirrors 自动为多种包管理器配置国内镜像源以加速下载。适合在中国大陆开发且遇到依赖安装慢问题时启用。支持 pip、npm、yarn、pnpm、cargo、go mod 等多种工具链。使用前需确认是否具备修改全局配置文件的权限。建议查看原始文档了解具体服务商(如阿里云、腾讯云)的可用性。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install china-mirrors;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

china-mirrors 怎么安装?

在终端执行 openclaw skills install china-mirrors。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

china-mirrors 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

china-mirrors 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 openclaw skills install china-mirrors 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

china-mirrors 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

china-mirrors 用的人多吗?

公开数据是累计安装 4,113 次,近一周安装 168 次,下载 1,331 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

china-mirrors 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理效率类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

效率类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
github

GitHub 代码协作 · OpenClaw

7,632,918545需要联网MIT-0通过
nano-pdf

Nano PDF 文档 · OpenClaw

4,249,476231需要联网MIT-0通过
auto-updater

自动更新程序 · OpenClaw

2,964,063386操作浏览器MIT-0通过
video-frames

视频帧 · OpenClaw

2,621,304112需要联网MIT-0通过
gemini

Gemini 助手 · OpenClaw

2,547,39648需要联网MIT-0有提醒
china-mirrors

中国镜子 · 本页

4,113—执行命令MIT-0通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
china-mirrors
description
自动配置 Python pip、npm、yarn、pnpm、cargo、go mod、NuGet、RubyGems、Conda、Homebrew、Gradle 等包管理器的国内镜像源。使用当用户提到下载慢、安装依赖、配置镜像、加速包下载、设置国内源,或在中国大陆开发需要加速依赖安装时。支持阿里云、腾讯云、清华大学、中科大、华为云等主流镜像。检测到 package.json、requirements.txt、Cargo.toml、go.mod、Gemfile、.nuspec、environment.yml 等文件时主动建议使用此技能。
version
2.0.0
type
SKILL
license
MIT
author
normdist-ai

中国国内镜像源配置技能(Agent 自执行版)

核心设计理念:本技能不附带任何预置脚本。Agent 应根据本文档的指导,直接在用户计算机上编写并执行配置命令,实现镜像源配置功能。

工作流程(Agent 必须遵循)

Phase 1: 需求检测与环境分析

当触发本技能时,Agent 按以下步骤操作:

1.1 触发条件识别

  • 用户明确提及:下载慢、安装依赖慢、配置镜像、加速下载、设置国内源
  • 检测到项目包含依赖文件:package.json、requirements.txt、Cargo.toml、go.mod、Gemfile、.nuspec、environment.yml、build.gradle、pom.xml、composer.json

1.2 与用户确认

询问内容:
1. 需要配置哪些包管理器?(如未指定,根据项目依赖文件自动判断)
2. 有偏好的镜像源吗?(默认推荐阿里云或华为云)
3. 配置范围:全局配置 or 项目级配置?

1.3 环境检测命令 Agent 执行以下命令检测已安装的工具:

# Windows PowerShell 检测
python --version 2>$null; node --version 2>$null; npm --version 2>$null
cargo --version 2>$null; go version 2>$null; dotnet --version 2>$null
ruby --version 2>$null; conda --version 2>$null; gradle --version 2>$null
brew --version 2>$null
# Linux/Mac Bash 检测
for cmd in python node npm cargo go dotnet ruby conda gradle brew; do
    $cmd --version 2>/dev/null && echo "✓ $cmd available"
done

Phase 2: 选择镜像源

根据下表为用户选择最优镜像。标记 ⭐ 的为当前推荐。

包管理器推荐镜像URL备选1备选2
pip (Python)阿里云 ⭐https://mirrors.aliyun.com/pypi/simple/清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/腾讯云 https://mirrors.cloud.tencent.com/pypi/simple/
npm/yarn/pnpm华为云 ⭐https://repo.huaweicloud.com/repository/npm/阿里云 https://registry.npmmirror.com腾讯云 https://mirrors.cloud.tencent.com/npm/
cargo (Rust)阿里云 ⭐https://mirrors.aliyun.com/crates.io-index/清华大学 https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/中科大 https://mirrors.ustc.edu.cn/crates.io-index/
go mod (Go)阿里云 ⭐https://mirrors.aliyun.com/goproxy/七牛云 https://goproxy.cn官方中国 https://goproxy.io
Maven (Java)阿里云 ⭐https://maven.aliyun.com/repository/public--
Gradle (Java/Kotlin)腾讯云 ⭐https://mirrors.cloud.tencent.com/gradle/阿里云 https://maven.aliyun.com/repository/gradle-plugin/-
NuGet (.NET)华为云 ⭐https://repo.huaweicloud.com/repository/nuget/v3/index.json清华大学 https://mirrors.tuna.tsinghua.edu.cn/nuget/v3/index.json-
RubyGems (Ruby)清华大学 ⭐https://mirrors.tuna.tsinghua.edu.cn/rubygems/中科大 https://mirrors.ustc.edu.cn/rubygems/-
Conda (Python)清华大学 ⭐https://mirrors.tuna.tsinghua.edu.cn/anaconda/中科大 https://mirrors.ustc.edu.cn/anaconda/-
Homebrew (macOS)中科大 ⭐https://mirrors.ustc.edu.cn/homebrew-bottles/清华大学 https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/-
Composer (PHP)阿里云 ⭐https://mirrors.aliyun.com/composer/--

Phase 3: 执行配置(Agent 直接运行命令)

重要:Agent 根据用户选择的包管理器和镜像,直接在终端执行以下对应命令。 不要创建临时脚本文件,直接使用原生命令或 Shell 命令完成配置。
3.1 Python pip 配置

Windows 全局配置:

New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\pip"
Set-Content -Path "$env:USERPROFILE\pip\pip.ini" -Value @"
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
trusted-host = mirrors.aliyun.com

[install]
trusted-host = mirrors.aliyun.com
"@ -Encoding UTF8
Write-Host "✓ pip 已配置为阿里云镜像"

Linux/Mac 全局配置:

mkdir -p ~/.pip
cat > ~/.pip/pip.conf << 'EOF'
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
trusted-host = mirrors.aliyun.com

[install]
trusted-host = mirrors.aliyun.com
EOF
echo "✓ pip 已配置为阿里云镜像"

项目级配置(在项目根目录):

# 创建 .piprc 或 setup.cfg
cat > pip.conf << 'EOF'
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
trusted-host = mirrors.aliyun.com
EOF
echo "✓ pip 项目级配置已完成"

验证:

pip config list

3.2 Node.js npm/yarn/pnpm 配置

全局配置:

# npm
npm config set registry https://registry.npmmirror.com

# yarn(如已安装)
yarn config set registry https://registry.npmmirror.com 2>/dev/null || true

# pnpm(如已安装)
pnpm config set registry https://registry.npmmirror.com 2>/dev/null || true

echo "✓ Node.js 包管理器已配置"

项目级配置(创建 .npmrc):

echo "registry=https://registry.npmmirror.com" > .npmrc
echo "✓ npm 项目级配置已完成"

验证:

npm config get registry

3.3 Rust cargo 配置

全局配置:

mkdir -p ~/.cargo
cat > ~/.cargo/config.toml << 'EOF'
[source.crates-io]
replace-with = 'aliyun'

[source.aliyun]
registry = "https://mirrors.aliyun.com/crates.io-index/"
EOF
echo "✓ cargo 已配置为阿里云镜像"

验证:

cat ~/.cargo/config.toml

3.4 Go mod 配置

Windows PowerShell:

[Environment]::SetEnvironmentVariable("GOPROXY", "https://mirrors.aliyun.com/goproxy/,direct", "User")
$env:GOPROXY = "https://mirrors.aliyun.com/goproxy/,direct"
Write-Host "✓ Go GOPROXY 已配置"

Linux/Mac:

echo 'export GOPROXY=https://mirrors.aliyun.com/goproxy/,direct' >> ~/.bashrc
export GOPROXY=https://mirrors.aliyun.com/goproxy/,direct
echo "✓ Go GOPROXY 已配置"

验证:

go env GOPROXY

3.5 NuGet (.NET) 配置

Windows:

$nugetPath = "$env:APPDATA\NuGet"
New-Item -ItemType Directory -Force -Path $nugetPath
Set-Content -Path "$nugetPath\NuGet.Config" -Value @"
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <clear />
    <add key="huawei" value="https://repo.huaweicloud.com/repository/nuget/v3/index.json" />
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
  </packageSources>
</configuration>
"@ -Encoding UTF8
Write-Host "✓ NuGet 已配置为华为云镜像"

Linux/Mac:

mkdir -p ~/.nuget
cat > ~/.nuget/NuGet.Config << 'EOF'
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <clear />
    <add key="huawei" value="https://repo.huaweicloud.com/repository/nuget/v3/index.json" />
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
  </packageSources>
</configuration>
EOF
echo "✓ NuGet 已配置为华为云镜像"

验证:

dotnet nuget list source

3.6 RubyGems 配置

全局配置:

gem sources --remove https://rubygems.org/ 2>/dev/null || true
gem sources -a https://mirrors.tuna.tsinghua.edu.cn/rubygems/
echo "✓ RubyGems 已配置为清华镜像"

Bundler 项目级配置:

bundle config mirror.https://rubygems.org https://mirrors.tuna.tsinghua.edu.cn/rubygems/
echo "✓ Bundler 镜像已配置"

验证:

gem sources -l

3.7 Conda 配置
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --set show_channel_urls yes
echo "✓ Conda 已配置为清华镜像"

验证:

conda config --show channels

3.8 Maven 配置
mkdir -p ~/.m2
cat > ~/.m2/settings.xml << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<settings>
  <mirrors>
    <mirror>
      <id>aliyun</id>
      <mirrorOf>central</mirrorOf>
      <name>Aliyun Maven</name>
      <url>https://maven.aliyun.com/repository/public</url>
    </mirror>
  </mirrors>
</settings>
EOF
echo "✓ Maven 已配置为阿里云镜像"

3.9 Gradle 配置

方式一:环境变量

# 添加到 init.gradle 或环境变量
echo 'GRADLE_USER_HOME=~/.gradle' >> ~/.bashrc
mkdir -p ~/.gradle/init.d
cat > ~/.gradle/init.d/mirror.init.gradle << 'EOF'
allprojects {
    repositories {
        all { ArtifactRepository repo ->
            if (repo instanceof MavenArtifactRepository) {
                def url = repo.url.toString()
                if (url.startsWith("https://repo.maven.apache.org/maven2") ||
                    url.startsWith("https://jcenter.bintray.com")) {
                    project.logger.lifecycle "Repository ${repo.url} replaced with Tencent mirror."
                    remove repo
                }
            }
        }
        maven { url 'https://mirrors.cloud.tencent.com/nexus/repository/maven-public/' }
        maven { url 'https://maven.aliyun.com/repository/public' }
        mavenCentral()
    }
}
EOF
echo "✓ Gradle 已配置"

方式二:项目级 settings.gradle

dependencyResolutionManagement {
    repositories {
        maven { url = uri('https://mirrors.cloud.tencent.com/gradle/') }
        mavenCentral()
    }
}

3.10 Homebrew 配置 (macOS)
export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
echo "✓ Homebrew 已配置为中科大镜像"

3.11 Composer 配置 (PHP)
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
echo "✓ Composer 已配置为阿里云镜像"

Phase 4: 验证与反馈

4.1 执行验证命令

配置完成后,Agent 自动运行对应的验证命令(见各小节末尾),并向用户展示结果。

4.2 向用户报告

报告格式示例:
─────────────────────────────────────
✅ 配置完成!已为您配置以下镜像源:

  • pip (Python)     → 阿里云 ⚡ 0.02s
  • npm (Node.js)    → 华为云 ⚡ 0.04s  
  • cargo (Rust)     → 阿里云 ⚡ 0.05s

📋 下次操作建议:
  • 运行 pip install / npm install 测试速度
  • 如需恢复默认配置,请告知我
─────────────────────────────────────

常见问题处理(Agent 参考)

问题解决方案
配置后仍然慢清除缓存:pip cache purge / npm cache clean --force
SSL 证书错误添加 trusted-host 配置(已在上述命令中包含)
权限不足使用用户级配置(非系统级),避免 sudo
想恢复默认删除对应配置文件或执行:npm config delete registry / unset GOPROXY
特定项目需要不同镜像使用项目级配置(.npmrc / .piprc / .cargo/config.toml)

恢复默认配置命令速查

包管理器恢复命令
piprm -f ~/.pip/pip.conf 或 del %USERPROFILE%\pip\pip.ini
npmnpm config delete registry
yarnyarn config delete registry
pnpmpnpm config delete registry
cargorm -f ~/.cargo/config.toml
Gounset GOPROXY 并从 shell 配置文件中删除
NuGet删除 %APPDATA%\NuGet\NuGet.Config
RubyGemsgem sources --remove <mirror-url> 并添加回 https://rubygems.org/
Condaconda config --remove channels <mirror-url>
Homebrewunset HOMEBREW_BOTTLE_DOMAIN

Agent 执行规范

  1. 直接执行:不要创建脚本文件,直接运行 Shell 命令
  2. 幂等性:配置命令可重复执行,不会产生副作用
  3. 用户确认:修改前简要告知用户将要做什么
  4. 错误处理:如果某个工具未安装,跳过并告知用户
  5. 平台适配:自动检测操作系统,选择正确的命令格式(PowerShell vs Bash)

平台分布

OpenClaw

74.6%
按下载量换算993

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 openclaw skills install china-mirrors 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills