Publish MTHDS methods to mthds.sh. Use when user says "publish this method", "publish to mthds", "publish my methods", "mthds publish", "register my method", or wants to publish a method package to the mthds.sh hub.
Publish method packages to mthds.sh (telemetry tracking). No files are written, no runner is installed — this only registers the method on the hub.
Run mthds-agent --version. The minimum required version is 0.1.3 (declared in this skill's front matter as min_mthds_version).
The
mthds-agentCLI is required but not installed. Install it with:npm install -g mthdsThen re-run this skill.
This skill requires
mthds-agentversion 0.1.3 or higher (found X.Y.Z). Upgrade with:npm install -g mthds@latestThen re-run this skill.
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/ |
From GitHub:
mthds-agent publish <org/repo>
From a local directory:
mthds-agent publish --local <path>
Publish a specific method from a multi-method package:
mthds-agent publish <org/repo> --method <name>
| Flag | Required | Values | Description |
|---|---|---|---|
[address] | Yes* | org/repo | GitHub repo address |
--local <path> | Yes* | directory path | Publish from a local directory |
--method <name> | No | method name | Publish only one method from a multi-method package |
*One of address or --local is required.
On success, the CLI returns JSON:
{
"success": true,
"published_methods": ["method-name"],
"address": "org/repo"
}
Present to the user:
After a successful publish, ask the user if they want to share their methods on social media. If yes, use the /mthds-share skill or run mthds-agent share directly.
Common errors:
| Error | Cause | Fix |
|---|---|---|
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 | Check available method names in the package |
No valid methods to publish | No methods passed validation | Check METHODS.toml in the package |
For all error types and recovery strategies, see Error Handling Reference.