Argent
Use this file as the router. Read only the reference documents relevant to the task, but read each selected document completely before acting.
Route the task
| Task |
Read |
| Find/boot a device; tap, swipe, type, launch, inspect, or control mobile/Chromium/TV UI |
references/device-interaction.md |
| Start/build a React Native app; connect Metro/CDP; inspect components, logs, network, or evaluate JS |
references/react-native.md |
| Test a UI flow; compare screenshots; record, replay, or repair a reusable flow |
references/ui-testing-and-flows.md |
| Diagnose performance; profile React/native code; optimize re-renders, CPU, hangs, memory, jank, or startup |
references/profiling.md |
| Build multiple real design variants and ask the human to choose in Argent Lens |
references/lens.md |
Read multiple references when the task crosses workflows. For example, React Native UI testing normally needs device-interaction.md, react-native.md, and ui-testing-and-flows.md; profiling also needs profiling.md.
Universal rules
- Start with
list-devices; use its platform, runtimeKind, state, and id rather than guessing the target type.
- IDs auto-dispatch: iOS/tvOS UUID, Android adb serial, Vega serial, or
chromium-cdp-<port>. Tools generally call this argument udid; debugger/profiler tools generally call it device_id.
- A target with
runtimeKind: "tv" or platform: "vega" is focus-driven. Never use coordinate gestures; use describe, tv-remote, and keyboard.
- On touch targets, discover controls with
describe first. For React Native, use debugger-component-tree when the accessibility tree is insufficient. Use screenshots for visual state and as a final discovery fallback, not routine coordinate guessing.
- Gesture coordinates are normalized
0.0–1.0. debugger-inspect-element is the exception: it takes logical pixels.
- Prefer
launch-app, restart-app, and open-url over navigating from the home screen.
- Gate transitions with
await-ui-element when a reliable selector exists. Do not replace observable state with blind delays.
- Android React Native requires
adb -s <serial> reverse tcp:8081 tcp:8081 (or the configured Metro port), repeated after a device/adb restart.
- Measure performance before optimizing and re-measure the identical scenario after every fix. Record repeatable interaction paths as flows.
- For visible changes, collect the evidence appropriate to the assertion: visual (
screenshot-diff), structural (describe/component tree), and runtime (logs/network/evaluation/tests`).
Protected Argent updates
The skill directory may contain local changes. Never let an Argent update overwrite it without recovery.
Only update Argent after the user explicitly asks. Before updating:
- Copy the entire
~/.agents/skills/argent/ directory to a timestamped directory outside ~/.agents/skills/.
- Record a recursive diff or checksums for the backup and current directory.
- Run the requested Argent update.
- Diff
~/.agents/skills/argent/ against the backup.
- If the updater changed or removed local skill files, restore the backup exactly.
- Review new upstream skill instructions separately. Do not merge them into the custom skill unless the user asks.
Keep the backup until the update and a subsequent Argent tool call both succeed. Report whether the updater touched the custom skill directory.
Supporting references
Open these only when directed by a workflow:
- references/gesture-examples.md — custom, pinch, rotate, long-press, and drag gestures.
- references/debugger-failure-scenarios.md — Metro/CDP recovery.
- references/debugger-source-maps.md — component-to-source resolution.
- references/profiler-diagnostic-tools.md — standalone and post-analysis profiler queries.
- references/optimization-lint-rules.md — deterministic RN performance lint sweep.
- references/optimization-semantic-checklist.md — semantic RN performance review.
- references/optimization-fix-reference.md — common finding-to-fix mapping.
1---2name: argent3description: Use Argent tools for iOS, Android, tvOS, Android TV, React Native, don't use it for web application. Covers device setup and interaction, UI testing, screenshots and visual diffs, reusable flows, Metro/CDP debugging, React and native profiling, performance optimization, and Argent Lens design variants. Use whenever a task involves Argent, a simulator/emulator/TV device, app UI automation or QA, React Native runtime debugging or profiling, screenshot comparison, flow recording, or Lens proposals.4---56# Argent78Use this file as the router. Read only the reference documents relevant to the task, but read each selected document completely before acting.910## Route the task1112| Task | Read |13| --- | --- |14| Find/boot a device; tap, swipe, type, launch, inspect, or control mobile/Chromium/TV UI | [references/device-interaction.md](references/device-interaction.md) |15| Start/build a React Native app; connect Metro/CDP; inspect components, logs, network, or evaluate JS | [references/react-native.md](references/react-native.md) |16| Test a UI flow; compare screenshots; record, replay, or repair a reusable flow | [references/ui-testing-and-flows.md](references/ui-testing-and-flows.md) |17| Diagnose performance; profile React/native code; optimize re-renders, CPU, hangs, memory, jank, or startup | [references/profiling.md](references/profiling.md) |18| Build multiple real design variants and ask the human to choose in Argent Lens | [references/lens.md](references/lens.md) |1920Read multiple references when the task crosses workflows. For example, React Native UI testing normally needs `device-interaction.md`, `react-native.md`, and `ui-testing-and-flows.md`; profiling also needs `profiling.md`.2122## Universal rules23241. Start with `list-devices`; use its `platform`, `runtimeKind`, state, and id rather than guessing the target type.252. IDs auto-dispatch: iOS/tvOS UUID, Android adb serial, Vega serial, or `chromium-cdp-<port>`. Tools generally call this argument `udid`; debugger/profiler tools generally call it `device_id`.263. A target with `runtimeKind: "tv"` or `platform: "vega"` is focus-driven. Never use coordinate gestures; use `describe`, `tv-remote`, and `keyboard`.274. On touch targets, discover controls with `describe` first. For React Native, use `debugger-component-tree` when the accessibility tree is insufficient. Use screenshots for visual state and as a final discovery fallback, not routine coordinate guessing.285. Gesture coordinates are normalized `0.0–1.0`. `debugger-inspect-element` is the exception: it takes logical pixels.296. Prefer `launch-app`, `restart-app`, and `open-url` over navigating from the home screen.307. Gate transitions with `await-ui-element` when a reliable selector exists. Do not replace observable state with blind delays.318. Android React Native requires `adb -s <serial> reverse tcp:8081 tcp:8081` (or the configured Metro port), repeated after a device/adb restart.329. Measure performance before optimizing and re-measure the identical scenario after every fix. Record repeatable interaction paths as flows.3310. For visible changes, collect the evidence appropriate to the assertion: visual (`screenshot-diff`), structural (`describe`/component tree), and runtime (`logs`/network/evaluation/tests`).3435## Protected Argent updates3637The skill directory may contain local changes. Never let an Argent update overwrite it without recovery.3839Only update Argent after the user explicitly asks. Before updating:40411. Copy the entire `~/.agents/skills/argent/` directory to a timestamped directory outside `~/.agents/skills/`.422. Record a recursive diff or checksums for the backup and current directory.433. Run the requested Argent update.444. Diff `~/.agents/skills/argent/` against the backup.455. If the updater changed or removed local skill files, restore the backup exactly.466. Review new upstream skill instructions separately. Do not merge them into the custom skill unless the user asks.4748Keep the backup until the update and a subsequent Argent tool call both succeed. Report whether the updater touched the custom skill directory.4950## Supporting references5152Open these only when directed by a workflow:5354- [references/gesture-examples.md](references/gesture-examples.md) — custom, pinch, rotate, long-press, and drag gestures.55- [references/debugger-failure-scenarios.md](references/debugger-failure-scenarios.md) — Metro/CDP recovery.56- [references/debugger-source-maps.md](references/debugger-source-maps.md) — component-to-source resolution.57- [references/profiler-diagnostic-tools.md](references/profiler-diagnostic-tools.md) — standalone and post-analysis profiler queries.58- [references/optimization-lint-rules.md](references/optimization-lint-rules.md) — deterministic RN performance lint sweep.59- [references/optimization-semantic-checklist.md](references/optimization-semantic-checklist.md) — semantic RN performance review.60- [references/optimization-fix-reference.md](references/optimization-fix-reference.md) — common finding-to-fix mapping.