Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计通过

webnnwebnn 搜索

Agent Skill

webnn 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,788

周安装

76

GitHub Stars

27

下载量

626
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:webnn(webnn 搜索)
来源仓库:https://github.com/webmaxru/agent-skills
仓库路径:skills/webnn
安装命令:
npx skills add https://github.com/webmaxru/agent-skills --skill webnn
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/webmaxru/agent-skills --skill webnn

简介

webnn 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词快速定位候选结果时使用。

  • 它支持基于关键词、任务场景或来源线索进行信息检索,帮助 Agent 高效获取所需资源。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,具体用法可参考原始 README。
  • 安装前建议确认权限范围和维护状态,注意可能触发的联网或命令执行操作。
  • webnn 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

WebNN

Procedures

Step 1: Identify the browser integration surface

  1. Inspect the workspace for browser entry points, UI handlers, worker entry files, and any existing model-loading or inference abstraction layer.
  2. Execute node scripts/find-webnn-targets.mjs. to inventory likely frontend files and existing WebNN markers when a Node runtime is available.
  3. If a Node runtime is unavailable, inspect the nearest package.json, HTML entry point, framework bootstrap files, and worker entry files manually to identify the browser app boundary.
  4. If the workspace contains multiple frontend apps, prefer the app that contains the active route, component, or user-requested feature surface.
  5. If the inventory still leaves multiple plausible frontend targets, stop and ask which app should receive the WebNN integration.
  6. If the project is not a browser web app, stop and explain that this skill does not apply.

Step 2: Confirm WebNN viability and choose the runtime shape

  1. Read references/webnn-reference.md before writing code.
  2. Read references/examples.md when choosing between a direct WebNN graph flow and an adapter around an existing browser ML runtime.
  3. Read references/compatibility.md when native support, preview flags, device behavior, or backend differences matter.
  4. Read references/troubleshooting.md when context creation, graph build, tensor readback, or device selection fails.
  5. Verify that the feature runs in a secure context and in a Window or Worker context (DedicatedWorker, SharedWorker, or ServiceWorker).
  6. If the feature must run on the server, train models, or depend on cloud inference, stop and explain the platform mismatch.
  7. Choose device intent deliberately: use powerPreference: "high-performance" for throughput, powerPreference: "low-power" for power-efficient acceleration, or accelerated: false to prefer CPU inference for maximum reach.
  8. Treat accelerated and powerPreference as preferences, not guarantees. Browser backends can still partition graphs or fall back per operator.
  9. Choose a direct MLGraphBuilder flow when the application owns graph construction or can keep a small deterministic graph path.
  10. Choose an adapter around an existing local runtime only when the application already loads models through that runtime and the task is to prefer WebNN acceleration without rewriting the full inference stack.
  11. If the project uses TypeScript, add or preserve typings for the WebNN surface used by the project.

Step 3: Implement a guarded runtime adapter

  1. Read assets/webnn-runtime.template.ts and adapt it to the framework, state model, and file layout in the workspace.
  2. Centralize support detection around window.isSecureContext, navigator.ml, and the requested execution context instead of scattering checks through UI components.
  3. Create an MLContext only at the boundary where the app is ready to initialize local inference.
  4. Pass explicit accelerated and powerPreference values when the product has a real preference, and omit tuning that the product cannot justify.
  5. Build the graph through MLGraphBuilder when the feature uses direct WebNN operations, or route existing model execution through the app's existing local runtime adapter when that runtime is already responsible for model loading and pre/post-processing.
  6. Reuse the compiled graph and reusable tensors when input and output shapes stay stable across requests.
  7. Use context.writeTensor(), context.dispatch(), and await context.readTensor() in that order for direct graph execution.
  8. Observe context.lost and rebuild the context, graph, and tensors if the browser invalidates the execution state.
  9. Destroy tensors, graphs, and contexts when the feature is disposed or the route no longer needs them.

Step 4: Wire UX and fallback behavior

  1. Surface distinct states for unsupported browsers, secure-context failures, runtime preparation, ready native execution, and explicit fallback execution.
  2. Keep a non-WebNN path for unsupported browsers or unsupported devices when the feature must remain available.
  3. Keep the fallback explicit and product-approved. Do not silently swap in a remote model provider when the feature is supposed to stay local.
  4. Present device choice as an intent, not a promise that every operator will execute on that device.
  5. Move long-running model preparation or repeated inference off the main thread when the application already uses a worker-friendly architecture.
  6. Keep all user data handling consistent with the product's local-processing promises and privacy requirements.

Step 5: Validate behavior

  1. Execute node scripts/find-webnn-targets.mjs. to confirm that the intended app boundary and WebNN markers still resolve to the edited integration surface.
  2. Verify secure-context and navigator.ml detection before debugging deeper runtime issues.
  3. For direct WebNN paths, run a smoke test that creates a context, builds a trivial graph, writes inputs, dispatches, and reads outputs.
  4. Test the intended accelerated and powerPreference settings and confirm that fallback behavior remains usable when an accelerated context cannot be created.
  5. Use context.opSupportLimits() when operator coverage or tensor data type support influences graph design.
  6. Confirm the app does not reuse destroyed tensors, graphs, or contexts.
  7. If the target environment depends on preview Chromium flags or milestone-specific behavior, confirm the required browser state from references/compatibility.md before treating runtime failures as application bugs.
  8. Run the workspace build, typecheck, or tests after editing.

Error Handling

  • If navigator.ml is missing, confirm secure-context requirements and browser support from references/compatibility.md before changing application code.
  • If createContext() fails for an accelerated or high-performance request, retry only through the product's approved fallback plan and surface the failure reason.
  • If build() or dispatch() fails, check references/examples.md and references/troubleshooting.md for operator, shape, and device mismatches before rewriting the feature.
  • If context.lost resolves, treat the current context, graph, and tensors as invalid and recreate them before the next inference attempt.
  • If the product only has a remote inference contract, stop and explain that this skill does not directly apply.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.71%
按下载量换算236

Claude

31.49%
按下载量换算197

Cursor

18.65%
按下载量换算117

Gemini CLI

9.08%
按下载量换算57

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills