| name | mthds-explain |
| description | 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. |
| min_mthds_version | 0.17.0 |
| allowed-tools | ["Bash","Read","Write","Edit","Grep","Glob"] |
Explain MTHDS bundles
Analyze and explain existing MTHDS method bundles in plain language.
Process
Do not write .mthds files manually, do not do any other work. The CLI is required for validation, formatting, and execution — without it the output will be broken.
No backend setup needed: This skill works without configuring inference backends or API keys. You can start building/validating methods right away.
Step 1: Read the .mthds File
Read the entire bundle file to understand its structure.
Step 2: Identify Components
List all components found in the bundle:
- Domain: the top-level
domain key (bundle header, not a [domain] section)
- Concepts: all
[concept.*] blocks — note which are custom vs references to native concepts
- Pipes: all
[pipe.*] blocks — identify the main pipe and sub-pipes
- Main pipe: the top-level
main_pipe key (bundle header, not a [bundle] section)
Step 3: Trace Execution Flow
Starting from the main pipe, trace the execution path:
- For PipeSequence: follow the
steps array in order
- For PipeBatch: identify
batch_over and batch_as, then the inner pipe
- For PipeParallel: list all branches
- For PipeCondition: map condition → pipe for each branch
- For PipeLLM / PipeExtract / PipeImgGen / PipeSearch / PipeFunc: these are leaf operations
Step 4: Present Explanation
Structure the explanation as:
- Purpose: one-sentence summary of what the method does
- Inputs: list each input with its concept type and expected content
- Output: the final output concept and what it contains
- Step-by-step flow: walk through execution in order, explaining what each pipe does
- Key concepts: explain any custom concepts defined in the bundle
Step 5: Generate Flow Diagram
Create a text diagram showing the execution flow. Example:
main_sequence
1. step_one (PipeLLM) -> intermediate_result
2. step_two (PipeExtract) -> final_output
Inputs: input_a, input_b
Output: final_output
Adapt the format to the method structure (linear, branching, batched).
Step 6: Optional — Validate
If the user wants to confirm the method is valid:
mthds-agent validate bundle <file>.mthds -L <bundle-dir>/
Step 7: Optional — Visual Graph
For an interactive flowchart without running the method, use validate with --graph:
mthds-agent validate bundle <file>.mthds -L <bundle-dir>/ --graph
This generates dry_run.html next to the bundle — a static flowchart of the method structure.
Reference