Appium

How to Use Appium Skill With Claude Code [2026]

Learn how to use the Appium Skill with Claude Code to generate, run, and debug Appium tests for Android and iOS using TestMu AI's agent skills.

Author

Salman Khan

May 8, 2026

An Appium Skill is a curated set of markdown guides that help AI coding agents write production-ready Appium tests by capturing real-world patterns, capability configs, and locator strategies from actual mobile codebases.

Without a skill file, your AI agent falls back on defaults. That means Thread.sleep(5000) on every async wait, XPath selectors that break on the next UI refactor, and capability blocks copy-pasted across every test class without a shared base.

An Appium Skill fixes this by telling the agent your wait strategy, preferred locator hierarchy, and capability setup. The agent stops guessing and starts writing mobile tests that fit your existing project structure.

Overview

What Is an Appium Agent Skill

An Appium Agent Skill is a SKILL.md file that provides AI coding agents with mobile-specific locator strategies, capability configurations, and gesture patterns to generate production-ready Appium tests for Android and iOS.

How to Install the Appium TestMu AI Skill in Claude Code

Here are the steps to install and use the Appium Skill by TestMu AI for agentic mobile testing:

  • Clone the repository: Run git clone https://github.com/LambdaTest/agent-skills.git into your Claude Code skills directory (e.g., .claude/skills/).
  • Install the skill: Copy the appium-skill folder into your tool's skills path for Cursor AI, Claude Code, GitHub Copilot, or Gemini CLI.
  • Prompt the agent: Open agent mode and request Appium tests. The agent reads the skill and generates test files, capability configs, and pom.xml.
  • Run tests locally: Start an Appium server with appium --relaxed-security and run mvn test -Plocal to verify tests pass on an emulator.
  • Scale on cloud: Set TestMu AI credentials and upload your APK or IPA to run tests across real Android and iOS devices at scale.

What Is an Appium Skill

An Appium Skill is a structured markdown guide that gives an AI coding agent the project-specific context it needs to write mobile tests that hold up in production across Android and iOS.

The format is a SKILL.md file, a convention from the open Agent Skills Standard that tools like Cursor AI, Claude Code, GitHub Copilot, and Gemini CLI read before generating code.

The agent loads the skill, then applies its patterns automatically without you having to repeat capability configs or locator preferences on every prompt.

An Appium Skill is not documentation. The official Appium documentation covers what the API does. A skill covers when to use it, which locator strategy to pick first, and which patterns survive a real mobile codebase.

Without a skill, an agent guesses. Below is a tap interaction generated by Claude Code without the skill:


driver.findElement(By.xpath("//android.widget.Button[@bounds='[540,1200][700,1300]']")).click();

And below is the same interaction with the Appium Skill loaded:


driver.findElement(AppiumBy.accessibilityId("colorButton")).click();

The second locator works across screen sizes, OS versions, and layout changes. The first one breaks the moment a developer moves a button 10 pixels.

The Appium Skills Repository by TestMu AI (Formerly LambdaTest)

The Appium Skill is a repository maintained by TestMu AI.

The TestMu AI agent-skills repository covers 46 test automation frameworks across 15+ languages. Appium is one skill in a collection that also includes Playwright, Cypress, Selenium, Espresso, XCUITest, and more.

If your project uses Appium for mobile and Playwright for web, you install two skills. Each AI agent on your team draws from the right context for the right task. Here is how the Appium Skill folder is structured.

Repository Structure


appium-skill/
├── reference/       # Production patterns and playbooks
├── SKILL.md         # Agent entry point

There are two components. Each has a specific job.

  • SKILL.md is what Claude Code reads first. It is a compact metadata file that tells the agent what the skill covers, when to load it, and which reference file to use for Android, iOS, or hybrid app testing. It stays small so it does not bloat the agent's context window on every prompt.
  • reference/ is where the production patterns live. It includes capability configs for UiAutomator2 and XCUITest, locator strategy hierarchy, gesture implementations using the W3C Actions API, cloud integration with TestMu AI real device cloud, and language-specific patterns for Python and JavaScript.
Note

Note: Run your Appium tests on real Android and iOS devices using Agent Skills. Try TestMu AI Today

How to Install the TestMu AI Appium Skill

With the repository structure covered, let's install the skill. Clone the TestMu AI agent-skills repo from GitHub, then copy the appium-skill folder into your tool's local skills directory.

Option 1: Clone the Full Repository

If your stack uses multiple frameworks, clone the whole collection:


# Cursor AI
git clone https://github.com/LambdaTest/agent-skills.git .cursor/skills/agent-skills

# Claude Code
git clone https://github.com/LambdaTest/agent-skills.git .claude/skills/agent-skills

# GitHub Copilot
git clone https://github.com/LambdaTest/agent-skills.git .github/skills/agent-skills

# Gemini CLI
git clone https://github.com/LambdaTest/agent-skills.git .gemini/skills/agent-skills

Option 2: Install Only the Appium Skill

Mobile-only projects can copy just the one directory:


git clone https://github.com/LambdaTest/agent-skills.git
cp -r agent-skills/appium-skill .claude/skills/

How to Run Tests Using Appium Skill

I will use Claude Code agent mode for demonstration. The same workflow applies to Cursor AI, GitHub Copilot, and Gemini CLI.

Open your IDE with agent support and switch to agent mode. Prompt it to write Appium tests, let the agent generate test files and config, then run the generated Maven command to execute and verify tests locally on an emulator.

Step 1: Open Claude Code (or any IDE with AI agent support like Cursor AI or VS Code with GitHub Copilot).

Step 2: Open the agent chat and type this prompt:

Write Appium tests using Java that open the TestMu AI proverbial Android app and tap on the COLOR button.

Claude Code agent chat with Appium test prompt using Appium Skill

Step 3: The agent reads the installed Appium Skill and generates the tests. It creates a Maven project that opens the proverbial Android app, locates the COLOR button using AppiumBy.accessibilityId, taps it once, and asserts that it remains visible after the tap.

Files added:

  • pom.xml
  • src/test/java/com/testmu/proverbial/BaseTest.java
  • src/test/java/com/testmu/proverbial/ColorButtonLocalTest.java
  • src/test/java/com/testmu/proverbial/ColorButtonCloudTest.java
Claude Code agent generating Appium Maven project structure with test files using the Appium Skill

Step 4: Now enter the prompt to run tests.

Appium test passed locally in the terminal using Appium Skill

As you can see, both tests passed locally. The next step is to run the same tests on real devices using the TestMu AI cloud for cross-device and cross-OS coverage.

How to Run Appium Tests on Cloud With TestMu AI Skills

Once tests pass locally, you can scale them using the TestMu AI real device cloud. The Appium Skill makes this transition seamless by including cloud capability templates.

Step 1: Set your TestMu AI credentials as environment variables. Get them from the TestMu AI dashboard under Credentials.


# macOS/Linux
export LT_USERNAME="YOUR_TESTMUAI_USERNAME"
export LT_ACCESS_KEY="YOUR_TESTMUAI_ACCESS_KEY"

# Windows (PowerShell)
$env:LT_USERNAME="YOUR_TESTMUAI_USERNAME"
$env:LT_ACCESS_KEY="YOUR_TESTMUAI_ACCESS_KEY"

Step 2: Prompt the agent to run the same tests on the TestMu AI real device cloud:

Now run the test on TestMu AI real device cloud

Claude Code showing prompt to run tests on TestMu AI real device cloud

The agent reads the cloud integration reference from the Appium Skill and generates the correct capability block:


UiAutomator2Options options = new UiAutomator2Options();
options.setPlatformName("android");
options.setDeviceName("Pixel 7");
options.setPlatformVersion("13");
options.setApp("lt://APP1234567890");
options.setAutomationName("UiAutomator2");

HashMap<String, Object> ltOptions = new HashMap<>();
ltOptions.put("w3c", true);
ltOptions.put("build", "Appium Skill Build");
ltOptions.put("name", "Color Button Test");
ltOptions.put("isRealMobile", true);
ltOptions.put("video", true);
ltOptions.put("network", true);
options.setCapability("LT:Options", ltOptions);

String hub = "https://" + System.getenv("LT_USERNAME") + ":"
           + System.getenv("LT_ACCESS_KEY") + "@mobile-hub.lambdatest.com/wd/hub";
AndroidDriver driver = new AndroidDriver(new URL(hub), options);

The TestMu AI App Automation dashboard shows a video replay of the test running on a real Pixel 7 device, with command-level logs, network activity, and device metrics captured automatically.

TestMu AI Real Device Cloud dashboard showing successful Appium test execution

Are Agent Skills Enough for Appium Test Authoring Needs

Agent skills improve the quality of tests your engineers write. For test authoring at scale, that is only part of the problem.

When sprint velocity outpaces your team's capacity to write new mobile tests, coverage gaps accumulate. Your Appium expert is maintaining existing tests, not authoring new ones. New app flows go untested until someone has time.

Generative AI testing agents like TestMu AI's KaneAI solve the authoring bottleneck directly. Describe the user flow in natural language. KaneAI writes the test and can export it to Appium Java or Python.

Features:

  • Natural Language Test Authoring: Describe the mobile user flow in plain language. KaneAI converts it into executable test steps. No scripting knowledge required.
  • Real Device Execution: Run tests across real Android and iOS devices, OS versions, and screen sizes without extra setup.
  • Multi-Framework Code Export: Export generated tests to Appium Java, Python, or JavaScript. Engineers retain full control over the generated output.
  • 2-Way Test Editing: Switch between a natural language view and a code view while keeping them synchronized.
  • Self-Healing Tests: KaneAI understands what the test verifies and finds the right elements each time, rather than patching broken locators after the fact.
  • Assisted Debugging: KaneAI automatically analyzes failing test steps in real time, providing root cause analysis and actionable suggestions.
  • Multi-Input Support: Feed KaneAI a Jira ticket, PRD, screenshot, or video. It extracts testable mobile scenarios and generates tests from any of these formats.
...

Conclusion

An Appium Skill does not change what Claude Code knows about Appium. It changes what the agent works from. The difference between a mobile test that survives three releases and one that breaks on the next UI update is almost always a locator choice, a hardcoded sleep, or a capability block that was never validated against a real device.

The local-to-cloud progression matters here. Get the patterns right on an emulator first. AccessibilityId locators, explicit waits, W3C gesture actions - these pay off locally before you touch a real device. Real devices add network latency and hardware variation.

The TestMu AI real device cloud adds 10000+ device coverage, video replay, and automatic test status reporting. Each layer builds on the one before it.

The TestMu AI agent-skills repository provides the Appium Skill alongside 45 others, so the same approach extends across your full test stack.

Author

Salman is a Test Automation Evangelist and Community Contributor at TestMu AI, with over 6 years of hands-on experience in software testing and automation. He has completed his Master of Technology in Computer Science and Engineering, demonstrating strong technical expertise in software development, testing, AI agents and LLMs. He is certified in KaneAI, Automation Testing, Selenium, Cypress, Playwright, and Appium, with deep experience in CI/CD pipelines, cross-browser testing, AI in testing, and mobile automation. Salman works closely with engineering teams to convert complex testing concepts into actionable, developer-first content. Salman has authored 120+ technical tutorials, guides, and documentation on test automation, web development, and related domains, making him a strong voice in the QA and testing community.

Open in ChatGPT Icon

Open in ChatGPT

Open in Claude Icon

Open in Claude

Open in Perplexity Icon

Open in Perplexity

Open in Grok Icon

Open in Grok

Open in Gemini AI Icon

Open in Gemini AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Frequently asked questions

Did you find this page helpful?

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests