Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计异常

mthds-run运行方式

Agent Skill

mthds-run 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

559

周安装

24

GitHub Stars

5

下载量

196
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:mthds-run(运行方式)
来源仓库:https://github.com/mthds-ai/skills
仓库路径:skills/mthds-run
安装命令:
npx skills add https://github.com/mthds-ai/skills --skill mthds-run
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/mthds-ai/skills --skill mthds-run

简介

mthds-run 用于查找、检索和筛选相关信息,适合快速定位候选结果。

  • 适用于需要根据关键词或任务场景从来源线索中获取信息的场景。
  • 通过 npx skills add 命令安装,需结合原始 README 核验具体用法。
  • 安装前建议确认权限范围、维护状态及是否触发联网或文件读写操作。
  • mthds-run 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Run MTHDS methods

Execute MTHDS method bundles and interpret their JSON output.

Process

Step 0 — CLI Check (mandatory, do this FIRST)

Run mthds-agent --version. The minimum required version is 0.1.2 (declared in this skill's front matter as min_mthds_version).

  • If the command is not found: STOP. Do not proceed. Tell the user:
The mthds-agent CLI is required but not installed. Install it with: `` npm install -g mthds `` Then re-run this skill.
  • If the version is below 0.1.2: STOP. Do not proceed. Tell the user:
This skill requires mthds-agent version 0.1.2 or higher (found *X.Y.Z*). Upgrade with: `` npm install -g mthds@latest `` Then re-run this skill.
  • If the version is 0.1.2 or higher: proceed to the next step.

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.

Step 0.5 — Pipelex Runtime Check (mandatory)

Running methods requires the Pipelex runtime to be installed and configured.

First, check if pipelex-agent is available:

pipelex-agent --version
  • If the command is not found: STOP. Tell the user:
The Pipelex runtime is not installed. Install it with: `` curl -fsSL https://pipelex.com/install.sh | sh ``

Then, if pipelex-agent is installed, check configuration health:

mthds-agent pipelex doctor
  • If the doctor reports config issues (missing backends, missing API keys) AND the user is requesting a live run (not --dry-run): STOP. Tell the user:
Pipelex needs to be configured with inference backends before running methods. Use /pipelex-setup for guided configuration.
  • If the user is requesting a dry run (--dry-run): config issues are OK — dry runs work without backend configuration. Proceed.
  • If healthy: proceed to Step 1.

Step 1: Identify the Target

TargetCommand
Pipeline directory (recommended)mthds-agent pipelex run bundle <bundle-dir>/
Specific pipe in a directorymthds-agent pipelex run bundle <bundle-dir>/ --pipe my_pipe
Bundle file directlymthds-agent pipelex run bundle bundle.mthds -L <bundle-dir>/
Pipe by code from librarymthds-agent pipelex run bundle my_pipe
Directory mode (recommended): Pass the pipeline directory as target. The CLI auto-detects bundle.mthds, inputs.json, and sets -L automatically — no need to specify them explicitly. This also avoids namespace collisions with other bundles.

Step 2: Prepare Inputs and Check Readiness

Fast path — inputs just prepared

If inputs were already prepared during this conversation — via /mthds-inputs (user-data, synthetic, or mixed strategy), or by manually assembling inputs.json with real values earlier in this session — skip the schema fetch and readiness check. The inputs are ready. Proceed directly to Step 3 with a normal run.

This applies when you just wrote or saw inputs.json being written with real content values. It does NOT apply after /mthds-build (which saves a placeholder template) or after /mthds-inputs with the template strategy.

Full check — cold start

If /mthds-run is invoked without prior input preparation in this session, perform the full readiness check:

Get the input schema for the target:

mthds-agent pipelex inputs bundle bundle.mthds

Output:

{
  "success": true,
  "pipe_code": "process_document",
  "inputs": {
    "document": {
      "concept": "native.Document",
      "content": {"url": "url_value"}
    },
    "context": {
      "concept": "native.Text",
      "content": {"text": "text_value"}
    }
  }
}

Fill in the content fields with actual values. For complex inputs, use the /mthds-inputs skill.

Input Readiness Check

Before running, assess whether inputs are ready. This prevents runtime failures from placeholder values.

No inputs required: If mthds-agent pipelex inputs bundle <file>.mthds returns an empty inputs object ({}), inputs are ready — skip to Step 3.

Inputs required: If inputs exist, check inputs.json for readiness:

  1. Does inputs.json exist in the bundle directory?
  2. If it exists, scan all content values for placeholder signals:

- Template defaults: "url_value", "text_value", "number_value", "integer_value", "boolean_value", or any value matching the pattern *_value - Angle-bracket placeholders: values containing <...> (e.g. <path-to-cv.pdf>, <your-text-here>) - Non-existent file paths: url fields pointing to local files that don't exist on disk

Readiness result:

  • Ready: inputs.json exists AND all content values are real (no placeholders, referenced files exist) → proceed to Step 3 with normal run
  • Not ready: inputs.json is missing, OR contains any placeholder values → proceed to Step 3 with dry-run fallback

Step 3: Choose Run Mode

If inputs are not ready

Default to --dry-run --mock-inputs and inform the user:

"The inputs for this pipeline contain placeholder values (not real data). I'll do a dry run with mock inputs to validate the pipeline structure."

After the dry run, offer the user these options:

  • Prepare real inputs — use /mthds-inputs to fill in actual values, then re-run
  • Provide files — if the pipeline expects file inputs (documents, images), ask the user to supply file paths
  • Keep dry run — accept the dry-run result as-is

Run modes reference

ModeCommandUse When
Dry run + mock inputsmthds-agent pipelex run bundle <bundle-dir>/ --dry-run --mock-inputsQuick structural validation, no real data needed, or inputs not ready
Dry run with real inputsmthds-agent pipelex run bundle <bundle-dir>/ --dry-runValidate input shapes without making API calls (auto-detects inputs.json)
Full runmthds-agent pipelex run bundle <bundle-dir>/Production execution (auto-detects inputs.json)
Full run inlinemthds-agent pipelex run bundle <bundle-dir>/ --inputs '{"theme":...}'Quick execution with inline JSON inputs
Full run without graphmthds-agent pipelex run bundle <bundle-dir>/ --no-graphExecute without generating graph visualization
Full run with memorymthds-agent pipelex run bundle <bundle-dir>/ --with-memoryWhen piping output to another method
Graph by default: Execution graphs (live_run.html / dry_run.html) are now generated automatically. Use --no-graph to disable.

Inline JSON for Inputs

The --inputs flag accepts both file paths and inline JSON. The CLI auto-detects: if the value starts with {, it is parsed as JSON directly. This is the fastest path — no file creation needed for simple inputs.

# Inline JSON
mthds-agent pipelex run bundle <bundle-dir>/ --inputs '{"theme": {"concept": "native.Text", "content": {"text": "nature"}}}'

# File path (auto-detected in directory mode)
mthds-agent pipelex run bundle <bundle-dir>/

Step 4: Present Results

After a successful run, always show the actual output to the user — never just summarize what fields exist.

Output format modes

The CLI has two output modes:

  • Compact (default): stdout is the concept's structured JSON directly — no envelope, no success wrapper. This is the primary output of the method's main concept. Parse the JSON directly for field access.
  • With memory (--with-memory): stdout has main_stuff (with json, markdown, html renderings) + working_memory (all named stuffs and aliases). Use this when piping output to another method.

The output_file and graph_files are written to disk as side effects (paths appear in logs/stderr), not in compact stdout.

4a. Determine what to show

In compact mode (default), the output is the concept JSON directly. Show the fields to the user:

{
  "clauses": [...],
  "overall_risk": "high"
}

In --with-memory mode, the output structure depends on the pipe architecture:

if main_stuff is non-empty (not {} or null):
    → main_stuff is the primary output (single unified result)
else:
    → working_memory.root holds the primary output (multiple named results)
Pipe Typemain_stuff present?What to show
PipeLLM, PipeCompose, PipeExtract, PipeImgGen, PipeSearchAlwaysmain_stuff
PipeSequenceAlways (last step)main_stuff
PipeBatchAlways (list)main_stuff
PipeConditionAlwaysmain_stuff
PipeParallel with combined_outputYesmain_stuff
PipeParallel without combined_outputNo ({})working_memory.root entries

4b. Show the output content

In compact mode: show the JSON fields directly. For structured concepts, format for readability.

In --with-memory mode when main_stuff is present (most pipe types):

  • Show main_stuff.markdown directly — this is the human-readable rendering. Display it as-is so the user sees the full output.
  • For structured concepts with fields, also show main_stuff.json formatted for readability.

In --with-memory mode when main_stuff is empty (PipeParallel without combined_output):

  • Iterate working_memory.root and present each named result.
  • For each entry, show the content field with its key as a label.
  • Example: "french_translation: Bonjour le monde" / "spanish_translation: Hola mundo"

For dry runs: Show the same output but clearly label it as mock/simulated data.

4c. Output file

  • The CLI automatically saves the full JSON output next to the bundle (live_run.json or dry_run.json).
  • The output file path appears in runtime logs (stderr), not in compact stdout.

4d. Present graph files

  • Graph visualizations are generated by default (live_run.html / dry_run.html). Use --no-graph to disable.
  • The graph file path appears in runtime logs (stderr), not in compact stdout.

4e. Mention intermediate results

  • If the pipeline has multiple steps, briefly note key intermediate values from working_memory (e.g., "The match analysis intermediate step scored 82/100").
  • Offer: "I can show the full working memory if you want to inspect any intermediate step."

4f. Suggest next steps

  • Re-run with different inputs
  • Adjust prompts or pipe configurations if output quality needs improvement

Step 5: Handle Errors

When encountering runtime errors, re-run with --log-level debug for additional context:

mthds-agent --log-level debug pipelex run bundle <bundle-dir>/ --inputs data.json

For all error types and recovery strategies, see Error Handling Reference.

Execution Graphs

Execution graph visualizations are generated by default alongside the run output. Use --no-graph to disable.

mthds-agent pipelex run bundle <bundle-dir>/

Graph files (live_run.html / dry_run.html) are written to disk next to the bundle. Their paths appear in runtime logs on stderr, not in compact stdout. When using --with-memory, graph_files is included in the returned JSON envelope.

Piping Methods

The run command accepts piped JSON on stdin when --inputs is not provided. This enables chaining methods:

mthds-agent pipelex run method extract-terms --inputs data.json --with-memory \
  | mthds-agent pipelex run method assess-risk --with-memory \
  | mthds-agent pipelex run method generate-report

When methods are installed as CLI shims, the same chain is:

extract-terms --inputs data.json --with-memory \
  | assess-risk --with-memory \
  | generate-report
  • Use --with-memory on intermediate steps to pass the full working memory envelope.
  • The final step omits --with-memory to produce compact output.
  • --inputs always overrides stdin when both are present.
  • Upstream stuff names are matched against downstream input names. Method authors should name their outputs to match the downstream's expected input names.

Reference

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.92%
按下载量换算66

Claude

30.75%
按下载量换算60

Cursor

20.42%
按下载量换算40

Gemini CLI

8.95%
按下载量换算18

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

未通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills