edit
Original:🇺🇸 English
Translated
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.
2installs
Sourcemthds-ai/skills
Added on
NPX Install
npx skill4agent add mthds-ai/skills editTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →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:bash
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 contains placeholder values, suggest the safe dry-run command first:
inputs.jsonTo 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 (plural list name) and
batch_over(singular item name) to step — they must be differentbatch_as - 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 in prompts or
$var.fieldin construct blocks, to know which attributes each native concept exposesfrom - Talents & Presets — read when setting or changing the field in a pipe, to find the correct preset name
model