Skip to content
Back to skills

Zh

ASecurity

ModelSwap 随安装包附带一个纯 Markdown 的 **Agent Skill**:教会 Claude Code、Codex、OpenCode 等 AI 编程 Agent 使用 CLI——用机器可读输出检查状态、非交互式切换模型,并严格遵守密钥相关的安全边界。

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 19, 2026
developmentbash

Works with

  • claude code
  • cli

Security analysis

A100/100

Pro scans all 17 files and shows the line behind each finding

Scanned September 19, 2026

npx -y skills add Cing-self/modelswap --skill zh --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Zh?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Zh
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/cing-self-modelswap-modelswap/badge)](https://www.skillsdirectory.com/skills/cing-self-modelswap-modelswap)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# 10. 让 AI Agent 驱动 ModelSwap(Skill)

ModelSwap 随安装包附带一个纯 Markdown 的 **Agent Skill**:教会 Claude Code、Codex、OpenCode 等 AI 编程 Agent 使用 CLI——用机器可读输出检查状态、非交互式切换模型,并严格遵守密钥相关的安全边界。

## 10.1 定位并安装

```bash
modelswap skill path                      # 输出内置 Skill 文件位置
modelswap skill install /path/to/project  # 写入 .agents/skills/modelswap/SKILL.md
```

也可以直接从公开仓库获取:

```bash
npx skills add Cing-self/modelswap --skill modelswap
```

## 10.2 它能做什么

- **检查状态**:`modelswap provider current --json`、`provider list --json`、`provider auth --json`、`vault list --json`——均为脱敏输出,可安全读取
- **免交互切换**:`modelswap provider use <provider> --agent <agent> --model <model>`——Skill 会要求 Agent 始终显式给出 agent 与 model ID,而不是依赖默认值
- **知道边界在哪**:密钥绝不进入命令行参数或日志(用 `--stdin`);`vault get` / `vault inject` 视为明文泄露,仅当任务确实需要时使用;`vault push` / `pull` 仅在明确要求时执行;`vault delete` 之前必须确认没有别的流程还在引用该密钥

原始命令清单见第 14 章。Skill 是给 Agent 用的——人还是直接用 Web 控制台或 CLI 更方便。

Files in this skill

  • 01-what-is-modelswap.md2.6 KB
  • 02-install.md3.5 KB
  • 03-quickstart.md2.4 KB
  • 04-extension.md2.4 KB
  • 05-auto-create.md2 KB
  • 06-vault.md1.5 KB
  • 07-providers.md2 KB
  • 08-usage.md1.6 KB
  • 09-agents.md3.5 KB
  • 10-agent-skill.md1.4 KB
  • 11-sync.md2.8 KB
  • 12-snapshots.md631 B
  • 13-settings.md975 B
  • 14-cli.md2.3 KB
  • 15-faq.md2.3 KB
  • README.md611 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.