onekeyhq/app-monorepo/1k-cross-platform
- community
Checking that the SKILL.md file is still in the repository.
OneKey cross-platform patterns, platform files, platformEnv, and supported OS/SDK requirements.
Install
npx vskill@latest install onekeyhq/app-monorepo/1k-cross-platformSKILL.md
Cross-Platform Development
Patterns for writing platform-specific code in OneKey.
Platform Extensions
Use platform extensions for platform-specific implementations:
| Extension | Platform | |
|---|---|---|
.native.ts | React Native (iOS/Android) | |
.web.ts | Web platform | |
.desktop.ts | Desktop (Electron) | |
.ext.ts | Browser extension |
Platform Detection
ALWAYS use `platformEnv` for platform detection:
Available Platform Flags
Platform-Specific File Structure
The bundler automatically resolves the correct file based on platform.
Example: Platform-Specific Storage
Detailed Guide
For comprehensive cross-platform patterns and platform considerations, see cross-platform.md.
For current development tool and minimum platform versions, see platform-requirements.md. Verify version values against the referenced repository files before relying on them.
Topics covered:
- Platform extensions and file structure
- Platform detection with
platformEnv - Platform-specific imports
- Platform considerations (Extension, Mobile, Desktop, Web)
- Real-world examples
- Cross-platform checklist
Platform Considerations
Extension (Chrome, Firefox, Edge, Brave)
- MV3/service worker lifetimes, permissions, CSP, background script limitations
Mobile (iOS/Android)
- WebView limitations, native modules, background/foreground states, deep linking
Desktop (Electron)
- Security boundaries, IPC communication, file system access
Web
- CORS restrictions, storage limitations, XSS prevention, bundle size
Checklist
- [ ] Platform-specific code uses correct file extension
- [ ] Uses
platformEnvinstead of direct checks - [ ] Common logic extracted to shared files
- [ ] Tested on all target platforms
Related Skills
/1k-coding-patterns- General coding patterns/1k-architecture- Project structure and imports
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.skillshare/skills/1k-cross-platform/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/onekeyhq/app-monorepo/1k-cross-platform)