Token导航 LogoToken导航

Agent Skill · 开发

browserenginekit(browserenginekit 命令行)

browserenginekit 用于处理浏览器自动化、网页检查和页面信息提取,适合在 Codex、Claude、Cursor、Gemini CLI 中需要让 Agent 打开页面、读取网页或验证前端流程时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

browserenginekit 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有提醒项,按安装量在开发类的 21,746 个 Skill 里排第 2,777。

总安装 14,688周安装 612GitHub Stars 534下载 4,896核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/dpearson2699/swift-ios-skills --skill browserenginekit

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

browserenginekit 提供 iOS 和 iPadOS 上的替代浏览器引擎开发框架。适合在 Codex、Claude、Cursor、Gemini CLI 中构建自定义 HTML/CSS/JavaScript 引擎。支持进程隔离、XPC 通信和系统集成,目标 Swift 6.3 和 iOS 16+。

主要用于欧盟地区的浏览器应用分发,日本需满足 Memory Integrity Enforcement。建议结合原始 README 和仓库文档进一步核验具体使用方法和限制条件。

来源仓库内路径:skills/browserenginekit

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/dpearson2699/swift-ios-skills --skill browsere…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

browserenginekit 怎么安装?

在终端执行 npx skills add https://github.com/dpearson2699/swift-ios-skills --skill browserenginekit。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

browserenginekit 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

browserenginekit 需要什么权限?

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

browserenginekit 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

browserenginekit 用的人多吗?

公开数据是累计安装 14,688 次,近一周安装 612 次,下载 4,896 次,GitHub 534 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

browserenginekit 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
browserenginekit

browserenginekit 命令行 · 本页

14,688534操作浏览器未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

BrowserEngineKit

Framework for building web browsers with alternative (non-WebKit) rendering engines on iOS and iPadOS. Provides process isolation, XPC communication, capability management, and system integration for browser apps that implement their own HTML/CSS/JavaScript engine. Targets Swift 6.3 / iOS 26+.

BrowserEngineKit is a specialized framework. Alternative browser engines are currently supported for distribution in the EU. Japan requires Memory Integrity Enforcement (MIE) for alternative browser engine distribution. Development and testing can occur anywhere. The companion frameworks BrowserEngineCore (low-level primitives) and BrowserKit (eligibility checks, data transfer) support the overall browser engine workflow.

Contents

Overview and Eligibility

Eligibility Checking

Use BEAvailability from the BrowserKit framework to check whether the device is eligible for alternative browser engines:

import BrowserKit

BEAvailability.isEligible(for: .webBrowser) { eligible, error in
    if eligible {
        // Device supports alternative browser engines
    } else {
        // Fall back or show explanation
    }
}

Eligibility depends on the device region and OS version. Do not hard-code region checks; rely on the system API.

Related Frameworks

FrameworkPurpose
BrowserEngineKitProcess management, extensions, text/view integration
BrowserEngineCoreLow-level primitives: kernel events, JIT tag, audio session
BrowserKitEligibility checks, browser data import/export

Entitlements

Browser App (Host)

The host app requires two entitlements:

EntitlementPurpose
com.apple.developer.web-browserEnables default-browser candidacy
com.apple.developer.web-browser-engine.hostEnables alternative engine extensions

Both must be requested from Apple. The request process varies by region.

Extension Entitlements

Each extension target requires its type-specific entitlement set to true:

Extension TypeEntitlement
Web contentcom.apple.developer.web-browser-engine.webcontent
Networkingcom.apple.developer.web-browser-engine.networking
Renderingcom.apple.developer.web-browser-engine.rendering

Optional Entitlements

EntitlementExtensionPurpose
com.apple.security.cs.allow-jitWeb contentJIT compilation of scripts
com.apple.developer.kernel.extended-virtual-addressingWeb contentRequired alongside JIT
com.apple.developer.memory.transfer_sendRenderingSend memory attribution
com.apple.developer.memory.transfer_acceptWeb contentAccept memory attribution
com.apple.developer.web-browser-engine.restrict.notifydWeb contentRestrict notification daemon access

Embedded Browser Engine (Non-Browser Apps)

Apps that are not browsers but embed an alternative engine for in-app browsing use different entitlements:

EntitlementPurpose
com.apple.developer.embedded-web-browser-engineEnable embedded engine
com.apple.developer.embedded-web-browser-engine.engine-associationDeclare engine ownership

Embedded engines use arm64 only (not arm64e), cannot include browser extensions, and cannot use JIT compilation.

Japan-Specific Requirements

Browser apps distributed in Japan must enable hardware memory tagging via com.apple.security.hardened-process.checked-allocations. Apple strongly recommends enabling this in the EU as well.

Architecture

A browser built with BrowserEngineKit consists of four components running in separate processes:

Host App (UI, coordination)
  |
  |-- XPC --> Web Content Extension (HTML parsing, JS, DOM)
  |-- XPC --> Networking Extension (URLSession, sockets)
  |-- XPC --> Rendering Extension (Metal, GPU, media)

The host app launches and manages all extensions. Extensions cannot launch other extensions. Extensions communicate with each other through anonymous XPC endpoints brokered by the host app.

Bootstrap Sequence

  1. Host launches web content, networking, and rendering extensions
  2. Host creates XPC connections to each extension
  3. Host requests anonymous XPC endpoints from networking and rendering
  4. Host sends both endpoints to the web content extension via a bootstrap message
  5. Web content extension connects directly to networking and rendering

This architecture follows the principle of least privilege: the web content extension works with untrusted data but has no direct OS resource access.

Process Management

Launching Extensions

Each extension type has a corresponding process class in the host app:

import BrowserEngineKit

// Web content (one per tab or iframe)
let contentProcess = try await WebContentProcess(
    bundleIdentifier: nil,
    onInterruption: {
        // Handle crash or OS interruption
    }
)

// Networking (typically one instance)
let networkProcess = try await NetworkingProcess(
    bundleIdentifier: nil,
    onInterruption: {
        // Handle interruption
    }
)

// Rendering / GPU (typically one instance)
let renderingProcess = try await RenderingProcess(
    bundleIdentifier: nil,
    onInterruption: {
        // Handle interruption
    }
)

Pass nil for bundleIdentifier to use the default extension target. The interruption handler fires if the extension crashes or is terminated by the OS.

Creating XPC Connections

let connection = try contentProcess.makeLibXPCConnection()
// Use connection for inter-process messaging

Each process type provides makeLibXPCConnection() to create an xpc_connection_t for communication.

Stopping Extensions

contentProcess.invalidate()

After calling invalidate(), no further method calls on the process object are valid.

Extension Types

Web Content Extension

Hosts the browser engine's HTML parser, CSS engine, JavaScript interpreter, and DOM. Subclass WebContentExtension to handle incoming XPC connections:

import BrowserEngineKit

final class MyWebContentExtension: WebContentExtension {
    override func handle(xpcConnection: xpc_connection_t) {
        // Set up message handlers on the connection
    }
}

Configure via WebContentExtensionConfiguration in the extension's EXAppExtensionAttributes.

Networking Extension

Handles all network requests using URLSession or socket APIs. One instance serves all tabs:

import BrowserEngineKit

final class MyNetworkingExtension: NetworkingExtension {
    override func handle(xpcConnection: xpc_connection_t) {
        // Handle network request messages
    }
}

Configure via NetworkingExtensionConfiguration.

Rendering Extension

Accesses the GPU via Metal for video decoding, compositing, and complex rendering. One instance typically serves the entire browser:

import BrowserEngineKit

final class MyRenderingExtension: RenderingExtension {
    override func handle(xpcConnection: xpc_connection_t) {
        // Handle rendering commands
    }
}

The rendering extension can enable optional features:

// Enable CoreML in the rendering extension
extension.enableFeature(.coreML)

Configure via RenderingExtensionConfiguration.

Capabilities

Grant capabilities to extensions so the OS schedules them appropriately:

// Grant foreground priority to an extension
let grant = try contentProcess.grantCapability(.foreground)

// ... extension does foreground work ...

// Relinquish when done
grant.invalidate()

Available Capabilities

CapabilityUse Case
.foregroundActive tab rendering, visible content
.backgroundBackground tasks, prefetching
.suspendedMinimal activity, pending cleanup
.mediaPlaybackAndCapture(environment:)Audio/video playback, camera/mic capture

Media Environment

For media capabilities, create a MediaEnvironment tied to a page URL. The environment supports AVCaptureSession for camera/mic access and is XPC-serializable for cross-process transport:

let mediaEnv = MediaEnvironment(webPage: pageURL)
let grant = try contentProcess.grantCapability(
    .mediaPlaybackAndCapture(environment: mediaEnv)
)
try mediaEnv.activate()
let captureSession = try mediaEnv.makeCaptureSession()

Visibility Propagation

Attach a visibility propagation interaction to browser views so extensions know when content is on screen. Both WebContentProcess and RenderingProcess provide createVisibilityPropagationInteraction().

Layer Hosting and View Coordination

The rendering extension draws into a LayerHierarchy, whose content the host app displays via LayerHierarchyHostingView. Handles are passed over XPC. Use LayerHierarchyHostingTransactionCoordinator to synchronize layer updates atomically across processes.

See references/browserenginekit-patterns.md for detailed layer hosting examples and transaction coordination.

Text Interaction

Adopt BETextInput on custom text views to integrate with UIKit's text system. This enables standard text selection, autocorrect, dictation, and keyboard interactions.

Key integration points:

  • asyncInputDelegate for communicating text changes to the system
  • handleKeyEntry(_:completionHandler:) for keyboard events
  • BETextInteraction for selection gestures, edit menus, and context menus
  • BEScrollView and BEScrollViewDelegate for custom scroll handling

See references/browserenginekit-patterns.md for detailed text interaction implementation.

Sandbox and Security

Restricted Sandbox

After initialization, lock down content extensions using the restricted sandbox:

// In the web content extension, after setup:
extension.applyRestrictedSandbox(revision: .revision2)

This removes access to resources the extension used during startup but no longer needs. Use the latest revision (.revision2) for the strongest restrictions.

JIT Compilation

Web content extensions that JIT-compile JavaScript toggle memory between writable and executable states. Use the BE_JIT_WRITE_PROTECT_TAG from BrowserEngineCore:

import BrowserEngineCore

// BE_JIT_WRITE_PROTECT_TAG is used with pthread_jit_write_protect_np
// to control JIT memory page permissions

Requires the com.apple.security.cs.allow-jit and com.apple.developer.kernel.extended-virtual-addressing entitlements on the web content extension only.

arm64e Requirement

All executables (host app and extensions) must be built with the arm64e instruction set for distribution. Build as a universal binary to also support arm64 iPads.

In Xcode build settings or xcconfig:

ARCHS[sdk=iphoneos*]=arm64e

Do not use arm64e for Simulator targets.

Downloads

Report download progress to the system using BEDownloadMonitor. Create an access token, initialize the monitor with source/destination URLs and a Progress object, then call beginMonitoring() to show the system download UI. Use resumeMonitoring(placeholderURL:) to resume interrupted downloads.

See references/browserenginekit-patterns.md for full download management examples.

Common Mistakes

DON'T: Skip the bootstrap sequence

// WRONG - content extension has no path to other extensions
let contentProcess = try await WebContentProcess(
    bundleIdentifier: nil, onInterruption: {}
)
// Immediately start sending work without connecting to networking/rendering

// CORRECT - broker connections through the host app
let networkEndpoint = try await networkProxy.getEndpoint()
let renderEndpoint = try await renderProxy.getEndpoint()
try await contentProxy.bootstrap(
    renderingExtension: renderEndpoint,
    networkExtension: networkEndpoint
)

DON'T: Launch extensions from other extensions

// WRONG - extensions cannot launch other extensions
// (inside a WebContentExtension)
let network = try await NetworkingProcess(...)

// CORRECT - only the host app launches extensions
// Host app creates all processes, then brokers connections

DON'T: Use extension process objects after invalidation

// WRONG
contentProcess.invalidate()
let conn = try contentProcess.makeLibXPCConnection()  // Error

// CORRECT - create a new process if needed
let newProcess = try await WebContentProcess(
    bundleIdentifier: nil, onInterruption: {}
)

DON'T: Apply JIT entitlements to non-content extensions

JIT compilation entitlements (com.apple.security.cs.allow-jit) are valid only on web content extensions. Adding them to the host app, rendering extension, or networking extension causes App Store rejection.

DON'T: Hard-code region eligibility

// WRONG
if Locale.current.region?.identifier == "DE" {
    useAlternativeEngine()
}

// CORRECT - use the system eligibility API
BEAvailability.isEligible(for: .webBrowser) { eligible, _ in
    if eligible { useAlternativeEngine() }
}

DON'T: Forget to set UIRequiredDeviceCapabilities

Without web-browser-engine in UIRequiredDeviceCapabilities, users on unsupported devices can download the app and hit runtime failures.

Review Checklist

  • com.apple.developer.web-browser-engine.host entitlement on host app
  • Each extension has its type-specific entitlement
  • UIRequiredDeviceCapabilities includes web-browser-engine
  • arm64e instruction set configured for all iOS device targets
  • arm64e is not set for Simulator targets
  • Swift packages built with iOSPackagesShouldBuildARM64e workspace setting
  • Extension point identifiers set correctly in each extension's Info.plist
  • Interruption handlers implemented for all process types
  • Bootstrap sequence connects content extension to networking and rendering
  • Capabilities granted before work begins and invalidated when done
  • Visibility propagation interaction added to browser content views
  • Restricted sandbox applied to content extensions after initialization
  • BEAvailability used for eligibility checks instead of manual region logic
  • Memory attribution configured if rendering extension memory is high
  • Download progress reported via BEDownloadMonitor for active downloads
  • Memory tagging enabled for Japan distribution (recommended for EU)

References

平台分布

Codex

37.28%
按下载量换算1,825

Claude

29.02%
按下载量换算1,421

Cursor

18.84%
按下载量换算922

Gemini CLI

8.3%
按下载量换算406

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills