mthds-publish
Publish MTHDS methods to mthds.sh
Publish method packages to mthds.sh (telemetry tracking). No files are written, no runner is installed — this only registers the method on the hub.
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.
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/ |
Step 2: Run the Publish Command
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.
Step 3: Parse the Output
On success, the CLI returns JSON:
{
"success": true,
"published_methods": ["method-name"],
"address": "org/repo"
}
Present to the user:
- Which methods were published
- The address on mthds.sh
Step 4: Offer to Share
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.
Step 5: Handle Errors
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.
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