Optics
БесплатноБез исполняемых скриптовНе проверенDrive Android, iOS, smart TV and browser sessions with the Optics (optics-framework) MCP server, and write or fix Optics CSV/YAML test suites (test_cases…
от optics-framework306 установок в других каталогахОб этом скилле
Optics (optics-framework)
Optics is newer than your training data. Do not guess keyword names, parameters or defaults:
look them up in the docs below, or read the MCP server's optics://keywords resource.
Set up in OpenClaw
This skill drives the optics-framework MCP server. Register it once (stop the Gateway first):
openclaw mcp add optics --command uvx \
--arg=--from --arg="optics-framework[mcp,appium,playwright]==1.11.0" \
--arg optics --arg mcp
If optics is already on your PATH (for example from the Skills UI installer), use --command optics --arg mcp instead.
The first start downloads the package and can take a minute or two.
Documentation
- Docs index for agents: https://optics-framework.org/docs/llms.txt
- Keyword reference: https://optics-framework.org/docs/reference/keywords/index.md
- MCP server (tools, resources, env vars): https://optics-framework.org/docs/reference/mcp.md
- Write a suite (CSV and YAML): https://optics-framework.org/docs/create/write.md
- YAML rules: https://optics-framework.org/docs/create/yaml.md
- config.yaml: https://optics-framework.org/docs/reference/config.md
- CLI: https://optics-framework.org/docs/reference/cli.md
- Error codes: https://optics-framework.org/docs/reference/errors.md
Drive a device or browser over MCP
start_sessionwithdriver(appium,playwright,seleniumorble),urlandcapabilities. Keep the returnedsession_id; every other tool needs it.- Web:
driver: "playwright",capabilities: {"headless": false}, thenlaunch_appwithapp_identifier: "<url>". - Mobile and TV: an Appium server must already be running (default
http://127.0.0.1:4723); the device goes in the capabilities (udid,deviceName, ...).
- Web:
- Look before you act: read
optics://session/{session_id}/elementsor callget_interactive_elements, and take ascreenshot. Read/sourcewhen you need XPaths. - Act with the keyword tools (
press_element,enter_text,swipe,assert_presence, ...). Pass a locator (xpath=...,text=..., an id) or a label from the elements list. Prefer a web element'slocvalue when it has one. Do not tap by coordinates.detect_and_pressis for optional taps: it succeeds even when the target never appears. - Look again after each action. Action keywords do not wait for a screen to load; verification
keywords such as
assert_presencedo (30 s default). terminate_sessionwhen done. Sessions live only inside this server process.
Every parameter value is a string. Separate several elements with |. A coded failure starts
with the code, e.g. [Code.E0201]; look it up in the error codes page.
The MCP server has no flow-control, record or replay tools. To make a run repeatable, read
optics://project-format and write the steps you ran as a suite.
Write a suite
A project is config.yaml plus CSV or YAML files. Optics classifies each file by its contents,
not its name or folder, and resolves module and element names across all files and both formats.
Scaffold one with optics init <name>.
A CSV is classified by its header row:
| header | the file holds |
|---|---|
test_case,test_step |
test cases, each a list of modules run in order |
module_name,module_step,param_1,... |
modules, each a list of keyword steps |
Element_Name,Element_ID |
elements; repeat a name for fallback locators, tried in order |
error_code,match_string |
error definitions (CSV only, no YAML form) |
Write the headers exactly as shown, case included. A file with a wrong-case header is still recognised but its columns are read as empty, so it loads nothing and the run fails later with an unrelated-looking error such as an element not found.
Step rules:
- Keyword names are case-insensitive:
Press Element,press_element. ${name}is replaced by the element calledname, only when it is the whole value.name=valuesets a parameter by its real name (e.g.timeout_str=20).- Wrap a CSV value that contains commas in double quotes.
YAML holds Test Cases, Modules and Elements in one file. Its traps fail quietly:
- Section keys are exact:
Test Cases,Modules,Elements.test_cases:loads nothing. Test CasesandModulesare lists of single-key mappings (- Sign In:), not plain mappings.- A step is one string: keyword, then values split on spaces. Quote any value with a space:
Press Element "Sign in". Quote XPaths.
Test Cases:
- Shopper can sign in:
- Sign In
Modules:
- Sign In:
- Launch App
- Enter Text ${email_field} [email protected]
- Press Element "Sign in"
- Assert Presence "Welcome"
Elements:
email_field: "//*[@resource-id='com.example:id/email']"
Run it
optics dry_run <folder>checks the suite without a device.optics execute <folder>runs it and writesexecution_output/junit_output.xml.optics listprints every keyword;optics doctorchecks
Установить Optics в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Optics?
Drive Android, iOS, smart TV and browser sessions with the Optics (optics-framework) MCP server, and write or fix Optics CSV/YAML test suites (test_cases, modules, elements, error_definitions). Use when automating or testing a real app UI with Optics, or when an Optics keyword name, parameter or default is uncertain.
Как установить скилл Optics?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Optics запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic