mthds-check

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Check MTHDS bundles

检查MTHDS包

Validate and review MTHDS bundles based on the MTHDS standard without making changes.
按照MTHDS标准验证并审核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:
The
mthds-agent
CLI is required but not installed. Install it with:
npm install -g mthds
Then re-run this skill.
Do not write
.mthds
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.
  1. Read the .mthds file — Load and parse the method
  2. Run CLI validation (use
    -L
    pointing to the bundle's own directory to avoid namespace collisions):
    bash
    mthds-agent pipelex validate pipe <file>.mthds -L <bundle-directory>/
  3. Parse the JSON output:
    • If
      success: true
      — all pipes validated, report clean status
    • If error — see Error Handling Reference for error types and recovery
  4. Cross-domain validation — when the bundle references pipes from other domains, use
    --library-dir
    (see Error Handling — Cross-Domain)
  5. Analyze for additional issues (manual review beyond CLI validation):
    • Unused concepts (defined but never referenced)
    • Unreachable pipes (not in main_pipe execution path)
    • Missing descriptions on pipes or concepts
    • Inconsistent naming conventions
    • Potential prompt issues (missing variables, unclear instructions)
  6. Report findings by severity:
    • Errors: Validation failures from CLI (with
      error_type
      and
      pipe_code
      )
    • Warnings: Issues that may cause problems (e.g., model availability)
    • Suggestions: Improvements for maintainability
  7. Do NOT make changes — This skill is read-only
运行
mthds-agent --version
  • 如果执行成功:进入下一步。
  • 如果执行失败或未找到该命令:停止操作。不要继续使用此技能。告知用户:
验证需要
mthds-agent
CLI工具,但它尚未安装。请通过以下命令安装:
npm install -g mthds
然后重新运行此技能。
不要手动编写
.mthds
文件,不要扫描现有方法,不要进行其他任何操作。CLI是验证、格式化和执行的必备工具——没有它,输出结果会出现问题。
  1. 读取.mthds文件 — 加载并解析该方法
  2. 运行CLI验证(使用
    -L
    指向包自身的目录,避免命名空间冲突):
    bash
    mthds-agent pipelex validate pipe <file>.mthds -L <bundle-directory>/
  3. 解析JSON输出
    • 如果
      success: true
      — 所有流水线验证通过,报告无异常状态
    • 如果出现错误 — 查看错误处理参考了解错误类型和恢复方法
  4. 跨域验证 — 当包引用其他域的流水线时,使用
    --library-dir
    (参见错误处理 — 跨域
  5. 分析其他潜在问题(CLI验证之外的人工审核):
    • 未使用的概念(已定义但从未被引用)
    • 不可达的流水线(不在main_pipe执行路径中)
    • 流水线或概念缺少描述
    • 命名约定不一致
    • 潜在的提示问题(缺少变量、说明不清晰)
  6. 按严重程度报告发现的问题
    • 错误:CLI返回的验证失败(包含
      error_type
      pipe_code
    • 警告:可能导致问题的情况(例如,模型不可用)
    • 建议:可维护性改进建议
  7. 请勿修改文件 — 此技能为只读模式

What Gets Checked

检查内容

  • TOML syntax validity
  • Concept definitions and references
  • Pipe type configurations
  • Input/output type matching
  • Variable references in prompts
  • Cross-domain references
  • Naming convention compliance
  • Model preset resolution (dry run)
  • TOML语法有效性
  • 概念定义与引用
  • 流水线类型配置
  • 输入/输出类型匹配
  • 提示中的变量引用
  • 跨域引用
  • 命名约定合规性
  • 模型预设解析(试运行)

Reference

参考资料

  • 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 reviewing .mthds TOML syntax
  • Native Content Types — read when checking
    $var.field
    references in prompts to verify the attribute exists on the content type
  • 错误处理 — 当CLI返回错误时,查看此文档以确定恢复方案
  • MTHDS Agent指南 — 查看此文档了解CLI命令语法或输出格式细节
  • MTHDS语言参考 — 审核.mthds TOML语法时查看此文档
  • 原生内容类型 — 检查提示中的
    $var.field
    引用时,查看此文档验证该属性是否存在于内容类型中