Skip to content

chore: add mobile visual testing skill - #79

Open
cryptotavares wants to merge 3 commits into
mainfrom
cryptotavares/add-mobile-visual-agent-skill
Open

chore: add mobile visual testing skill#79
cryptotavares wants to merge 3 commits into
mainfrom
cryptotavares/add-mobile-visual-agent-skill

Conversation

@cryptotavares

@cryptotavares cryptotavares commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Description

Adds the mobile-visual-testing skill under domains/testing/skills/. The skill teaches AI agents how to drive MetaMask Mobile on an iOS Simulator through the project-local mm CLI for visual testing — launching the app, inspecting the current screen, tapping/typing, capturing screenshots, and debugging runtime state.

This skill is the agent-facing companion to the tooling PR in the mobile repo: MetaMask/metamask-mobile#33858 (feat: add visual test agent). That PR adds the actual mm CLI (built on @metamask/client-mcp-core + @metamask/device-mcp, idb backend); this PR adds the skill that documents and standardizes how agents use it. The two should land together.

What the skill covers

  • skill.md — the required workflow: yarn mm:doctorlaunchdescribe-screen → interact (click/type/wait-for) → verify + screenshotcleanup. Includes iOS targeting rules (--testid and a11y refs only), prod-only guardrails, and mobile gotchas.
  • references/cli-reference.md — full command tables, syntax rules, targeting details, and the browser-only / e2e-only commands that are unavailable on mobile.
  • references/error-recovery.md — error-code table (MM_*) and troubleshooting for launch, interaction, daemon, and Hermes failures.
  • references/state-manipulation.md — reading/writing runtime state and calling controller methods via mm cdp (Hermes runtime).
  • references/runtime-monitoring.md — capturing network requests and console logs via Hermes runtime interceptors.
  • repos/metamask-mobile.md — repo-specific context for the skill.

Type of Change

  • New skill

Skill Details (if adding a new skill)

Provider Name: MetaMask
Skill Name: mobile-visual-testing (domain: testing)
Brief Description: Drives MetaMask Mobile on an iOS Simulator via the mm CLI (idb backend) for visual testing — verify UI changes, capture screenshots, test wallet flows, and debug app state. iOS-only, prod-only, reuses installed app/wallet state.

Checklist

  • I have read the CONTRIBUTING.md guidelines
  • My skill follows the SKILL_TEMPLATE.md format
  • I have tested this skill with an AI agent
  • My skill does not contain any secrets, private keys, or sensitive data
  • I have added appropriate documentation
  • My changes don't break existing skills

Testing

Exercised the skill end-to-end against a booted iOS Simulator with MetaMask installed: yarn mm:doctor (toolchain PASS/FAIL report), yarn mm launch, describe-screen, click/type via --testid and a11y refs, screenshot, and cleanup. Verified prod-only guardrails (--context e2e rejected) and the documented error codes surface as described.

Additional Context

Linked tooling PR (adds the mm CLI itself): MetaMask/metamask-mobile#33858. This skill has no effect without that CLI present in the mobile repo, and vice versa the CLI is intended to be driven via this skill. In-repo reference for the tooling: tests/llm-workflow/README.md.

Mirror the metamask-mobile tooling changes (client-mcp-core 0.8.0) into the
skill references so the docs match the shipped CLI:

- Migrate MM_IOS_* error codes to the core ErrorCode set
  (MM_DEPENDENCIES_MISSING, MM_DEVICE_NOT_AVAILABLE, MM_INVALID_CONFIG) and
  note that the launch tool collapses unknown codes into MM_LAUNCH_FAILED.
- Document the new launch flags --app-bundle and --metro-port, and add a
  Destructive Launch Flags section (--reinstall, --reset-app-data,
  --allow-fox-code-mismatch) with the --app-bundle / fox_code guardrails.
- Prefer "yarn mm launch --metro-port <port>" over MM_METRO_PORT while
  keeping the env var documented as equivalent.
racitores
racitores previously approved these changes Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants