tool-webview-evaluate-script

A tool for running JavaScript inside a registered app WebView, which is an in-app browser panel, and receiving the result.

In plain words
What is it for?
Reading page text or the DOM, clicking elements, and returning values from JavaScript expressions.
Why use it?
It lets an agent inspect or interact with WebView content without asking the developer to do it manually.

Skill for Claude CodeCodexCursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ohah/react-native-mcp/tool-webview-evaluate-script
Any agent
npx skills add ohah/react-native-mcp --skill tool-webview-evaluate-script
Clone the repo
git clone --depth 1 https://github.com/ohah/react-native-mcp

Made for: Claude Code, Codex, Cursor.

Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 305 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00034 $0.00305
Opus 5 $0.00017 $0.00152
Sonnet 5 $0.00007 $0.00061
Haiku 4.5 $0.00003 $0.00030

Measured 2d ago against content hash 6400b2011a50, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tool-webview-evaluate-script scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/skills/tool-webview-evaluate-script/SKILL.md · 18 lines

What it actually says

webview_evaluate_script

동작

  • 서버가 eval 전송: __REACT_NATIVE_MCP__.evaluateInWebViewAsync(webViewId, script). 앱은 해당 webViewId로 등록된 WebView ref를 찾고, WebView 내부에서 injectJavaScript로 스크립트를 실행한 뒤, 결과를 postMessage로 돌려준다.
  • 앱에서 __REACT_NATIVE_MCP__.registerWebView(ref, id) 호출 필요(예: react-native-webview). Babel이 testID 있는 WebView에 ref·onMessage를 자동 주입하므로 앱에 MCP 전용 코드 없이 사용 가능.
  • webViewId(앱에서 등록한 id)와 script(WebView 안에서 실행할 JS 표현식) 필수. 결과를 받으려면 앱 onMessage가 createWebViewOnMessage로 감싸져 있어야 함(Babel 자동 주입 또는 수동 적용).

활용

  • DOM 조회/클릭: document.querySelector('button').click(), document.querySelector('h1').innerText 등.
  • 값 반환: 스크립트가 표현식으로 평가되면 그 값이 도구 응답으로 반환됨.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 18 lines · 34 tokens per session scan A 6400b2011a50

Subscribe to this mod's changes

tool-webview-evaluate-script is a skill published in the GitHub repository ohah/react-native-mcp (7 stars, last pushed 5mo ago), licensed MIT. It adds 34 tokens to every session and 305 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

general-video

Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated…

heygen-com/hyperframes · 92 tokens

use-agent-browser-for-airi

Test AIRI display-model imports with agent-browser across stage-tamagotchi Electron, stage-web, and stage-pocket mobile web layouts. Use when uploading and verifying contributor-supplied Live2D ZIP, VRM, or MMD ZIP/PMX/PMD files through AIRI's model selector, including onboarding bypass, format-specific import…

moeru-ai/airi · 87 tokens

opencli-sitemap-author

Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.

jackwener/OpenCLI · 67 tokens

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

pinchtab-mcp

Use this skill when a task requires browser automation through PinchTab's MCP server connected to a remote browser instance. Covers navigation, element interaction, data extraction, form filling, multi-step flows, and session management via MCP tools.

pinchtab/pinchtab · 52 tokens

mintlify-preview

Run the public Mintlify product docs site locally for live preview. Use when previewing or iterating on docs under docs/ (.mdx/.md pages, docs.json nav), or when the user says "start the docs", "run mintlify", "preview the docs site".

latitude-dev/latitude-llm · 69 tokens