X mirror

From x-cmd/skill · View interactive version

X mirror is an AI agent skill from the GitHub repository x-cmd/skill. x-mirror is a comprehensive mirror source management tool for various package managers. Use this skill whenever users need to configure, switch, or query package manager download mirrors. This skill handles: setting up and switching mirrors for package managers (pip, npm, brew, apt, go, cargo, gem,

How to use this skill

Skill file

x mirror - Mirror Source Manager

Prerequisites

  1. Load x-cmd before use:

```bash

. ~/.x-cmd.root/X

```

  1. x-cmd not installed? → data/install.md

Core Functions

Supported Package Managers

System Package Managers

| Command | Description |

|---------|-------------|

| apt | Debian/Ubuntu |

| brew | Homebrew |

| pacman | Arch Linux |

| dnf | Fedora/RHEL |

| yum | CentOS/RHEL |

| apk | Alpine Linux |

Language Package Managers

| Command | Description |

|---------|-------------|

| pip | Python |

| npm | Node.js |

| pnpm | Node.js |

| yarn | Node.js |

| go | Go modules |

| cargo | Rust |

| gem | Ruby |

Container

| Command | Description |

|---------|-------------|

| docker | Docker registry |

Usage Examples

List available mirrors

x mirror npm ls
x mirror pip ls
x mirror brew ls

Set mirror source

x mirror npm set npmmirror    # Set npm to use Alibaba Cloud mirror
x mirror pip set tuna         # Set pip to use Tsinghua mirror
x mirror brew set tuna        # Set brew to use Tsinghua mirror

View current mirror

x mirror npm current
x mirror pip current

Restore default source

x mirror npm unset
x mirror pip unset

Common Scenarios

Get Help

Run x mirror --help or x mirror <subcmd> --help for full documentation.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.