mthds-explain
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseExplain MTHDS bundles
解释MTHDS包
Analyze and explain existing MTHDS method bundles in plain language.
用通俗易懂的语言分析并解释现有的MTHDS方法包。
Process
流程
Step 0 — CLI Check (mandatory, do this FIRST)
步骤0 — CLI检查(必填,首先执行此步骤)
Run .
mthds-agent --version- If it succeeds: proceed to the next step.
- If it fails or the command is not found: STOP. Do not proceed with this skill. Tell the user:
TheCLI is required but not installed. Install it with:mthds-agentnpm install -g mthdsThen re-run this skill.
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.
.mthds运行命令。
mthds-agent --version- 如果执行成功:进入下一步。
- 如果执行失败或命令未找到:停止操作。不要继续使用此技能。告知用户:
缺少必需的CLI工具,请先安装:mthds-agentnpm install -g mthds然后重新运行此技能。
请勿手动编写文件,请勿扫描现有方法,请勿执行任何其他操作。CLI工具是验证、格式化和执行所必需的——没有它,输出内容会出现问题。
.mthdsStep 1: Read the .mthds File
步骤1:读取.mthds文件
Read the entire bundle file to understand its structure.
读取整个包文件以了解其结构。
Step 2: Identify Components
步骤2:识别组件
List all components found in the bundle:
- Domain: the declaration
[domain] - Concepts: all blocks — note which are custom vs references to native concepts
[concept.*] - Pipes: all blocks — identify the main pipe and sub-pipes
[pipe.*] - Main pipe: declared in section
[bundle]
列出包中所有的组件:
- 领域(Domain):声明
[domain] - 概念(Concepts):所有块——注意哪些是自定义概念,哪些是对原生概念的引用
[concept.*] - 管道(Pipes):所有块——识别主管道和子管道
[pipe.*] - 主管道:在部分中声明的管道
[bundle]
Step 3: Trace Execution Flow
步骤3:追踪执行流程
Starting from the main pipe, trace the execution path:
- For PipeSequence: follow the array in order
steps - For PipeBatch: identify and
batch_over, then the inner pipebatch_as - For PipeParallel: list all branches
- For PipeCondition: map condition → pipe for each branch
- For PipeLLM / PipeExtract / PipeImgGen / PipeFunc: these are leaf operations
从主管道开始,追踪执行路径:
- 对于PipeSequence:按顺序跟随数组
steps - 对于PipeBatch:识别和
batch_over,然后查看内部管道batch_as - 对于PipeParallel:列出所有分支
- 对于PipeCondition:为每个分支映射条件→管道
- 对于PipeLLM / PipeExtract / PipeImgGen / PipeFunc:这些是叶子操作
Step 4: Present Explanation
步骤4:呈现解释内容
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
步骤5:生成流程图
Create an ASCII diagram showing the execution flow:
[input_a, input_b]
|
main_sequence
├── step_one (PipeLLM) → intermediate_result
└── step_two (PipeExtract) → final_outputAdapt the diagram style to the method structure (linear, branching, batched).
创建一个ASCII流程图展示执行流程:
[input_a, input_b]
|
main_sequence
├── step_one (PipeLLM) → intermediate_result
└── step_two (PipeExtract) → final_output根据方法的结构(线性、分支、批量)调整流程图样式。
Step 6: Optional — Validate
步骤6:可选——验证
If the user wants to confirm the method is valid:
bash
mthds-agent pipelex validate pipe <file>.mthds -L <bundle-dir>/如果用户想要确认方法是否有效:
bash
mthds-agent pipelex validate pipe <file>.mthds -L <bundle-dir>/Step 7: Optional — Visual Graph
步骤7:可选——可视化图
For an interactive visual graph, suggest running the method with using real inputs:
/mthds-runbash
mthds-agent pipelex run pipe <bundle-dir>/This produces an interactive HTML visualization () next to the bundle alongside the execution results (graph is generated by default).
live_run.html如需交互式可视化图,建议使用真实输入通过运行该方法:
/mthds-runbash
mthds-agent pipelex run pipe <bundle-dir>/这会在包文件旁生成一个交互式HTML可视化文件(),同时生成执行结果(默认会生成可视化图)。
live_run.htmlReference
参考资料
- 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 for concept definitions and syntax
- Native Content Types — read when explaining what data flows through pipes (e.g., what attributes Page or Image content carries)
- 错误处理 — 当CLI返回错误时阅读,以确定恢复方案
- MTHDS Agent指南 — 查阅CLI命令语法或输出格式细节
- MTHDS语言参考 — 查阅概念定义和语法
- 原生内容类型 — 当解释管道中流转的数据时阅读(例如,Page或Image内容包含哪些属性)