edit

SKILL.md

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

  1. Read the existing .mthds file — Understand current structure before making changes

  2. 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.

  3. 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)
  4. 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.

  5. Regenerate inputs if needed:

    • If inputs changed, run mthds-agent pipelex inputs <file>.mthds -L <bundle-dir>/
    • Update existing inputs.json if present
  6. Present completion:

    • If inputs were regenerated (step 5 triggered), show the path to the updated file.
    • Provide a concrete CLI example. If inputs.json contains 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-inputs
      

      To 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) and batch_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.field in prompts or from in construct blocks, to know which attributes each native concept exposes
  • Talents & Presets — read when setting or changing the model field in a pipe, to find the correct preset name
Weekly Installs
6
Repository
mthds-ai/skills
GitHub Stars
5
First Seen
Feb 25, 2026
Installed on
claude-code6
opencode4
gemini-cli4
github-copilot4
codex4
kimi-cli4