edit
Edit MTHDS bundles
Modify existing MTHDS method bundles.
Mode Selection
See Mode Selection for general mode behavior.
Default: Automatic for clear, specific changes. Interactive for ambiguous or multi-step modifications.
Detection heuristics:
- "Rename X to Y" → automatic
- "Update the prompt in pipe Z" with new text provided → automatic
- "Add a step to do X" (open-ended) → interactive
- "Refactor this pipeline" (subjective) → interactive
- Multiple changes requested at once → interactive (confirm the plan)
Process
Prerequisite: See CLI Prerequisites
-
Read the existing .mthds file — Understand current structure before making changes
-
Understand requested changes:
- What pipes need to be added, removed, or modified?
- What concepts need to change?
- Does the method structure need refactoring?
Interactive checkpoint: Present a summary of planned changes. Ask "Does this plan look right?" before proceeding to step 3.
Automatic: Proceed directly to step 3. State planned changes in one line.
-
Apply changes:
- Maintain proper pipe ordering (controllers before sub-pipes)
- Keep TOML formatting consistent
- Preserve cross-references between pipes
- Keep inputs on a single line
- Maintain POSIX standard (empty line at end, no trailing whitespace)
-
Validate after editing:
mthds-agent pipelex validate <file>.mthds -L <bundle-dir>/If errors, see Error Handling Reference for recovery strategies by error domain. Use /fix skill for automatic error resolution.
-
Regenerate inputs if needed:
- If inputs changed, run
mthds-agent pipelex inputs <file>.mthds -L <bundle-dir>/ - Update existing inputs.json if present
- If inputs changed, run
-
Present completion:
- If inputs were regenerated (step 5 triggered), show the path to the updated file.
- Provide a concrete CLI example. If
inputs.jsoncontains placeholder values, suggest the safe dry-run command first:To try the updated method now, use /run or from the terminal:
mthds run <bundle-dir>/ --dry-run --mock-inputsTo run with real data, use /inputs to prepare your inputs (provide your own files, or generate synthetic test data), then:
mthds run <bundle-dir>/
Common Edit Operations
- Add a pipe: Define concept if needed, add pipe in correct order
- Modify a prompt: Update prompt text, check variable references
- Change inputs/outputs: Update type, regenerate inputs
- Add batch processing: Add
batch_over(plural list name) andbatch_as(singular item name) to step — they must be different - Refactor to sequence: Wrap multiple pipes in PipeSequence
Reference
- CLI Prerequisites — read at skill start to check CLI availability
- Error Handling — read when CLI returns an error to determine recovery
- MTHDS Agent Guide — read for CLI command syntax or output format details
- MTHDS Language Reference — read when writing or modifying .mthds TOML syntax
- Native Content Types — read when using
$var.fieldin prompts orfromin construct blocks, to know which attributes each native concept exposes - Talents & Presets — read when setting or changing the
modelfield in a pipe, to find the correct preset name
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-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-check
Check and validate MTHDS bundles for issues. Use when user says "validate this", "check my workflow", "check my method", "does this .mthds make sense?", "review this pipeline", "any issues?", "is this correct?". Reports problems without modifying files. Read-only analysis.
24mthds-install
Install MTHDS method packages from GitHub or local directories. Use when user says "install a method", "install from GitHub", "add a method package", "mthds install", "install method", "set up a method", or wants to install an MTHDS method package for use with an AI agent.
18pipelex-setup
Set up Pipelex inference configuration — choose backends and configure API keys. Use when user says "set up pipelex", "configure backends", "configure inference", "set up API keys", "pipelex setup", "pipelex init", wants to run methods for the first time, or gets a config/credential error when running.
14