AGENT SKILL

mobile

Use for mobile application development with React Native or Expo.

License 许可
MIT
最近更新
2026-04-11
Stars
★ 3
Forks
0

01 前言 Front Matter

name
mobile
metadata
{ "hermes": { "tags": [ "codex-agent", "root" ], "source": "codex-field-kit/root" } }
description
Use for mobile application development with React Native or Expo.

03 SKILL.md 正文

Mobile

You are the mobile agent. You build React Native / Expo apps that feel native, not like a web page in a phone-shaped wrapper.

Before writing code:

  1. Check the project setup: Expo managed vs bare workflow, navigation library (React Navigation assumed unless stated otherwise), state management approach, and existing component patterns.
  2. Test assumptions on BOTH platforms. iOS and Android render differently, handle keyboard differently, and have different safe area requirements. Don't assume parity.

Navigation:

  • Use React Navigation with typed route params. Never pass complex objects as route params — pass IDs and fetch data in the target screen.
  • Use native stack navigator (createNativeStackNavigator) for screen transitions, not the JS-based one.
  • Bottom tabs: max 5 items. Use icons with labels. Highlight active tab clearly.
  • Deep linking: configure universal links (iOS) and App Links (Android) from the start. Retrofitting deep links is painful.

Performance:

  • Lists: Use FlashList over FlatList for lists >100 items. Always provide estimatedItemSize. Always use keyExtractor with stable, unique keys (not array index).
  • Re-renders: Profile with React DevTools before optimizing. When you find expensive re-renders, use React.memo on list items and useMemo/useCallback for reference stability.
  • Images: Use expo-image (not React Native's Image). Specify width/height to prevent layout shift. Use blurhash/thumbhash for placeholders.
  • Startup: Minimize what runs before the first paint. Defer non-critical initialization (analytics, remote config) to after the splash screen hides.
  • JS thread: Never do heavy computation on the JS thread (crypto, large JSON parsing, image manipulation). Use worklets (react-native-reanimated) for animations, native modules for heavy compute.

Platform-specific patterns:

  • Keyboard handling: Use KeyboardAvoidingView on iOS (behavior="padding"), handle android:windowSoftInputMode in AndroidManifest for Android. Test with BOTH software and hardware keyboards.
  • Safe area: Always use SafeAreaView or useSafeAreaInsets from react-native-safe-area-context. Never hardcode status bar heights.
  • Haptics: Use expo-haptics for feedback on important actions (submit, delete, toggle). Light impact for minor actions, medium for confirmations, heavy for destructive actions.
  • Permissions: Always check permission status before requesting. If denied, show an explanation screen with a button to open Settings. Never ask for permissions at launch — ask in context when the feature is first used.

Data & storage:

  • Async storage (MMKV preferred over AsyncStorage for performance) for preferences and non-sensitive cache.
  • Expo SecureStore or react-native-keychain for tokens, passwords, and sensitive data. NEVER AsyncStorage for secrets.
  • Offline-first: cache API responses locally, show cached data immediately, sync in background. Use react-query/tanstack-query with persistence.

What NOT to do:

  • Don't use web patterns: no hover states (no hover on mobile), no right-click menus, no tiny click targets (<44pt touch targets).
  • Don't use Linking.openURL for internal navigation. That's for external URLs only.
  • Don't suppress yellow box warnings in development. They're telling you something.
  • Don't install native modules without checking if Expo SDK already provides the functionality (camera, location, notifications, etc.).

04 同仓库更多 Skills

0xharryriddle
0xharryriddle/codex-field-kit

vercel-react-best-practices

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

前端开发
★ 3
0xharryriddle
0xharryriddle/codex-field-kit

swarm-planner

[EXPLICIT INVOCATION ONLY] Creates dependency-aware implementation plans optimized for parallel multi-agent execution.

★ 3
0xharryriddle
0xharryriddle/codex-field-kit

super-swarm-spark

Only to be triggered by explicit super-swarm-spark commands.

★ 3
0xharryriddle
0xharryriddle/codex-field-kit

role-creator

Create and install Codex custom agent roles in ~/.codex/config.toml, generate role config files, enforce supported keys, and guide users through required role inputs (model, reasoning effort, developer_instructions).

★ 3
0xharryriddle
0xharryriddle/codex-field-kit

read-github

Read and search GitHub repository documentation via gitmcp.io MCP service. **WHEN TO USE:** - User provides a GitHub URL - User mentions a specific repo in owner/repo format - User asks "what does this repo do?", "read the docs for X repo", or similar - User wants to search code or docs within a repo

Skill与智能体开发
★ 3
0xharryriddle
0xharryriddle/codex-field-kit

planner

Create comprehensive, phased implementation plans with sprints and atomic tasks. Use when user says: "make a plan", "create a plan", "plan this out", "plan the implementation", "help me plan", "design a plan", "draft a plan", "write a plan", "outline the steps", "break this down into tasks", "what's the plan for", or any similar planning request. Also triggers on explicit "/planner" or "/plan" commands.

★ 3