mirror-optimizer

Detect and optimize image mirror configurations for Docker and package managers.

47|8|Updated Jan 3, 2026
One-click install
npx skills add https://github.com/huangwb8/skills --skill mirror-optimizer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mirror-optimizer
Source: https://github.com/huangwb8/skills/tree/main/awesome-code/agents/mirror-optimizer
Command: npx skills add https://github.com/huangwb8/skills --skill mirror-optimizer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

该技能自动检测并优化镜像源配置,以在国内网络环境下加速部署并避免因镜像源慢速造成的失败。

Core Features & Use Cases

  • 自动识别项目中使用的包管理器和镜像源配置,并生成对应的国内镜像源配置。
  • 为 Docker、Python、Node.js、Go、Java、Ruby、Rust 等生态系统生成标准化的国内镜像源配置文件和切换方案。
  • 提供一键切换官方源的回滚能力,并在 CI/CD 流程中给出可复用的集成方案。
  • 典型用例:在含有 Dockerfile 与 package.json 的仓库中,自动产出 Dockerfile.mirror、.npmrc、pip.conf、go env 等配置并给出验证步骤。

Quick Start

Run mirror-optimizer at the project root to auto-detect package managers and generate domestic mirror configurations.

Frequently Asked Questions about mirror-optimizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure domestic image mirrors to speed up Docker and package manager deployments?

To speed up deployments, configure domestic image mirrors for Docker, Python, Node.js, Go, Java, Ruby, and Rust. This automates mirror detection and generates standardized configuration files to prevent slow deployment failures.

What is the best way to switch package manager mirrors for a project using Dockerfile and package.json?

The best way to switch package manager mirrors is to run an optimizer at the project root. It auto-detects configurations and generates Dockerfile.mirror, .npmrc, pip.conf, and go env files with validation steps.

Can I roll back to official package manager sources after applying mirror optimizations?

Yes, you can roll back to official package manager sources after applying mirror optimizations. The process provides a one-click switching capability to revert domestic mirror configurations back to their original official sources.

How do I integrate image mirror configurations into my CI/CD pipelines?

You integrate image mirror configurations into CI/CD pipelines by applying generated standardized mirror setup files. The optimizer provides reusable integration solutions and guardrails to prevent deployment before proper mirror configuration is validated.

Does mirror optimization support Java and Ruby ecosystems alongside Node.js and Python?

Yes, mirror optimization supports Java and Ruby ecosystems alongside Node.js, Python, Go, and Rust. It detects the specific package managers used and generates corresponding domestic mirror configurations across these languages.