by mozarkai
Open-source test automation for Android, iOS, web, smart TV (Android TV, Tizen, webOS) and Bluetooth (BLE) devices. Write tests as CSV/YAML, record them live, or let an AI agent build them over MCP. Self-healing locators: XPath, text, OCR, image.
Available after the catalog security scan passes.
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM lists this project for discovery and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
# Add to your Claude Code skills
git clone https://github.com/mozarkai/optics-frameworkGuides for using ai agents skills like optics-framework.
See how optics-framework compares with popular alternatives.
Docs · Install · Quickstart · Playground · Keywords
Optics is open-source test automation for Android, iOS, web, smart TV and desktop apps. You write a test as data, in CSV or YAML. Each element can have more than one way to find it, and Optics tries them in order: XPath, text, OCR, image, then an optional AI recovery. When the app changes and one way breaks, the next way finds the element and the test continues.
These four pages on optics-framework.org need no install. Click an image to open the page.
/playground loads the optics-framework wheel from PyPI on Pyodide. Edit the suite, break a locator, then run dry_run or execute on Birch, a demo shop app. The output and junit_output.xml come from Optics itself.
optics live, next to a phone
The homepage playground is a simulation of optics live. Type a step or tap the phone. Each step runs at once and shows how Optics found the element. /save writes the steps that passed into modules.csv and elements.csv. Under the phone, each step also shows as CSV, Python, Robot, an HTTP call and an MCP call.
/run replays a real run of the Birch suite against two releases of the app. Each frame is a file that the run wrote. Release 2.2 passes every step and fails the run, because the last screen shows "Session expired".
/explain reads a suite row by row. It shows what each step does, how each value resolves and what optics dry_run reports for it.
One line installs the optics command into its own environment under ~/.optics:
curl -fsSL https://optics-framework.org/install | sh # macOS, Linux
irm https://optics-framework.org/install.ps1 | iex # Windows
Then run optics quickstart. It asks what you want to test, installs the engine for it, makes a project, checks your setup and runs the first test. Each prompt has a default.
To use pip, you need Python 3.12 or newer. The core package has no drivers, OCR or AI engines. Add the extras that you need:
python3 -m venv .venv && source .venv/bin/activate
pip install "optics-framework[appium,easyocr]"
| Kind | Extras |
|---|---|
| Drivers | appium · selenium · playwright · ble |
| OCR | apple-vision · rapidocr · easyocr · pytesseract · google-vision |
| AI | gemini · openai · anthropic |
| MCP server | mcp |
| Bundles | mobile · web · vision · llm · all |
optics setup --list shows the same engines, and optics setup --install appium easyocr installs them for the Optics version you have.
[!IMPORTANT] A driver extra installs only the Python client. A phone test also needs the Appium server, a device or emulator, and the platform tools.
pytesseractneeds the Tesseract program, andplaywrightneeds its browsers (playwright install). See the install guide.
[!WARNING] Do not use Conda with
easyocr. Its NumPy version conflicts with the one that Optics needs. Usevenv.
optics live next to your device. Each step that works is recorded, and /save writes the recording into your suite as a module.optics live and describe the flow. An AI model (Gemini, Claude, OpenAI or a local model) drives the device one step at a time, then keeps only the steps that mattered.optics mcp install to register the MCP server with Claude Code, or add optics mcp to any MCP client. Your agent looks, taps, types and checks through the tools. When it is done, it gets the steps it ran as a suite.A suite is three kinds of file. Optics finds each file by its CSV header or YAML keys, not by its folder.
my_test_project/
├── config.yaml
├── test_cases/test_cases.csv
├── modules/modules.csv
└── test_data/
├── elements.csv
├── error_definitions.csv # optional
└── input_templates/*.png # optional, for image matching
elements.csv gives a name to each element. Give a name more than one row and Optics tries each value in order.
Element_Name,Element_ID
email_field,//android.widget.EditText[@resource-id="email"]
email_field,Email
sign_in,Sign in
sign_in,sign_in_button.png
A value can be an XPath, text=…, css=…, plain text, an image file from input_templates/, or TEXT_ONLY:… to search with OCR only.
modules.csv holds the steps, one keyword for each row. ${name} reads a value from elements.csv.
module_name,module_step,param_1,param_2
Sign In,Enter Text,${email_field},ava@birch.shop
Sign In,Press Element,${sign_in}
test_cases.csv sets the modules that each test case runs, in order. A test case named Suite Setup or Suite Teardown runs before or after all the others.
test_case,test_step
Suite Setup,Launch Birch
Sign in and buy,Sign In
Sign in and buy,Add To Cart
Each keyword that acts on an element tries these ways in order and stops at the first one that works:
| # | Way | What it does |
|---|---|---|
| 1 | XPath | Queries the accessibility tree through the driver |
| 2 | Text | Finds the visible text, CSS or class in the page source |
| 3 | OCR | Reads the screenshot with Apple Vision, RapidOCR, EasyOCR, Tesseract, Google Vision or a remote OCR server |
| 4 | Image | Matches a reference picture of the element on the screenshot |
| 5 | AI self-heal (optional) | An LLM reads the screen and recovers with the same keywords |
The fast ways run first, so OCR and image matching cost time only when the tr
optics-framework is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by mozarkai. Open-source test automation for Android, iOS, web, smart TV (Android TV, Tizen, webOS) and Bluetooth (BLE) devices. Write tests as CSV/YAML, record them live, or let an AI agent build them over MCP. Self-healing locators: XPath, text, OCR, image. It has 317 GitHub stars.
optics-framework's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/mozarkai/optics-framework" and add it to your Claude Code skills directory (see the Installation section above).
optics-framework is primarily written in Python. It is open-source under mozarkai on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh optics-framework against similar tools.
No comments yet. Be the first to share your thoughts!