keybase/client/prod-bundles

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when the user asks to build production bundles, check bundle sizes, audit tree-shaking, or verify mobile/desktop code separation. Covers both the desktop Vite prod build and the iOS/Android Metro bundle.

Install

npx vskill@latest install keybase/client/prod-bundles

SKILL.md

Build production bundles for both platforms and analyze them for correct tree-shaking.

Build Commands

Desktop (Vite):

bash
# From shared/
yarn desktop:build:prod

Output lands in shared/desktop/dist/. Prod bundles have no .dev or .profile suffix — filter with:

bash
ls shared/desktop/dist/*.bundle.js | grep -v '\.dev\.' | grep -v '\.profile\.'

iOS (Metro):

bash
# From shared/
yarn ios:jsbundle

Output: shared/ios/dist/main.jsbundle

Android (Metro):

bash
# From shared/
yarn android:jsbundle

Output: shared/android/dist/main.jsbundle

Tree-Shaking Audit

Desktop — check mobile-only modules are absent:

bash
DIST=shared/desktop/dist
PROD=$(ls "$DIST"/*.bundle.js | grep -v '\.dev\.' | grep -v '\.profile\.')
for mod in expo-audio expo-location expo-video react-native-kb @gorhom/bottom-sheet lottie-react-native react-native-safe-area-context; do
hits=$(echo "$PROD" | xargs grep -l "$mod" 2>/dev/null | wc -l | tr -d ' ')
echo "$mod: $hits files"
done

iOS bundle — check bare `isMobile`/`isElectron` are inlined as literals (Babel plugin):

bash
# Should report 0 occurrences — bare globals replaced with true/false at transform time
python3 -c "
import re
bundle = open('shared/ios/dist/main.jsbundle').read()
for name in ['isMobile', 'isElectron', 'isAndroid', 'isIOS']:
real = [m for m in re.finditer(r'(?<![.\w{,])' + name + r'(?![:\w])', bundle)]
print(f'{name} not as property/key: {len(real)} occurrences')
"

Key Facts

  • Vite (desktop): the define block in shared/vite.config.mts (makeDefines) replaces bare globals (isMobile, isElectron, etc.) with literals, and the prod minifier drops the dead branches.
  • Metro (iOS/Android): The makePlatformPlugin Babel plugin in babel.config.js inlines the same globals at transform time, enabling Metro's constant-folding-plugin to DCE dead branches.
  • Native-only module aliasing (desktop): packages in shared/native-only-modules.js are aliased to shared/null-module.js by the resolve config in shared/vite.config.mts, and pre-bundled through optimizeDeps. After changing that file, clear Vite's dep cache: rm -rf shared/node_modules/.vite.

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/keybase/client/prod-bundles/badge)](https://verified-skill.com/skills/keybase/client/prod-bundles)

Something wrong with this skill or its page? Tell us.