mthds-install
Install MTHDS method packages
Install method packages from GitHub or local directories using the mthds-agent CLI.
Process
Step 0 — CLI Check (mandatory, do this FIRST)
Run mthds-agent --version. The minimum required version is 0.1.2 (declared in this skill's front matter as min_mthds_version).
- If the command is not found: STOP. Do not proceed. Tell the user:
The
mthds-agentCLI is required but not installed. Install it with:npm install -g mthdsThen re-run this skill.
- If the version is below 0.1.2: STOP. Do not proceed. Tell the user:
This skill requires
mthds-agentversion 0.1.2 or higher (found X.Y.Z). Upgrade with:npm install -g mthds@latestThen re-run this skill.
- If the version is 0.1.2 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 — use
/pipelex-setupwhen you're ready.
Step 1: Identify the Source
Determine where the method package lives:
| Source | Syntax | Example |
|---|---|---|
| GitHub (short) | org/repo |
mthds-ai/contract-analysis |
| GitHub (full URL) | https://github.com/org/repo |
https://github.com/mthds-ai/contract-analysis |
| Local directory | --local <path> |
--local ./my-methods/ |
If the user provides a GitHub URL or org/repo string, use it as the address argument. If they point to a local directory, use --local.
Step 2: Choose Install Parameters
| Flag | Required | Values | Description |
|---|---|---|---|
--agent |
Yes | claude-code, cursor, codex |
AI agent to install for |
--location |
Yes | local, global |
local = project .claude/methods/, global = ~/.claude/methods/ |
--method <name> |
No | method name | Install only one method from a multi-method package |
--skills |
No | — | Also install the MTHDS skills plugin |
--no-runner |
No | — | Skip automatic Pipelex runtime installation |
Defaults:
- Use
--agent claude-code(since this skill runs inside Claude Code) - Use
--location localunless the user explicitly asks for global install
Step 3: Run the Install
From GitHub:
mthds-agent install <org/repo> --agent claude-code --location local
From a local directory:
mthds-agent install --local <path> --agent claude-code --location local
Install a specific method from a multi-method package:
mthds-agent install <org/repo> --agent claude-code --location local --method <name>
Install with skills plugin:
mthds-agent install <org/repo> --agent claude-code --location local --skills
Step 4: Present Results
On success, the CLI returns 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
~/.mthds/binto PATH if not already present - If skills were installed, mention they are now available
Step 5: Handle Errors
When encountering errors, re-run with --log-level debug for additional context:
mthds-agent --log-level debug install <org/repo> --agent claude-code --location local
Common errors:
| Error | Cause | Fix |
|---|---|---|
--agent is required |
Missing --agent flag |
Add --agent claude-code |
--location is required |
Missing --location flag |
Add --location local or --location global |
Unknown agent |
Invalid agent ID | Use one of: claude-code, cursor, codex |
Failed to resolve methods |
GitHub repo not found or no methods in repo | Verify the address and that the repo contains METHODS.toml |
Method "X" not found |
--method filter doesn't match any method in the package |
Check available method names in the package |
Failed to install pipelex runtime |
Runtime install failed (network, permissions) | Retry, or use --no-runner to skip runtime install |
For all error types and recovery strategies, see Error Handling Reference.
Reference
- Error Handling — read when CLI returns an error to determine recovery
- MTHDS Agent Guide — read for CLI command syntax or output format details
More from mthds-ai/skills
mthds-edit
Edit existing MTHDS bundles (.mthds files). Use when user says "change this pipe", "update the prompt", "rename this concept", "add a step", "remove this pipe", "modify the workflow", "modify the method", "refactor this pipeline", or wants any modification to an existing .mthds file. Supports automatic mode for clear changes and interactive mode for complex modifications.
25mthds-build
Build new AI method from scratch using the MTHDS standard (.mthds bundle files). Use when user says "create a pipeline", "build a workflow", "new .mthds file", "make a method", "design a pipe", or wants to create any new method from scratch. Guides the user through a 10-phase construction process.
25mthds-explain
Explain and document MTHDS bundles. Use when user says "what does this pipeline do?", "explain this workflow", "explain this method", "walk me through this .mthds file", "describe the flow", "document this pipeline", "how does this work?", or wants to understand an existing MTHDS method bundle.
25mthds-inputs
Prepare inputs for MTHDS methods. Use when user says "prepare inputs", "create inputs", "use my files", "generate test data", "template", "synthesize inputs", "mock inputs", "I have a PDF/image/document to use", "make sample data", or wants to create inputs.json for running a .mthds pipeline. Handles user-provided files, synthetic data generation, placeholder templates, and mixed approaches. Defaults to automatic mode.
24mthds-pkg
Manage MTHDS packages — initialize, configure exports, list, and validate. Use when user says "init package", "set up METHODS.toml", "manage packages", "mthds init", "validate package", "list package", or wants to manage MTHDS package manifests.
24mthds-fix
Fix issues in MTHDS bundles. Use when user says "fix this workflow", "fix this method", "repair validation errors", "the pipeline is broken", "fix the .mthds file", after /mthds-check found issues, or when validation reports errors. Automatically applies fixes and re-validates in a loop.
24