Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计提醒

mthds-inputs方法输入

Agent Skill

mthds-inputs 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

570

周安装

24

GitHub Stars

5

下载量

1
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

mthds-inputs 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合围绕仓库状态、代码变更或协作事项进行整理和分析。
  • 通过 npx skills add 命令安装,需结合原始 README 核验具体用法。
  • 安装前建议确认权限范围、维护状态及是否触发联网或命令执行。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Prepare Inputs for MTHDS methods

Prepare input data for running MTHDS method bundles. This skill is the single entry point for all input preparation needs: extracting a placeholder template, generating synthetic test data, integrating user-provided files, or any combination.

Mode Selection

How mode is determined

  1. Explicit override: If the user states a preference, always honor it:

- Automatic signals: "just do it", "go ahead", "automatic", "quick", "don't ask" - Interactive signals: "walk me through", "help me", "guide me", "step by step", "let me decide"

  1. Skill default: Each skill defines its own default based on the nature of the task.
  2. Request analysis: If no explicit signal and no strong skill default, assess the request:

- Detailed, specific requirements → automatic - Brief, ambiguous, or subjective → interactive

Mode behavior

Automatic mode:

  • State assumptions briefly before proceeding
  • Make reasonable decisions at each step
  • Present the result when done
  • Pause only if a critical ambiguity could lead to wasted work

Interactive mode:

  • Ask clarifying questions at the start
  • Present options at decision points
  • Confirm before proceeding at checkpoints
  • Allow the user to steer direction

Mode switching

  • If in automatic mode and the user asks a question or gives feedback → switch to interactive for the current phase
  • If in interactive mode and the user says "looks good, go ahead" or similar → switch to automatic for remaining phases

Default: Automatic.

Input strategy detection heuristics (evaluated in order):

SignalStrategy
User provides file paths, folder paths, or mentions "my data" / "this file" / "use these images" / "here's my PDF"User Data (or Mixed if some inputs remain unfilled)
User says "test data" / "generate inputs" / "synthesize" / "fake data" / "sample data"Synthetic
User says "template" / "schema" / "placeholder" / "what inputs does it need?"Template
No clear signal (e.g., called after /mthds-build with no further context)Template, then offer to populate

Interactive additions: Ask about:

  • Which user files map to which inputs (when ambiguous)
  • Domain/industry context for realistic synthetic data
  • Whether to generate edge cases or happy-path data
  • Specific values or constraints for certain fields

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.

No backend setup needed: This skill works without configuring inference backends or API keys. You can start building/validating methods right away. Backend configuration is only needed to run methods with live inference — use /pipelex-setup when you're ready.

Process

Step 1: Identify the Target Method

Determine the .mthds bundle and its output directory (<output_dir>). This is usually the directory containing bundle.mthds (e.g., mthds-wip/pipeline_01/).

The inputs.json file is saved directly in this directory (next to bundle.mthds):

  • <output_dir>/inputs.json

If data files need to be generated or copied (images, PDFs, etc.), they go in a subdirectory:

  • <output_dir>/inputs/

The /inputs subdirectory is only created when there are actual data files to store. Paths to these files are referenced from within inputs.json.

Step 2: Get Input Schema

Extract the input template from the method:

mthds-agent pipelex inputs bundle <bundle.mthds> -L <bundle-dir>/ [--pipe specific_pipe]

Output format:

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

For error handling, see Error Handling Reference.

Step 3: Choose Input Strategy

Based on the heuristics above and what the user has provided, follow the appropriate strategy:


Template Strategy

The fastest path. Produces a placeholder inputs.json that the user can fill in manually.

  1. Take the inputs object from Step 2's output
  2. Save it to <output_dir>/inputs.json (next to bundle.mthds)
  3. Report the saved file path and show the template content
  4. Offer: "To populate this with realistic test data, re-run /mthds-inputs and ask for synthetic data. Or provide your own files."

Synthetic Strategy

Generate realistic fake data tailored to the method's purpose.

Identify Input Types

Parse the schema to identify what types of synthetic data are needed:

ConceptContent FieldsSynthesis Method
native.TexttextGenerate realistic text matching the method context
native.NumbernumberGenerate appropriate numeric values
native.Imageurl, caption?, mime_type?Use synthesize_image pipeline
native.Documenturl, mime_type?Use document generation skills or Python
native.Pagetext_and_images, page_view?Composite: text + optional images
native.TextAndImagestext?, images?Composite: text + image list
native.JSONjson_objGenerate structured JSON matching context
Custom structuredPer-field typesRecurse through structure fields

List types (Type[] or Type[N]): Generate multiple items. Variable lists typically need 2-5 items; fixed lists need exactly N items.

Generate Text Content

Create realistic text that matches the method's purpose:

  • If the method processes invoices, generate invoice-like text
  • If it analyzes reports, generate report-style content
  • Match expected length (short prompts vs long documents)

Generate Numeric Content

Generate sensible values within expected ranges based on the method context.

Generate Structured Concepts

Fill each field according to its type and description.

Generate File Inputs

When inputs require actual files (Image, Document), use the appropriate generation method. See Image Generation and Document Generation below.

Assemble and Save

Create the complete inputs.json and save to <output_dir>/inputs.json (next to bundle.mthds). Any generated data files go in <output_dir>/inputs/.


User Data Strategy

Integrate the user's own files into the method's input schema.

Step A: Inventory User Files

Collect all files the user has provided (explicit paths, folders, or files mentioned earlier in conversation). For each file, determine its type:

Extension(s)Detected TypeMaps To
.pdfPDF documentnative.Document (mime: application/pdf)
.docx, .docWord documentnative.Document (mime: application/vnd.openxmlformats-officedocument.wordprocessingml.document)
.xlsx, .xlsSpreadsheetnative.Document (mime: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
.pptx, .pptPresentationnative.Document (mime: application/vnd.openxmlformats-officedocument.presentationml.presentation)
.jpg, .jpegJPEG imagenative.Image (mime: image/jpeg)
.pngPNG imagenative.Image (mime: image/png)
.webpWebP imagenative.Image (mime: image/webp)
.gifGIF imagenative.Image (mime: image/gif)
.svgSVG imagenative.Image (mime: image/svg+xml)
.tiff, .tifTIFF imagenative.Image (mime: image/tiff)
.bmpBMP imagenative.Image (mime: image/bmp)
.txtPlain textnative.Text (read file content)
.mdMarkdown textnative.Text (read file content)
.jsonJSON datanative.JSON or custom structured concept
.csvCSV datanative.Text (read as text) or native.JSON (parse to objects)
.html, .htmHTMLnative.Html

Step B: Expand Folders

When the user provides a folder path:

  1. List all files in the folder (non-recursive by default, recursive if user requests)
  2. Filter to supported file types
  3. Group files by detected type
  4. Match to list-type inputs (Image[], Document[], etc.)

Example: User provides ./invoices/ containing 5 PDFs. The method expects documents: Document[]. Map all 5 PDFs to that list input.

Step C: Match Files to Inputs

For each input variable in the schema, attempt to match user-provided files:

Matching rules (applied in order):

  1. Exact name match: Input variable invoice matches a file named invoice.pdf
  2. Type match (single candidate): If only one input expects native.Image and the user provided exactly one image file, match them
  3. Type match (multiple candidates): If multiple inputs of the same type exist:

- In automatic mode: match by name similarity (variable name vs filename) - In interactive mode: ask the user which file goes where

  1. Folder to list: If a folder contains files of a single type and an input expects a list of that type, map the folder contents to that input
  2. Unmatched files: Report them and ask if they should be ignored or mapped to a specific input
  3. Unfilled inputs: After matching, any inputs still without data can be left as placeholders or filled with synthetic data (see Mixed Strategy)

Step D: Copy Files to Output Directory

Copy (or symlink) user files into <output_dir>/inputs/ so inputs.json can reference them with paths relative to the inputs.json file itself (i.e., relative to the bundle directory where inputs.json lives). This keeps the pipeline directory self-contained. Only create the inputs/ subdirectory if there are actual files to copy.

Use descriptive filenames: if the input variable is invoice, copy to <output_dir>/inputs/invoice.pdf (preserving original extension).

Step E: Build Content Objects

For each matched file, construct the proper content object:

Document input:

{
  "concept": "native.Document",
  "content": {
    "url": "inputs/invoice.pdf",
    "mime_type": "application/pdf"
  }
}

Image input:

{
  "concept": "native.Image",
  "content": {
    "url": "inputs/photo.jpg",
    "mime_type": "image/jpeg"
  }
}

Text input (from .txt or .md file — read the file content):

{
  "concept": "native.Text",
  "content": {
    "text": "<actual file content read from the .txt/.md file>"
  }
}

Image list input (from folder):

{
  "concept": "native.Image",
  "content": [
    {"url": "inputs/img_001.jpg", "mime_type": "image/jpeg"},
    {"url": "inputs/img_002.jpg", "mime_type": "image/jpeg"},
    {"url": "inputs/img_003.png", "mime_type": "image/png"}
  ]
}

Step F: Assemble and Save

Combine all content objects into a single inputs.json and save to <output_dir>/inputs.json (next to bundle.mthds).

Step G: Report

Show the user:

  • Which files were matched to which inputs
  • Any unfilled inputs (offer synthetic or placeholder)
  • The final inputs.json content
  • Path to the saved file

Mixed Strategy

Combines user data with synthetic generation for any remaining gaps.

  1. Follow User Data Strategy Steps A-E to match user files
  2. For each unfilled input, apply Synthetic Strategy
  3. Assemble the complete inputs.json combining both sources
  4. Report which inputs came from user data and which were synthesized

Image Generation

Use the synthesize_image Pipelex pipeline to generate test images.

Command:

First, create an input file (e.g., <output_dir>/image_request.json):

{
  "request": {
    "concept": "synthetic_data.ImageRequest",
    "content": {
      "category": "<category>",
      "description": "<optional description>"
    }
  }
}

Then run:

mthds-agent pipelex run bundle pipelex/builder/synthetic_inputs/synthesize_image.mthds --inputs <output_dir>/image_request.json

Image Categories:

CategoryUse ForExample Description
photographReal-world photos, product images, portraits"A professional headshot of a business person"
screenshotUI mockups, app screens, web pages"A mobile banking app dashboard showing account balance"
chartData visualizations, graphs, plots"A bar chart showing quarterly sales by region"
diagramTechnical diagrams, flowcharts, architecture"A system architecture diagram with microservices"
document_scanScanned papers, receipts, forms"A scanned invoice from a hardware store"
handwrittenHandwritten notes, signatures"Handwritten meeting notes on lined paper"

Output: The pipeline saves the generated image to <output_dir>/inputs/ and returns the file path.

For image synthesis error handling, see Error Handling Reference.


Document Generation

Generate test documents based on the document type needed.

PDF Documents

reportlab is a dependency of pipelex — always available, no additional installation needed.

Basic PDF (Canvas API)

from reportlab.lib.pagesizes import letter
from reportlab.pdfgen import canvas

c = canvas.Canvas("<output_dir>/inputs/test_document.pdf", pagesize=letter)
width, height = letter

# Add text
c.drawString(100, height - 100, "Hello World!")
c.drawString(100, height - 120, "This is a PDF created with reportlab")

# Add a line
c.line(100, height - 140, 400, height - 140)

# Save
c.save()

Multi-Page PDF (Platypus)

from reportlab.lib.pagesizes import letter
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, PageBreak
from reportlab.lib.styles import getSampleStyleSheet

doc = SimpleDocTemplate("<output_dir>/inputs/test_report.pdf", pagesize=letter)
styles = getSampleStyleSheet()
story = []

# Add content
title = Paragraph("Report Title", styles['Title'])
story.append(title)
story.append(Spacer(1, 12))

body = Paragraph("This is the body of the report. " * 20, styles['Normal'])
story.append(body)
story.append(PageBreak())

# Page 2
story.append(Paragraph("Page 2", styles['Heading1']))
story.append(Paragraph("Content for page 2", styles['Normal']))

# Build PDF
doc.build(story)

Professional Reports with Tables

from reportlab.platypus import SimpleDocTemplate, Table, TableStyle, Paragraph
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.lib import colors

# Sample data
data = [
    ['Product', 'Q1', 'Q2', 'Q3', 'Q4'],
    ['Widgets', '120', '135', '142', '158'],
    ['Gadgets', '85', '92', '98', '105']
]

# Create PDF with table
doc = SimpleDocTemplate("<output_dir>/inputs/test_report.pdf")
elements = []

# Add title
styles = getSampleStyleSheet()
title = Paragraph("Quarterly Sales Report", styles['Title'])
elements.append(title)

# Add table with advanced styling
table = Table(data)
table.setStyle(TableStyle([
    ('BACKGROUND', (0, 0), (-1, 0), colors.grey),
    ('TEXTCOLOR', (0, 0), (-1, 0), colors.whitesmoke),
    ('ALIGN', (0, 0), (-1, -1), 'CENTER'),
    ('FONTNAME', (0, 0), (-1, 0), 'Helvetica-Bold'),
    ('FONTSIZE', (0, 0), (-1, 0), 14),
    ('BOTTOMPADDING', (0, 0), (-1, 0), 12),
    ('BACKGROUND', (0, 1), (-1, -1), colors.beige),
    ('GRID', (0, 0), (-1, -1), 1, colors.black)
]))
elements.append(table)

doc.build(elements)

Last resort — use a public test PDF URL:

{
  "url": "https://www.w3.org/WAI/WCAG21/Techniques/pdf/img/table-word.pdf",
  "mime_type": "application/pdf"
}

Word Documents (DOCX)

If example-skills:docx skill is available:

Use the /docx skill to create a Word document with the following content:
[Describe the document content, structure, and formatting]
Save to: <output_dir>/inputs/<filename>.docx

If skill is NOT available, create using Python:

# Requires: pip install python-docx
from docx import Document

doc = Document()
doc.add_heading('Test Document', 0)
doc.add_paragraph('This is synthetic test content for method testing.')
# Add more content as needed
doc.save('<output_dir>/inputs/test_document.docx')

Spreadsheets (XLSX)

If example-skills:xlsx skill is available:

Use the /xlsx skill to create a spreadsheet with the following data:
[Describe columns, rows, and sample data]
Save to: <output_dir>/inputs/<filename>.xlsx

If skill is NOT available, create using Python:

# Requires: pip install openpyxl
from openpyxl import Workbook

wb = Workbook()
ws = wb.active
ws['A1'] = 'Column1'
ws['B1'] = 'Column2'
ws['A2'] = 'Value1'
ws['B2'] = 'Value2'
wb.save('<output_dir>/inputs/test_spreadsheet.xlsx')

Fallback Strategy:

  1. For PDFs: use reportlab (always available via pipelex) with the patterns above
  2. For DOCX/XLSX: use the /docx or /xlsx skill (install from the Anthropic example-skills marketplace if not available)
  3. For any format: use public test file URLs as fallback
  4. As last resort, ask user to provide test files

Validate & Run

After assembling the inputs, confirm readiness:

Inputs are ready. inputs.json has been saved with real values — no placeholders remain.

Then offer to run:

# Dry run with the prepared inputs (directory mode auto-detects bundle, inputs, library dir)
mthds-agent pipelex run bundle <bundle-dir>/ --dry-run

# Full run (uses actual AI/extraction models)
mthds-agent pipelex run bundle <bundle-dir>/

Native Concept Content Structures

Text

{"text": "The actual text content"}

Number

{"number": 42}

Image

{
  "url": "/path/to/image.jpg",
  "caption": "Optional description",
  "mime_type": "image/jpeg"
}

Document

{
  "url": "/path/to/document.pdf",
  "mime_type": "application/pdf"
}

TextAndImages

{
  "text": {"text": "Main text content"},
  "images": [
    {"url": "/path/to/img1.png", "caption": "Figure 1"}
  ]
}

Page

{
  "text_and_images": {
    "text": {"text": "Page content..."},
    "images": []
  },
  "page_view": null
}

JSON

{"json_obj": {"key": "value", "nested": {"data": 123}}}

Complete Examples

Example 1: Template for a Haiku writer

Method: Haiku pipeline expecting theme: Text

mthds-agent pipelex inputs bundle mthds-wip/pipeline_01/bundle.mthds -L mthds-wip/pipeline_01/

Save the inputs from the output directly to mthds-wip/pipeline_01/inputs.json.

Example 2: Synthetic data for an image analysis pipeline

Method: Image analyzer expecting image: Image and analysis_prompt: Text

  1. Get schema, identify needs: test photograph + instruction text
  2. Generate image via synthesize_image.mthds with category photograph
  3. Write analysis prompt text matching the method context
  4. Assemble:
{
  "image": {
    "concept": "native.Image",
    "content": {
      "url": "inputs/city_street.jpg",
      "mime_type": "image/jpeg"
    }
  },
  "analysis_prompt": {
    "concept": "native.Text",
    "content": {
      "text": "Analyze this street scene. Count visible people and describe the atmosphere."
    }
  }
}

Example 3: User-provided invoice PDF

Method: Invoice processor expecting invoice: Document and instructions: Text

User says: "Use my file ~/documents/invoice_march.pdf"

  1. Get schema: needs invoice (Document) + instructions (Text)
  2. Inventory: user provided invoice_march.pdf (PDF = Document type)
  3. Match: invoice_march.pdf maps to invoice input (name similarity + type match)
  4. Copy: cp ~/documents/invoice_march.pdf <output_dir>/inputs/invoice.pdf
  5. Unfilled: instructions has no user file. Generate synthetic text: "Extract all line items, totals, and vendor information from this invoice."
  6. Assemble:
{
  "invoice": {
    "concept": "native.Document",
    "content": {
      "url": "inputs/invoice.pdf",
      "mime_type": "application/pdf"
    }
  },
  "instructions": {
    "concept": "native.Text",
    "content": {
      "text": "Extract all line items, totals, and vendor information from this invoice."
    }
  }
}

Example 4: Folder of images for batch processing

Method: Batch image captioner expecting images: Image[]

User says: "Use the photos in ./product-photos/"

  1. Get schema: needs images (Image[])
  2. Expand folder: ./product-photos/ contains shoe.jpg, hat.png, bag.jpg
  3. Copy all to <output_dir>/inputs/
  4. Assemble:
{
  "images": {
    "concept": "native.Image",
    "content": [
      {"url": "inputs/shoe.jpg", "mime_type": "image/jpeg"},
      {"url": "inputs/hat.png", "mime_type": "image/png"},
      {"url": "inputs/bag.jpg", "mime_type": "image/jpeg"}
    ]
  }
}

Reference

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

35.9%
按下载量换算0

Claude

31.76%
按下载量换算0

Cursor

19.23%
按下载量换算0

Gemini CLI

10.12%
按下载量换算0

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills