clash-meta-proxy

更新服务器的 clash-meta 代理配置。

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "clash-meta-proxy" with this command: npx skills add qin2dim/skills/qin2dim-skills-clash-meta-proxy

Clash-Meta 配置更新

更新服务器的 clash-meta 代理配置。

环境信息

  • 默认工作目录: ./

  • 现配置文件: config.yaml

  • 新代理配置: .proxies.yaml

使用脚本自动化(推荐)

提供 PEP 723 内联元数据脚本,支持 uv run 直接运行,无需手动安装依赖。

运行方式

方式一:直接运行(推荐)

In the work_dir

uv run scripts/update_clash_config.py

方式二:指定工作目录运行

uv run --cwd ./ scripts/update_clash_config.py

脚本自动完成:

  • 文件备份(config.yaml.bak
  • 时间戳备份 + config.yaml.editing )
  • 读取 .proxies.yaml 并完整覆盖 proxies

  • 核验 proxy-groups ,注释失效代理

  • 生成 diff 到控制台和 .update.diff

人工确认与生效(关键步骤)

脚本不会自动重命名文件,需人工确认后执行:

  • 检查 diff 输出

cat ./.update.diff

  • 确认无误后生效

mv ./config.yaml.editing ./config.yaml

手动操作流程

若脚本无法使用,按以下步骤手动操作:

备份配置

  • 复制 config.yaml 为 config.yaml.bak

  • 复制 config.yaml 为 config.yaml.editing

更新 proxies 配置

  • 读取 .proxies.yaml 获取新代理节点

  • 用新代理列表完整覆盖 config.yaml.editing 中的 proxies 字段

核验 proxy-groups

  • 检查 proxy-groups[*].proxies 引用的 name 是否存在于 proxies 列表

  • 若发现失效代理,注释掉而非删除

diff 确认并重命名

  • 执行 diff config.yaml.bak config.yaml.editing 对比

  • 确认无误后,将 config.yaml.editing 重命名为 config.yaml

配置示例

.proxies.yaml 结构

proxies:

  • name: hy2.node.proxychain.top type: hysteria2 server: IP port: PORT password: PASSWORD sni: hy2.node.proxychain.top skip-cert-verify: false

proxy-groups 结构

proxy-groups:

  • name: G-SELECT type: select proxies:

    - 失效节点名 # 已失效,需注释

    • hy2.node.proxychain.top # 有效节点

注意事项

  • proxy-groups[].proxies 引用的 name 必须与 proxies[].name 严格对应

  • 仅注释失效代理名,保留配置结构完整

  • 始终保留 config.yaml.bak 以便回滚

  • 最终重命名操作必须由人工确认后执行

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

OpenClaw Skill Growth

Make OpenClaw Skills observable, diagnosable, and safely improvable over time. Use this when the user wants to maintain many SKILL.md files, inspect repeated...

Registry SourceRecently Updated
111Profile unavailable
General

Find Skills for ClawHub

Search for and discover OpenClaw skills from ClawHub (the official skill registry). Activate when user asks about finding skills, installing skills, or wants...

Registry SourceRecently Updated
2851Profile unavailable
General

Skill Listing Polisher

Improve a skill's public listing before publish. Use when tightening title, description, tags, changelog, and scan-friendly packaging so the listing looks cl...

Registry SourceRecently Updated
1130Profile unavailable
General

Skill Priority Setup

Scans installed skills, suggests L0-L3 priority tiers, and auto-configures skill injection policy. Use when: setting up skill priorities, optimizing token bu...

Registry SourceRecently Updated
2510Profile unavailable