mthds-pkg
Original:🇺🇸 English
Translated
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.
5installs
Sourcemthds-ai/skills
Added on
NPX Install
npx skill4agent add mthds-ai/skills mthds-pkgTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Manage MTHDS packages
Initialize, configure exports, list, and validate MTHDS packages using the CLI.
mthds-agentProcess
Step 0 — CLI Check (mandatory, do this FIRST)
Run . The minimum required version is 0.1.0 (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.1.0: STOP. Do not proceed. Tell the user:
This skill requiresversion 0.1.0 or higher (found X.Y.Z). Upgrade with:mthds-agentnpm install -g mthds@latestThen re-run this skill.
- If the version is 0.1.0 or higher: proceed to the next step.
Do not write files manually, do not scan for existing methods, do not do any other work. The CLI is required for validation, formatting, and execution — without it the output will be broken.
.mthdsNo 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
1. Initialize a package
Create a manifest:
METHODS.tomlbash
mthds-agent package init --address <address> --version <version> --description <description> -C <pkg-dir>Required flags:
| Flag | Purpose | Example |
|---|---|---|
| Package address (hostname/path format) | |
| Package version (semver) | |
| Package description | |
Optional flags:
| Flag | Purpose | Example |
|---|---|---|
| Comma-separated list of authors | |
| License identifier | |
| Method name (2-25 lowercase chars) | |
| Human-readable display name (max 128 chars) | |
| Main pipe code (snake_case) | |
| Overwrite existing METHODS.toml | — |
2. Configure exports
Exports declare which pipes the package makes available to consumers. They are organized by domain in :
METHODS.tomltoml
[exports.restaurant_analysis]
pipes = ["present_restaurant", "extract_menu", "analyze_menu"]To configure exports:
- Read the bundle(s) in the package to find the domain codes and pipe codes defined inside them
.mthds - Edit to add an
METHODS.tomlsection for each domain, listing the pipe codes to export[exports.<domain>]
Rules:
- The of each bundle is auto-exported — you do not need to list it unless you want to be explicit
main_pipe - Concepts are always public and do not need to be listed in exports
- Each section requires a
[exports.<domain>]key with a list of pipe code stringspipes
3. List package manifest
Display the current package manifest:
bash
mthds-agent package list -C <pkg-dir>4. Validate package manifest
Validate the package manifest:
METHODS.tomlbash
mthds-agent package validate -C <pkg-dir>Note:validates themthds-agent package validatepackage manifest. To validateMETHODS.tomlbundle semantics, use.mthds(see /mthds-check skill).mthds-agent pipelex validate pipe
The -C
option
-CAll commands accept (long: ) to target a package directory other than the shell's current working directory. This is essential when the agent's CWD differs from the package location.
mthds-agent package-C <path>--package-dirbash
# From any directory, target a specific package
mthds-agent package init --address github.com/org/repo --version 1.0.0 --description "My package" -C mthds-wip/restaurant_presenter/
mthds-agent package validate -C mthds-wip/restaurant_presenter/If is omitted, commands default to the current working directory.
-CCommon Workflows
Starting a new package:
- — create the manifest
mthds-agent package init --address <address> --version <version> --description <desc> -C <pkg-dir> - Read bundles in the package to extract domain codes and pipe codes
.mthds - Edit to set the correct
METHODS.tomlsections[exports.<domain>] - — validate the manifest
mthds-agent package validate -C <pkg-dir>
Reference
- Error Handling — read when CLI returns an error to determine recovery
- MTHDS Agent Guide — read for CLI command syntax or output format details