做什么
为Android和iOS创建,运行并维护Momentic移动E2E测试和模块. 使用 Momentic MCP 工具进行活设备验证,并使用直接 v2 YAML 编辑仅用于高自信本地移动 v2 更改.
技能库 智客分类:Agent 工作流 momentic-mobile-test
为Android和iOS创建,运行并维护Momentic移动E2E测试和模块. 使用 Momentic MCP 工具进行活设备验证,并使用直接 v2 YAML 编辑仅用于高自信本地移动 v2 更改.
官方网址:skills.sh
先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。
为Android和iOS创建,运行并维护Momentic移动E2E测试和模块. 使用 Momentic MCP 工具进行活设备验证,并使用直接 v2 YAML 编辑仅用于高自信本地移动 v2 更改.
官方 description 未单独写出 Use when。按规范,代理会在用户任务与这段 description 的关键词匹配时激活本技能。
按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Momentic model、Project files and formats、Choose the workflow、Setup prerequisites、Before editing、Authoring rules。 其中含规范建议的小节:分步指令。
文件分析:这是一份仅含 SKILL.md 的指令型技能,代理激活后整份正文进入上下文。
Create, run, and maintain Momentic mobile E2E tests and modules for Android and iOS. Use Momentic MCP tools for live device validation, and use direct v2 YAML edits only for high-confidence local mobile v2 changes.
Momentic modelProject files and formatsChoose the workflowSetup prerequisitesBefore editingAuthoring rulesTest execution behaviorCache and memoryReadiness and timingCommon execution pitfallsDevices, apps, and settingsTest context
来源分类:skills.sh agent-skill
namemomentic-mobile-testdescription具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗
先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。
复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。
把 Agent Skill「momentic-mobile-test」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-a64f04ff5d9a15f7-Momentic-Mobile-Test.html 请存为 .cursor/skills/momentic-mobile-test/SKILL.md 或 .claude/skills/momentic-mobile-test/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。
npx skills add 'https://github.com/momentic-ai/skills' --list
npx skills add 'https://github.com/momentic-ai/skills' --skill 'momentic-mobile-test'
CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。
Momentic Mobile turns structured natural language into native and webview automation on Android emulators and iOS simulators. Interactive steps resolve targets into device actions; assertions can inspect screenshots, native hierarchies, and webview state.
Mobile tests use *.test.yaml; modules use *.module.yaml. Test IDs live in the
test file's id field. Check momentic.config.yaml and test-level metadata
before assuming project defaults apply.
fileType: momentic/mobile-test/v2 and
fileType: momentic/mobile-module/v2 identify mobile v2. Treat missing or
different fileType as deprecated v1. Never edit v1 YAML directly; persist
changes through momentic_test_splice_steps.
Mobile v2 tests require platform: ANDROID or platform: IOS. Commands are
platform-specific.
A mobile v2 test carries its own defaults: defaultEnv for environment
variables, defaultChannel for the app channel, and defaultTag for a tag or
an alias such as nightly. --env, --channel and --tag override them.
defaultTag is optional: without it, the run installs the latest tag in the
channel. In the local region the test installs defaultApkFilePath or
defaultAppFilePath instead.
V2 can reference modules, JavaScript, and injected files with relative paths.
Paths resolve from the YAML file containing the reference. Use ./... or
../..., never absolute paths or ~. Before moving, renaming, or deleting a
referenced file, grep its path and update or remove every reference. File-backed
JavaScript is v2-only; v1/MCP step strings carry code inline. Do not add internal
or generated fields to v2 YAML.
Prefer these compact workflows unless the user requests something else:
momentic_test_create -> author a known v2 sequence
in one YAML edit, or use MCP step-by-step when live discovery is needed.
momentic_session_start only opens an existing test.Use MCP as the default interactive interface. Preview and run wait 30 seconds by
default, then return a stepRunnerId while work continues. Leave
timeoutSeconds unset for most calls, especially single preset steps. Lower it
only when the coding agent's tool timeout is shorter; raise it only within a
larger tool timeout. Poll returned handles with momentic_poll_runner.
Prefer the test's configured remote device and app settings. Use local device or app overrides only when the user explicitly requests them.
Run npx momentic-mobile doctor for initial setup and launch, driver, device,
or connectivity failures. Use --json when collecting a support report. See
the doctor reference.
Remote Android requires adb and ANDROID_HOME; local Android also requires
Java and Android Studio. Local iOS requires macOS and Xcode; remote iOS does not
once a simulator build is available. Follow the
Android or
iOS setup guide rather than
guessing at missing dependencies.
Android WebView automation requires a build with WebView debugging enabled.
Debug builds usually provide it; release builds must enable it explicitly.
Missing debugging commonly appears as No browser controller is attached to the requested webview. Mobile WebViews run through the device and do not need
a local Chromium installation.
Confirm the goal, user-visible success criteria, platform, app source, provider, auth, and env requirements. Ask before previewing or running any step or AI action that may submit, purchase, delete, send, create, or cause another non-idempotent side effect. If approved, execute it at most once. Also ask before using local device overrides, editing a shared module, restarting a long flow, or running an expensive full test.
before / steps / after structure unless the test
intent requires a change.Momentic caches native selectors, XML nodes, visible text, webview state, coordinates, and other metadata. AI checks may also reuse past-result memory. Stale cache or memory can explain a fast wrong-target action or a repeated borderline verdict.
Cache is scoped by git metadata, including branch. Protected branches read cache
but do not write it unless --save-cache is used or CI is set.
DANGEROUS_FORCE_DYNAMIC or --disable-cache to locator steps; built-in cache
validation refinds changing targets.CacheId into the exact step being spliced.emulator.smartWaitingTimeoutMs budgets readiness before AI locate, cached
element retries, and other single-interaction waits. emulator.waitForStability
instead waits after each interactive step so its effects land before the next
step begins. Turn on waitForStability for apps that load incrementally,
animate between screens, or are broadly slow. It does not control pre-targeting
waits.
Within smart waiting, do not add sleeps. For longer or semantic readiness, use an element, screen, or AI check that describes the required positive state. Checks retry until their timeout; increase that timeout instead of polling with JavaScript. See mobile configuration for project-wide timing settings.
Test-level settings can override project platform, app asset, emulator, locale, timezone, geolocation, timeout, header, and environment defaults. Inspect both levels before changing behavior.
For managed assets, use the channels artifact from
momentic_get_artifacts as the source of truth for valid platform channels,
tags, and aliases. Follow the current tool description for defaultChannel and
defaultTag behavior.
Each run has a test-scoped env that persists across steps and modules.
saveAs; in MCP step strings, use
--env-key. Use setVariable(name, value) in JavaScript when saving several
values.env.NAME in JavaScript and module input expressions. Use
{{ env.NAME }} in string fields, but not inside JavaScript source.env.X for variables.Use native tap, type, swipe, scroll, wait, and check steps for device behavior. They retain Momentic's targeting, smart waiting, cache, and traces. Do not use JavaScript to reproduce those actions or poll UI state when a check can retry.
Use mobile JavaScript for test setup, data generation, APIs, databases, OTP/email/SMS, assertions, and context writes that no native step expresses. Keep one-off code short; for reusable v2 scripts, follow nearby project conventions. See the mobile JavaScript command for current syntax.
Mobile v2 is human-editable. Tests use before, steps, and after; modules use
steps. Each step has one command key, durations are milliseconds, and runnable
step IDs are not stored in YAML.
Make the smallest edit and match nearby syntax. Common pitfalls:
0..100 in v2 YAML or 0..1 in MCP step strings.Consult File format for
top-level structure and Steps for
step syntax. Run npx momentic-mobile lint when schema or file-reference risk
warrants it.
After a disk edit, reload the active MCP test if available; otherwise terminate
and restart the session. momentic_test_get reads persisted state but does not
refresh an active session.
Use tool descriptions and the platform-specific Step Authoring Guide returned by session start for current arguments and step syntax. Do not duplicate that reference material from this skill.
Do not call context tools as session-start boilerplate. Use them on demand and follow their descriptions, especially when they offer filters or return large project data.
momentic_session_start by itself. Its Test
Content provides active steps and runnable IDs; the platform comes from the
test.momentic_get_artifacts only to discover unknown tests, modules,
environments, local devices, simulators, or managed asset channels. Avoid
redundant refreshes.momentic_test_get to inspect persisted state before starting, or to read
a different test. Prefer active session and splice responses afterward.momentic_get_environment_variables only when a step needs env
data that is not already known.momentic_module_recommend -> momentic_module_get only when evaluating
reuse; recommendation invokes AI and is not required to start a session.Only one device operation may run per session. Do not issue concurrent preview, run, state, or splice operations against the same session.
CacheId only to its
exact step, then read the splice response for current step refs.stepRunnerId, poll it instead of starting another device operation.Batch obvious low-risk steps. Preview uncertain targets individually. For a non-idempotent action, preview setup, splice the checkpoint, then run the approved saved action at most once.
MCP screenshots are the default signal. Request serialized emulator state for accessible names, native XML, webview structure, screen bounds, or offscreen context. Read environment and installed-app artifacts only when diagnosing data, launch, or install behavior.
For a logical flow of roughly four or more reusable steps, check
momentic_module_recommend -> momentic_module_get -> reuse or inline. Modules
cannot contain modules. Ask before changing a shared module.
Respect declared parameters, defaults, and enum values. Module inputs are
JavaScript fragments, not {{ }} templates.
emulator.smartWaitingTimeoutMs. Do not use it to mask one slow assertion.resetSession: true.0..1; v2 YAML uses percentages from 0..100.SCROLL_TO when searching for a target. Use manual SWIPE only when no
target exists or scrolling is not appropriate.env.X versus
{{ env.X }} at the consumer.After about three attempts at the same failure, stop and ask the user for direction.
Agent 工作流
创造有效技能指南。 当用户想创造出新的技能(或更新现有的技能),以专业知识,工作流程,或工具集成来扩展克洛德的能力时,应该使用这种技能.
Agent 工作流
使用ClawdHub CLI搜索,安装,更新并发布从taladhub.com的代理技能. 需要获取苍蝇上的新技能时使用,将安装的技能同步到最新版本或特定版本,或者发布 npm-instainddhub CLI 的新/更新的技能文件夹.
Agent 工作流
管弦乐团多代理团队,任务设定周期,交接协议,审查工作流程. 使用时间: (1)建立2+特派员队伍,具有不同专业,(2)确定任务路线和生命周期(收录框_ spec_建设_审查_完成),(3)在特派员之间制定交接协议,(4)建立审查和质量关口,(5)管理特派员之间的交流和文物共享.
Agent 工作流
Spec-first,TDD,子代理驱动的软件开发工作流程. 当:(1)构建任何新功能或应用——触发脑暴_计划_子代理执行回路,(2)调试出一个bug或测试失败——触发系统性的根起过程,(3)用户说"让我们构建","帮助我计划","我想添加X",或"这个被打破",(4)完成一个功…