Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计通过

webf-native-pluginswebf 原生插件

Agent Skill

webf-native-plugins 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 Codex、Claude、Cursor、Gemini CLI 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

282

周安装

12

GitHub Stars

2,416

下载量

99
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/openwebf/webf --skill webf-native-plugins

简介

本机插件提供对 Web API 之外的平台功能的访问

  • 检查 https://openwebf.com/en/native-plugins 是否有可用的插件
  • 安装 Flutter 包 (pubspec.yaml) 和 npm 包
  • 使用 WebF.defineModule() 注册插件
  • in main.dart
  • 在 JavaScript 中使用功能检测和错误处理
  • 在所有目标平台上进行测试
  • 如果需要,使用插件开发指南创建自定义插件
  • 每周安装量
  • 12
  • 存储库
  • openwebf/webf
  • GitHub 之星
  • 2.4K
  • 第一次看到
  • 2026 年 1 月 25 日
  • 安全审计
  • Gen Agent Trust Hub 通行证
  • 套接字通行证
  • 斯尼克通行证

SKILL.md

WebF Native Plugins

When building WebF apps, you often need access to native platform capabilities like sharing content, accessing the camera, handling payments, or using geolocation. WebF provides native plugins that bridge JavaScript code with native platform APIs.

What Are Native Plugins?

Native plugins are packages that:

  • Provide native platform capabilities (share, camera, payments, sensors, etc.)
  • Work across iOS, Android, macOS, and other platforms
  • Use JavaScript APIs in your code
  • Require both Flutter and npm package installation
  • Bridge to native platform APIs through Flutter

When to Use Native Plugins

Use native plugins when you need capabilities that aren't available in standard web APIs:

Use Native Plugins For:

  • Sharing content to other apps
  • Accessing device camera or photo gallery
  • Processing payments
  • Getting geolocation with native accuracy
  • Push notifications
  • Biometric authentication (Face ID, fingerprint)
  • Device sensors (accelerometer, gyroscope)
  • File system access beyond web storage
  • Native calendar/contacts integration

Standard Web APIs Work Without Plugins:

  • fetch() for HTTP requests
  • localStorage for local storage
  • Canvas 2D for graphics
  • Geolocation API (basic)
  • Media queries for responsive design

Finding Available Plugins

Before implementing a feature, always check if a pre-built native plugin exists:

  1. Visit the official plugin registry: https://openwebf.com/en/native-plugins
  2. Browse available plugins by category
  3. Check the plugin documentation for installation steps

Installation Process

Every native plugin requires TWO installations:

  1. Flutter side (in your Flutter host app)
  2. JavaScript side (in your web project)

Step 1: Check Plugin Availability

Visit https://openwebf.com/en/native-plugins and search for the capability you need:

  • Click on the plugin to view details
  • Note the Flutter package name (e.g., webf_share)
  • Note the npm package name (e.g., @openwebf/webf-share)

Step 2: Install Flutter Package

If you have access to the Flutter project hosting your WebF app:

  1. Open the Flutter project's pubspec.yaml
  2. Add the plugin dependency: dependencies: webf_share: ^1.0.0 # Replace with actual plugin name
  3. Run flutter pub get
  4. Register the plugin in your main Dart file: import 'package:webf/webf.dart'; import 'package:webf_share/webf_share.dart'; // Import the plugin void main() {// Initialize WebFControllerManager WebFControllerManager.instance.initialize(WebFControllerManagerConfig(maxAliveInstances: 2, maxAttachedInstances: 1,)); // Register the native plugin module WebF.defineModule((context) => ShareModule(context)); runApp(MyApp());}

Step 3: Install npm Package

In your JavaScript/TypeScript project:

# For the Share plugin example
npm install @openwebf/webf-share

# Or with yarn
yarn add @openwebf/webf-share

Step 4: Use in Your JavaScript Code

Import and use the plugin in your application:

import { WebFShare } from '@openwebf/webf-share';

// Use the plugin API
const success = await WebFShare.shareText({
  title: 'My App',
  text: 'Check out this amazing content!',
  url: 'https://example.com'
});

Available Plugins

Share Plugin (webf_share)

Description: Share content, text, and images through native platform sharing

Capabilities:

  • Share text, URLs, and titles to other apps
  • Share images using native sharing mechanisms
  • Save screenshots to device storage
  • Create preview images for temporary display

Flutter Package: webf_share: ^1.0.0

npm Package: @openwebf/webf-share

Example Usage:

import { WebFShare, ShareHelpers } from '@openwebf/webf-share';

// Share text content
await WebFShare.shareText({
  title: 'Article Title',
  text: 'Check out this article!',
  url: 'https://example.com/article'
});

// Share an image from canvas
const canvas = document.getElementById('myCanvas');
const imageData = ShareHelpers.canvasToArrayBuffer(canvas);
await WebFShare.shareImage(imageData);

// Save screenshot
await WebFShare.saveScreenshot(imageData);

Storage Locations:

  • Android: Downloads folder (/storage/emulated/0/Download/)
  • iOS: App documents directory (accessible via Files app)
  • macOS: Application documents directory (accessible via Finder)

See the Native Plugins Reference for more available plugins.

Common Patterns

1. Feature Detection

Always check if a plugin is available before using it:

// Check if plugin is loaded
if (typeof WebFShare !== 'undefined') {
  await WebFShare.shareText({ text: 'Hello' });
} else {
  // Fallback or show message
  console.log('Share plugin not available');
}

2. Error Handling

Wrap plugin calls in try-catch blocks:

try {
  const success = await WebFShare.shareText({
    title: 'My App',
    text: 'Check this out!'
  });

  if (success) {
    console.log('Content shared successfully');
  }
} catch (error) {
  console.error('Failed to share:', error);
  // Show error message to user
}

3. TypeScript Type Safety

All plugins include TypeScript definitions:

import type { ShareTextOptions } from '@openwebf/webf-share';

const shareOptions: ShareTextOptions = {
  title: 'Article',
  text: 'Read this article',
  url: 'https://example.com'
};

await WebFShare.shareText(shareOptions);

Creating Custom Plugins

If you need capabilities not provided by existing plugins, you can create your own:

  1. Read the Plugin Development Guide: https://openwebf.com/en/docs/developer-guide/native-plugins
  2. Study existing plugins: https://github.com/openwebf/webf/tree/main/webf_modules
  3. Follow the plugin architecture:

- Create a Flutter package implementing the native functionality - Create an npm package exposing JavaScript APIs - Use WebF's module system to bridge between them

Troubleshooting

Issue: Plugin Not Found in JavaScript

Cause: Flutter package not installed or module not registered

Solution:

  1. Check that the Flutter package is in pubspec.yaml
  2. Verify the module is registered with WebF.defineModule() in main.dart
  3. Run flutter pub get
  4. Rebuild the Flutter app
  5. Restart WebF Go or your app

Issue: TypeScript Errors

Cause: npm package not installed correctly

Solution:

# Reinstall the package
npm install @openwebf/webf-share --save

# Clear cache and reinstall
rm -rf node_modules package-lock.json
npm install

Issue: Plugin Works on iOS but Not Android

Cause: Platform-specific permissions or configuration missing

Solution:

  1. Check the plugin documentation for required permissions
  2. Add necessary permissions to AndroidManifest.xml or Info.plist
  3. Some plugins require additional native configuration

Issue: "Module is not defined" Error

Cause: Plugin module not registered in Flutter

Solution: Make sure you're calling WebF.defineModule() in your Flutter main() function before runApp():

void main() {
  WebF.defineModule((context) => ShareModule(context));
  runApp(MyApp());
}

Best Practices

1. Check Plugin Availability First

Before implementing a feature, visit https://openwebf.com/en/native-plugins to see if a plugin already exists. Don't reinvent the wheel.

2. Test on Multiple Platforms

Native plugins may behave differently on iOS vs Android vs macOS:

  • Test on all target platforms
  • Handle platform-specific behavior gracefully
  • Read plugin docs for platform differences

3. Provide Fallbacks

Not all users may have the plugin installed (especially during development):

if (typeof WebFShare !== 'undefined') {
  // Use native sharing
  await WebFShare.shareText({ text: 'Hello' });
} else {
  // Fallback: copy to clipboard or show a link
  navigator.clipboard.writeText('Hello');
}

4. Handle Permissions Properly

Some plugins require user permissions (camera, location, etc.):

  • Request permissions at appropriate times
  • Explain why you need the permission
  • Handle permission denial gracefully
  • Check plugin docs for permission requirements

5. Keep Plugins Updated

Native plugins are updated to support new platform features and fix bugs:

  • Check for plugin updates regularly
  • Read changelogs before updating
  • Test thoroughly after updating

Production Deployment

When deploying to production:

  1. Flutter App: Make sure all required plugins are in pubspec.yaml
  2. npm Packages: Include all plugin packages in package.json
  3. Permissions: Configure all required permissions in app manifests
  4. Testing: Test on real devices for all target platforms
  5. Documentation: Document which plugins your app requires

Resources

Next Steps

After installing native plugins:

  1. Read plugin documentation: Each plugin has specific APIs and requirements
  2. Test on devices: Native features work differently than web APIs
  3. Handle errors: Native calls can fail due to permissions or platform limitations
  4. Consider alternatives: Check webf-api-compatibility for web API alternatives

Summary

  • Native plugins provide access to platform capabilities beyond web APIs
  • Check https://openwebf.com/en/native-plugins for available plugins
  • Install BOTH Flutter package (pubspec.yaml) AND npm package
  • Register plugins with WebF.defineModule() in main.dart
  • Use feature detection and error handling in JavaScript
  • Test on all target platforms
  • Create custom plugins if needed using the Plugin Development Guide

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

windsurf

28.5%
按下载量换算28

OpenCode

27.03%
按下载量换算27

Codex

18.22%
按下载量换算18

Claude Code

12.76%
按下载量换算13

Antigravity

8.4%
按下载量换算8

Gemini CLI

3.86%
按下载量换算4

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills