- 📁 scripts/
- 📄 SKILL.md
china-mirror
Main entry point for configuring and diagnosing all development tools in China's network environment. Detects installed tools (pip/uv/poetry, npm/yarn/pnpm, docker, apt, cargo, go, conda, flutter, homebrew), checks for proxy conflicts, and applies appropriate mirror configurations for each. Also provides comprehensive network diagnostics — tests connectivity to official and mirror sources, detects current mirror configuration status, and generates actionable recommendations. This is a self-contained skill — all setup and diagnostic scripts are bundled in the scripts/ subdirectory. Use this skill when the user wants to configure everything at once, is setting up a new development machine in China, or doesn't know which specific tool is slow. Also use when the user says "配置国内镜像", "网络太慢全部配一下", "为什么下载慢", "诊断网络", "diagnose network", or describes a general "slow downloads in China" problem. Use for diagnostics when the user wants to audit their environment, compare mirror speeds, or troubleshoot network issues before applying mirror configurations. For individual tool fixes, still use this skill and run only the relevant script. --- # China Mirror One-stop configuration and diagnostics for all development tools in China. Diagnose first, then apply fixes. All setup scripts are bundled under this skill's `scripts/` directory as resources — they are not loaded into context but invoked via bash. ## Steps **1. Determine SKILL_DIR** All script paths are relative to this skill's directory: ```bash SKILL_DIR="<absolute path to china-mirror>" ``` Use the directory where this SKILL.md resides. **2. Diagnose (if user wants diagnostics or troubleshooting)** If the user wants to diagnose their environment, check what's configured, or understand why things are slow: ```bash bash "$SKILL_DIR/scripts/diagnose.sh" ```