1k browser module

From OneKeyHQ/app-monorepo · View interactive version

1k browser module is an AI agent skill from the GitHub repository OneKeyHQ/app-monorepo. OneKey Browser/Discovery development for WebView tabs, bookmarks, history, search, URL risk checks, DApp connections, and JSBridge behavior.

How to use this skill

Skill file

Browser Module

Use this for desktop/mobile Discovery Browser and MultiTabBrowser work: WebView lifecycle, DApp connections, bookmarks/history, search, URL validation, and analytics.

Quick Reference

| Topic | Guide | Key Files |

|-------|-------|-----------|

| Module map | module-map.md | packages/kit/src/views/Discovery/, packages/kit-bg/src/services/ServiceDiscovery.ts |

| Tabs and navigation | tabs-navigation.md | packages/kit/src/states/jotai/contexts/discovery/ |

| WebView and security | webview-security.md | packages/kit/src/views/Discovery/components/WebContent/ |

| DApp connection | dapp-connection.md | packages/kit-bg/src/services/ServiceDApp.ts, packages/kit/src/views/DAppConnection/ |

| Data, search, bookmarks | data-search-bookmarks.md | ServiceDiscovery.ts, useSearchModalData.ts, SimpleDB browser entities |

| Testing and review | testing-review.md | *.test.ts, *.test.tsx, discovery logger scenes |

Default Workflow

  1. Identify the enabled platform surface: native mobile Discovery tab or desktop MultiTabBrowser.
  2. Read module-map.md, then open only the rule file matching the requested change.
  3. Trace state through useBrowserTabActions, useBrowserAction, and ServiceDiscovery before UI edits.
  4. Preserve platform-specific files: .native.tsx, .desktop.tsx, .ext.tsx, and unsuffixed fallbacks have different behavior.
  5. Treat extension/web paths as fallback or shared infrastructure unless the request explicitly enables browser behavior there.
  6. Verify URL validation, deep link handling, DApp provider notifications, and persisted SimpleDB data are still coherent.

Hard Rules

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.