mthds-install
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseInstall MTHDS method packages
安装MTHDS方法包
Install method packages from GitHub or local directories using the CLI.
mthds-agent使用 CLI从GitHub或本地目录安装方法包。
mthds-agentProcess
操作流程
Step 0 — CLI Check (mandatory, do this FIRST)
步骤0 — CLI检查(必须优先执行)
Run . The minimum required version is 0.0.13 (declared in this skill's front matter as ).
mthds-agent --versionmin_mthds_version- If the command is not found: STOP. Do not proceed. Tell the user:
TheCLI is required but not installed. Install it with:mthds-agentnpm install -g mthdsThen re-run this skill.
- If the version is below 0.0.13: STOP. Do not proceed. Tell the user:
This skill requiresversion 0.0.13 or higher (found X.Y.Z). Upgrade with:mthds-agentnpm install -g mthds@latestThen re-run this skill.
- If the version is 0.0.13 or higher: proceed to the next step.
Do not attempt manual installation. The CLI handles resolution, file placement, shim generation, and runtime setup.
No backend setup needed: This skill works without configuring inference backends or API keys. You can start building/validating methods right away. Backend configuration is only needed to run methods with live inference — usewhen you're ready./pipelex-setup
运行命令,最低要求版本为0.0.13(已在本skill的前置信息中声明为)。
mthds-agent --versionmin_mthds_version- 如果找不到该命令:立即停止操作,告知用户:
需使用CLI但尚未安装,请通过以下命令安装:mthds-agentnpm install -g mthds安装完成后重新运行本skill。
- 如果版本低于0.0.13:立即停止操作,告知用户:
本skill要求版本为0.0.13或更高(当前版本为X.Y.Z),请通过以下命令升级:mthds-agentnpm install -g mthds@latest升级完成后重新运行本skill。
- 如果版本为0.0.13或更高:继续执行下一步。
请勿尝试手动安装,CLI会自动处理依赖解析、文件放置、shim生成和运行时配置。
无需后端配置:本skill无需配置推理后端或API密钥,你可以立即开始构建/验证方法。只有在需要使用实时推理运行方法时才需要配置后端,准备就绪后可使用命令配置。/pipelex-setup
Step 1: Identify the Source
步骤1:确认安装源
Determine where the method package lives:
| Source | Syntax | Example |
|---|---|---|
| GitHub (short) | | |
| GitHub (full URL) | | |
| Local directory | | |
If the user provides a GitHub URL or string, use it as the address argument. If they point to a local directory, use .
org/repo--local确认方法包的存储位置:
| 来源 | 语法 | 示例 |
|---|---|---|
| GitHub(简写) | | |
| GitHub(完整URL) | | |
| 本地目录 | | |
如果用户提供了GitHub URL或格式的字符串,直接将其作为地址参数。如果用户指向本地目录,则使用参数。
org/repo--localStep 2: Choose Install Parameters
步骤2:选择安装参数
| Flag | Required | Values | Description |
|---|---|---|---|
| Yes | | AI agent to install for |
| Yes | | |
| No | method name | Install only one method from a multi-method package |
| No | — | Also install the MTHDS skills plugin |
| No | — | Skip automatic Pipelex runtime installation |
Defaults:
- Use (since this skill runs inside Claude Code)
--agent claude-code - Use unless the user explicitly asks for global install
--location local
| 参数 | 是否必填 | 可选值 | 说明 |
|---|---|---|---|
| 是 | | 要为其安装方法包的AI agent |
| 是 | | |
| 否 | 方法名称 | 从包含多个方法的包中仅安装指定的单个方法 |
| 否 | — | 同时安装MTHDS skills插件 |
| 否 | — | 跳过自动安装Pipelex运行时 |
默认值:
- 默认使用(因为本skill运行在Claude Code中)
--agent claude-code - 默认使用,除非用户明确要求全局安装
--location local
Step 3: Run the Install
步骤3:执行安装
From GitHub:
bash
mthds-agent install <org/repo> --agent claude-code --location localFrom a local directory:
bash
mthds-agent install --local <path> --agent claude-code --location localInstall a specific method from a multi-method package:
bash
mthds-agent install <org/repo> --agent claude-code --location local --method <name>Install with skills plugin:
bash
mthds-agent install <org/repo> --agent claude-code --location local --skills从GitHub安装:
bash
mthds-agent install <org/repo> --agent claude-code --location local从本地目录安装:
bash
mthds-agent install --local <path> --agent claude-code --location local从包含多个方法的包中安装指定方法:
bash
mthds-agent install <org/repo> --agent claude-code --location local --method <name>同时安装skills插件:
bash
mthds-agent install <org/repo> --agent claude-code --location local --skillsStep 4: Present Results
步骤4:展示安装结果
On success, the CLI returns JSON:
json
{
"success": true,
"installed_methods": ["method-name"],
"location": "local",
"target_dir": "/path/to/.claude/methods",
"installed_skills": [],
"shim_dir": "~/.mthds/bin",
"shims_generated": ["method-name"]
}Present to the user:
- Which methods were installed and where ()
target_dir - If CLI shims were generated, note the shim directory and advise adding to PATH if not already present
~/.mthds/bin - If skills were installed, mention they are now available
安装成功时,CLI会返回如下JSON格式内容:
json
{
"success": true,
"installed_methods": ["method-name"],
"location": "local",
"target_dir": "/path/to/.claude/methods",
"installed_skills": [],
"shim_dir": "~/.mthds/bin",
"shims_generated": ["method-name"]
}向用户告知以下信息:
- 安装了哪些方法,以及安装位置()
target_dir - 如果生成了CLI shim,说明shim的存储目录,建议如果还未加入PATH则添加进去
~/.mthds/bin - 如果安装了skills,说明skills现在已经可用
Step 5: Handle Errors
步骤5:错误处理
When encountering errors, re-run with for additional context:
--log-level debugbash
mthds-agent --log-level debug install <org/repo> --agent claude-code --location localCommon errors:
| Error | Cause | Fix |
|---|---|---|
| Missing | Add |
| Missing | Add |
| Invalid agent ID | Use one of: |
| GitHub repo not found or no methods in repo | Verify the address and that the repo contains METHODS.toml |
| | Check available method names in the package |
| Runtime install failed (network, permissions) | Retry, or use |
For all error types and recovery strategies, see Error Handling Reference.
遇到错误时,添加参数重新运行命令以获取更多上下文信息:
--log-level debugbash
mthds-agent --log-level debug install <org/repo> --agent claude-code --location local常见错误:
| 错误信息 | 原因 | 解决方案 |
|---|---|---|
| 缺少 | 添加 |
| 缺少 | 添加 |
| 无效的agent ID | 使用以下可选值之一: |
| 找不到GitHub仓库,或仓库中没有方法 | 验证地址是否正确,且仓库中包含METHODS.toml文件 |
| | 检查包中可用的方法名称 |
| 运行时安装失败(网络、权限问题) | 重试,或使用 |
完整的错误类型和修复策略请参考错误处理参考。
Reference
参考资料
- Error Handling — read when CLI returns an error to determine recovery
- MTHDS Agent Guide — read for CLI command syntax or output format details
- 错误处理 — CLI返回错误时查阅以确定修复方案
- MTHDS Agent指南 — 查阅CLI命令语法或输出格式的详细说明