Development commands for OneKey monorepo. Use when running dev servers, building apps, linting, testing, or troubleshooting build issues. Triggers on yarn, dev, build, lint, test, desktop, mobile, web, extension, ios, android, compile, bundle.
Installation
Details
Usage
After installing, this skill will be available to your AI coding assistant.
Verify installation:
skills listSkill Instructions
name: 1k-dev-commands description: Development commands for OneKey monorepo. Use when running dev servers, building apps, linting, testing, or troubleshooting build issues. Triggers on yarn, dev, build, lint, test, desktop, mobile, web, extension, ios, android, compile, bundle. allowed-tools: Bash, Read
OneKey Development Commands
Application Development Commands
PLATFORM-SPECIFIC DEVELOPMENT:
-
yarn app:desktop- Start desktop Electron app development- Runtime: 30-60 seconds to start
- Common issues: Node version conflicts, missing native dependencies
- Troubleshooting: Run
yarn clean && yarn reinstallif startup fails
-
yarn app:web- Start web development server (port 3000)- Runtime: 15-30 seconds to start
- Common issues: Port 3000 already in use, webpack compilation errors
- Troubleshooting: Kill existing processes on port 3000, check console for specific errors
-
yarn app:ext- Start browser extension development- Runtime: 20-40 seconds to start
- Common issues: Manifest v3 validation errors, permission issues
- Troubleshooting: Check extension manifest validity, verify content security policy
-
yarn app:ios- Start iOS mobile development- Runtime: 1-2 minutes (includes Metro bundler)
- Common issues: Xcode setup, simulator issues, pod install failures
- Prerequisites: Xcode installed, iOS simulator available
-
yarn app:android- Start Android mobile development- Runtime: 1-2 minutes (includes Metro bundler)
- Common issues: Android SDK path, emulator setup, gradle build failures
- Prerequisites: Android Studio, SDK tools, emulator configured
-
yarn app:web-embed- Start embeddable components development- Runtime: 15-30 seconds
- Usage: For developing standalone wallet components
Build Commands
PRODUCTION BUILDS (Use for final validation):
-
yarn app:desktop:build- Build desktop app for all platforms- Runtime: 5-10 minutes (multi-platform build)
- Output: Platform-specific installers in
apps/desktop/dist/ - Common issues: Code signing, platform-specific dependencies
- Verification: Test installers on target platforms
-
yarn app:ext:build- Build browser extension- Runtime: 2-3 minutes
- Output: Extension packages in
apps/ext/dist/ - Common issues: Manifest validation, content security policy violations
- Verification: Load extension in browser for testing
-
yarn app:web:build- Build web application- Runtime: 3-5 minutes
- Output: Static files in
apps/web/dist/ - Common issues: Bundle size limits, missing environment variables
- Verification: Serve built files and test functionality
-
yarn app:native-bundle- Bundle React Native app- Runtime: 3-5 minutes
- Output: Platform-specific bundles
- Common issues: Native module linking, Metro bundler errors
- Prerequisites: Platform development environment properly configured
Development Tools & Quality Assurance
CRITICAL QUALITY COMMANDS (YOU MUST run these after any code changes):
yarn lint- MANDATORY comprehensive linting (TypeScript, ESLint, folder structure, i18n)- Expected runtime: 5-10 minutes (NEVER skip due to timeout)
- Zero tolerance: ALL warnings and errors MUST be fixed
- When it fails: Check specific error categories and fix systematically
yarn test- MANDATORY Jest test execution- Expected runtime: 2-5 minutes depending on test scope
- Failure handling: Investigate failed tests, do not ignore or skip
DEVELOPMENT QUALITY WORKFLOW:
- Make code changes
- Run
yarn tsc:onlyimmediately to catch type errors - Run
yarn lintto ensure code quality (accept full timeout) - Run
yarn testto verify functionality - Only proceed if ALL commands pass without errors or warnings
OTHER TOOLS:
yarn lint:only- ESLint only (use for quick syntax checks)yarn clean- Clean all build artifacts and node_modulesyarn reinstall- Full clean install (use when dependency issues occur)
Testing
- Jest configuration in
jest.config.js - Test setup in
jest-setup.js - Tests located in
@tests/directories within packages - Mobile tests use
jest-expopreset
More by OneKeyHQ
View allFilters specific errors from Sentry reporting in this OneKey monorepo. Use when needing to ignore/suppress/filter Sentry errors, add error exclusions, or stop certain errors from being reported. Handles platform-specific filtering (desktop/mobile/web/extension).
Helps fix ESLint errors and warnings in the OneKey codebase. Use when running yarn lint and encountering warnings, cleaning up code before committing, or fixing spellcheck, unused variable, or other ESLint warnings.
Guide for adding new blockchain chains to OneKey. Use when implementing new chain support, adding blockchain protocols, or understanding chain architecture. Triggers on chain, blockchain, protocol, network, coin, token, add chain, new chain.
Creates test version branches for testing app upgrade functionality. Use when preparing upgrade test builds, testing version migration, or when the user mentions test version, 9005.x.x version numbers, upgrade testing, or version upgrade QA. Automates branch creation, version bumping, and build number hardcoding for upgrade flow verification.
