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

web-pwa网络渐进式应用

Agent Skill

web-pwa 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

363

周安装

17

GitHub Stars

4

下载量

140
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/alphaonedev/openclaw-graph --skill web-pwa

简介

用于处理 GitHub 仓库、Issue、Pull Request 等协作信息,支持前端项目协同。

  • 适合在需要管理代码变更、审查提交或跟踪协作进展的场景中使用。
  • 通过 GitHub 安装,建议结合原始 README 验证功能细节。
  • 安装前需确认是否会触发网络访问、文件操作或系统命令执行。
  • web-pwa 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

web-pwa

Purpose

This skill enables building Progressive Web Apps (PWAs) by managing service workers, caching, manifests, offline functionality, background sync, and push notifications. It focuses on making web apps installable, reliable, and engaging like native apps.

When to Use

Use this skill when developing web apps that need offline access, such as news readers or e-commerce sites; for apps requiring push notifications, like chat apps; or when enhancing user experience with background sync for data updates. Apply it in scenarios where users expect app-like behavior on mobile or desktop browsers.

Key Capabilities

  • Service Workers: Intercept network requests and cache responses using the Cache API (e.g., caches.open('my-cache')).
  • Manifest: Define app metadata in a JSON file (e.g., {"name": "My PWA", "start_url": "/"}) for installability.
  • Offline Support: Enable apps to function without internet via service workers and IndexedDB.
  • Background Sync: Queue tasks for later execution when online, using the Background Sync API (e.g., registration.sync.register('my-sync')).
  • Push Notifications: Handle subscriptions and messages via the Push API and Service Worker API (e.g., subscription.endpoint for server communication).

Usage Patterns

To implement a PWA, first create a service worker file (e.g., sw.js) and register it in your main script. For offline caching, use the Cache API to store assets. Always check for service worker support before registration. Integrate a web app manifest for installation prompts. Test patterns in a browser's dev tools under the Application tab.

Common Commands/API

  • Register a service worker: Use if ('serviceWorker' in navigator) {navigator.serviceWorker.register('/sw.js');} in your JavaScript file.
  • Cache assets: In sw.js, add event.respondWith(caches.match(event.request).then(response => response || fetch(event.request))); to handle requests.
  • Add to home screen: Ensure manifest.json includes "display": "standalone" and serve it from the root.
  • Handle push notifications: Subscribe with registration.pushManager.subscribe({userVisibleOnly: true}) and send via a server endpoint like https://yourserver.com/push (requires $VAPID_PUBLIC_KEY for authentication).
  • Background sync: Register with navigator.serviceWorker.ready.then(reg => reg.sync.register('sync-tag')); use CLI tools like workbox-cli build for bundling (e.g., npx workbox generateSW workbox-config.js). Config format for manifest: JSON object like {"short_name": "App", "icons": [{"src": "icon.png", "sizes": "192x192"}]}.

Integration Notes

Integrate this skill with existing web projects by adding a service worker script and manifest file. For push notifications, set up a server with the Web Push library and use env vars like $VAPID_PRIVATE_KEY for signing. If using frameworks, import in React via useEffect(() => {if ('serviceWorker' in navigator) navigator.serviceWorker.register();}, []);. For caching, combine with Fetch API; ensure HTTPS for service workers. Avoid conflicts by checking for existing workers before registration.

Error Handling

When registering service workers, catch errors with .then(() => console.log('Registered')).catch(err => console.error('Registration failed:', err)). For cache operations, handle promise rejections (e.g., caches.open('cache-name').then(cache => cache.addAll(['/'])).catch(err => console.error(err))). If push subscription fails, check user permissions and use Notification.requestPermission() first. For background sync, listen for sync events in the service worker and handle failures by retrying or logging with event.tag. Use browser-specific error codes, like DOMException for security errors, and set up global error handlers in your app.

Concrete Usage Examples

  1. Basic PWA Setup: Create a service worker to cache static assets. In index.js: if ('serviceWorker' in navigator) {navigator.serviceWorker.register('/sw.js').then(reg => console.log('SW registered'));}. In sw.js: self.addEventListener('install', event => event.waitUntil(caches.open('static').then(cache => cache.add('/'))));. This enables offline loading of the home page.
  2. Push Notifications Integration: Subscribe users and handle messages. In your app: registration.pushManager.subscribe().then(sub => fetch('/subscribe', {method: 'POST', body: JSON.stringify(sub)}));. On the server, use an endpoint like POST /subscribe with $VAPID_PUBLIC_KEY to send notifications via the Push API.

Graph Relationships

  • Related to cluster: web-dev (e.g., shares dependencies with skills like web-frontend, web-backend).
  • Connected via tags: pwa (links to mobile-app), service-worker (links to web-performance), offline (links to data-sync), web (links to full-stack-dev).
  • Dependencies: Requires web APIs; integrates with tools like Workbox for service worker generation.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

32.2%
按下载量换算45

Claude

30.5%
按下载量换算43

Cursor

19.8%
按下载量换算28

Gemini CLI

9.09%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

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

安装前确认

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

来源信息

继续浏览同类 Skills