maa-pipeline-generate

maa-pipeline-generate is a skill for Claude Code, Codex from KhazixW2/Everything-Maa. It costs 69 tokens per session (5,077 once invoked), scanned A, original, MIT.

A MaaFramework skill for generating pipeline nodes and screen-recognition settings from screenshots or observed interface states. MaaFramework pipelines describe automated actions and the conditions that connect them.

In plain words
What is it for?
Use it to create OCR, template, color, or custom-recognition nodes, tune screen regions, and merge tested nodes into pipeline JSON files.
Why use it?
It reduces the manual work of turning visible interface text and regions into correctly linked automation steps.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present. Also seen: reads .claude/ paths; $skill-name invocation.

Part of the everything-maa plugin — 14 skills, 3 MCP servers shipped together

Good fit Use it to create OCR, template, color, or custom-recognition nodes, tune screen regions, and merge tested nodes into pipeline JSON files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/khazixw2/everything-maa/maa-pipeline-generate
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add KhazixW2/Everything-Maa --skill maa-pipeline-generate
Clone the repo
git clone --depth 1 https://github.com/KhazixW2/Everything-Maa

Made for: Claude Code, Codex.

Or install everything-maa, the plugin that ships this one along with the rest of its 14 skills, 3 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for maa-pipeline-generate

README.md
[![agentmods](https://agentmods.dev/badge/skills/khazixw2/everything-maa/maa-pipeline-generate/github.svg)](https://agentmods.dev/skills/khazixw2/everything-maa/maa-pipeline-generate)
Your own site
<a href="https://agentmods.dev/skills/khazixw2/everything-maa/maa-pipeline-generate"><img src="https://agentmods.dev/badge/skills/khazixw2/everything-maa/maa-pipeline-generate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for maa-pipeline-generate

Your own site · 80×15
<a href="https://agentmods.dev/skills/khazixw2/everything-maa/maa-pipeline-generate"><img src="https://agentmods.dev/badge/skills/khazixw2/everything-maa/maa-pipeline-generate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,077 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.05077
Opus 5 $0.00034 $0.02538
Sonnet 5 $0.00014 $0.01015
Haiku 4.5 $0.00007 $0.00508

Measured 11d ago against content hash c98df059c856, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

maa-pipeline-generate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/generate_node.py, scripts/generate_sweep.py, scripts/project_paths.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/maa-pipeline-generate/SKILL.md · 313 lines

How it starts

The opening of the file, as written. The whole thing — 313 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Maa Pipeline Generate

如果用户提出的是尚未定义起始状态、安全边界和验收条件的端到端自动化目标,先交给 $maa-workflow-build 建立任务契约与状态机;已有契约时,再用本 skill 生成其中的具体节点与识别参数。

项目初始化接力

生成节点前先在目标项目根目录查找 basic_info.md。存在且包含第 0 节时,读取“0. Maa Skills 接力协议”和第 3/4/5/7/8/9 节,用它快速定位目标文件、公共节点、返回路径、OCR 文本、模板目录与 ROI 基准。它是缓存,不替代当前目标文件和当前设备画面;生成前仍须核实目标文件语法风格,并重新 OCR/截图确认页面。文件缺失或没有第 0 节时按本 skill 直接发现项目结构;不得自动调用 $maa-project-init,只有用户明确要求初始化或刷新时才调用。若相关源码更新更晚,则把缓存视为可能过期并以当前源码为准,不自动刷新或覆盖。

概念

Pipeline 由 Node 组成。本 skill 针对OCR 文本识别节点,按 Pipeline 协议生成节点 JSON 并合并到目标 pipeline 文件。

核心流程:连接设备 → ocr() 拿 box → 扩大 ROI → 合并节点

自带脚本(位于本 skill 的 scripts/ 目录):

脚本 用途
scripts/generate_node.py 单节点生成(默认 expand=20
scripts/generate_sweep.py 多 expand 变体扫描,找最佳 ROI

MCP 工具绑定

依赖 maa-mcp MCP 服务。

工具 说明
find_adb_device_list / connect_adb_device 连接设备
ocr 截图 + OCR 一步完成(内部已调 screencap,外部不要再调)
load_pipeline / save_pipeline 读/写 pipeline JSON
check_and_download_ocr 首次需下载 OCR 模型
run_pipeline 测试 pipeline 节点

输入参数

参数 必填 默认 说明
target_text 要识别的目标中文文字
node_name 节点名(PascalCase)
pipeline_file 目标 pipeline 路径(推荐传主 Interface 声明资源根下的项目相对或绝对路径;assets/resource/base/pipeline/xxx.json 是 boilerplate-family 项目示例)
action_type Click Click / DoNothing / LongPress / Swipe / ClickKey / InputText
expand_offset 20 ROI 扩边像素(推荐先用 sweep 找最佳
post_delay 500
timeout 2000
overwrite False 节点名冲突时是否覆盖

3 步工作流(伪代码)

# === Step 1: 连接设备 ===
from maa_mcp.adb import find_adb_device_list, connect_adb_device
controller_id = connect_adb_device(find_adb_device_list()[0])

# === Step 2: OCR 拿 box + 算 ROI ===
from maa_mcp.vision import ocr
from maa_mcp.download import check_and_download_ocr

ocr_results = ocr(controller_id)
if isinstance(ocr_results, str) and "OCR 模型文件不存在" in ocr_results:
    check_and_download_ocr()
    ocr_results = ocr(controller_id)

matched = [r for r in ocr_results if target_text in (r.text if hasattr(r, "text") else r["text"])]
best = max(matched, key=lambda r: r.score if hasattr(r, "score") else r["score"])
box = best.box if hasattr(best, "box") else best["box"]

# 扩大 ROI(720p 硬编码 + 4 边裁剪)
SCREEN_W, SCREEN_H = 720, 1280
x, y, w, h = box
E = expand_offset
roi = [
    max(0, x - E),
    max(0, y - E),
    min(SCREEN_W - max(0, x - E), w + 2 * E),
    min(SCREEN_H - max(0, y - E), h + 2 * E),
]

# === Step 3: 合并到目标 pipeline ===
from maa_mcp.pipeline_tools import load_pipeline, save_pipeline
from pathlib import Path

# Read resource[].path from the project's main Interface and resolve the
# supplied path against that project root before reading or writing it.
project_root = find_project_root()
pipeline_path = resolve_pipeline_path(pipeline_file)

existing = load_pipeline(str(pipeline_path)) or {}
if node_name in existing and not overwrite:
    raise RuntimeError(f"节点 '{node_name}' 已存在")
existing[node_name] = {
    "recognition": "OCR",
    "expected": [target_text],
    "roi": roi,
    "action": action_type,
    "post_delay": post_delay,
    "timeout": timeout,
}
save_pipeline(
    pipeline_json=json.dumps(existing, ensure_ascii=False, indent=4),
    output_path=str(pipeline_path),
    overwrite=True,
)

Read the full file on GitHub · 313 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 313 lines · 69 tokens per session scan A c98df059c856

Subscribe to this mod's changes

maa-pipeline-generate is a skill published in the GitHub repository KhazixW2/Everything-Maa (12 stars, last pushed 3d ago), licensed MIT. It adds 69 tokens to every session and 5,077 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

qa

QA test your code changes by reading your git diff, choosing the right validation path for frontend/browser and backend changes, and reporting pass/fail with evidence.

Skyvern-AI/skyvern · 33 tokens

gemigo-cli

Use when the user wants to publish an already-built static website or front-end app through GemiGo, such as a Vite/React/Vue static build, plain HTML/CSS/JS page, landing page, demo, docs site, or small browser app, and get a hosted public URL.

Peiiii/nextclaw · 65 tokens

ui-ux-pro-max

Use when the user wants professional UI/UX design guidance, design-system generation, UX review, or stack-specific frontend guidance through a bundled local UI/UX Pro Max dataset and Python search runtime.

Peiiii/nextclaw · 45 tokens

panel-app-react-vite-creator

Create or update an engineering-style NextClaw Panel component with pnpm, Vite, React, TypeScript, and Tailwind CSS, then build it into a static .panel directory inside a schema v2 package or an explicitly loose workspace Panel. Use for modern, reusable, complex, Agent-powered, typed Panel interfaces.

Peiiii/nextclaw · 73 tokens

coding-standards

A set of general coding standards and practical patterns for TypeScript, JavaScript, React, and Node.js. It covers readable naming, simple designs, avoiding repetition, and delaying unnecessary features.

loulanyue/awesome-claude-notes · 41 tokens

accessibility-patterns

WCAG 2.2 AA compliance, ARIA patterns, keyboard navigation, screen reader optimization.

vibeeval/vibecosystem · 24 tokens