[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ENXCG734Q8VT36906JFV59":3,"skill-same:01M6ENXCG734Q8VT36906JFV59":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M6ENXCG734Q8VT36906JFV59","expo-api-audit",null,"Comprehensive audit of Expo\u002FReact Native app API integration layer. Use when asked to: (1) Review API interactions, auth handling, or token management, (2) Find hardcoded data or screens bypassing API, (3) Verify user interactions properly sync to backend, (4) Analyze offline behavior and caching, (5) Audit Orval\u002FOpenAPI code generation, (6) Check for API security issues. Supports TanStack Query, Zustand, axios, Expo Router, expo-secure-store, and expo-constants patterns.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcjharmath\u002Fexpo-api-audit\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"expo api audit","audit","api","expo","zustand","native","app","caching","query","tanstack query","router","react native","review","analyze","Code Generation","issues","code","secure","auth","react","2026-11-10 10:12:30",false,"---\nname: expo-api-audit\ndescription: \"Comprehensive audit of Expo\u002FReact Native app API integration layer. Use when asked to: (1) Review API interactions, auth handling, or token management, (2) Find hardcoded data or screens bypassing API, (3) Verify user interactions properly sync to backend, (4) Analyze offline behavior and caching, (5) Audit Orval\u002FOpenAPI code generation, (6) Check for API security issues. Supports TanStack Query, Zustand, axios, Expo Router, expo-secure-store, and expo-constants patterns.\"\n---\n\n# Expo API Integration Audit\n\n## Overview\n\nThis skill audits an Expo (React Native) TypeScript app's API integration layer to identify gaps, hardcoded data, auth issues, and offline behavior problems. Designed for apps using Expo Router, expo-secure-store, and expo-constants.\n\n## Inputs\n\nBefore starting, gather from the user:\n- **Known issues** (optional): Specific screens or flows suspected to be broken\n- **Output format preference**: markdown report, JSON findings, fix PRs, or task list\n- **Scope**: Full audit or specific focus (auth only, offline only, etc.)\n\n## Tool Note: ripgrep\n\nIf `rg` (ripgrep) is available, use it instead of `grep`—it's significantly faster and automatically ignores node_modules\u002F.git. All grep commands in this skill have rg equivalents:\n\n```bash\n# Check if ripgrep is available\nwhich rg && echo \"Use rg commands\" || echo \"Falling back to grep\"\n\n# Equivalents:\n# grep -rn \"pattern\" --include=\"*.ts\" | grep -v node_modules\n# rg \"pattern\" -t ts\n\n# grep -rln \"pattern\" --include=\"*.ts\" | grep -v node_modules  \n# rg -l \"pattern\" -t ts\n```\n\n## Phase 1: Discovery\n\nBuild a mental model before auditing. Run these commands to locate key files:\n\n```bash\n# Orval config and generated hooks\nfind . -name \"orval.config.*\" -o -name \"*.orval.ts\" 2>\u002Fdev\u002Fnull | head -5\nfind . -type d -name \"generated\" | xargs -I{} ls {} 2>\u002Fdev\u002Fnull | head -20\n\n# API client\u002Fmutator\nrg -l \"customInstance|axios\\.create|baseURL\" -t ts | head -10\n\n# Zustand stores\nrg -l \"create\\(\" -t ts | xargs rg -l \"zustand|devtools\" 2>\u002Fdev\u002Fnull | head -20\n\n# OpenAPI spec\nfind . -name \"openapi.json\" -o -name \"openapi.yaml\" -o -name \"swagger.json\" 2>\u002Fdev\u002Fnull\n\n# Auth infrastructure\nrg -l \"TokenManager|refreshToken|Bearer|interceptor\" -t ts\n\n# Expo config (environment variables, API URLs)\ncat app.config.js 2>\u002Fdev\u002Fnull || cat app.config.ts 2>\u002Fdev\u002Fnull || cat app.json\nrg \"expoConfig|Constants\\.manifest\" -t ts\n```\n\n### Key File Mapping\n\n| Component | Typical Location | What to Check |\n|-----------|------------------|---------------|\n| Orval config | `orval.config.ts` | client type, mutator path, output dir |\n| Generated hooks | `\u002Fapi\u002Fgenerated\u002F` or `\u002Fsrc\u002Fapi\u002F` | completeness vs OpenAPI spec |\n| Axios client | `\u002Fapi\u002F` or `\u002Fservices\u002F` | interceptors, base config |\n| Token manager | `\u002Fservices\u002Fauth\u002F` | must use `expo-secure-store` |\n| Zustand stores | `\u002Fstores\u002F` | which hold server state (violation?) |\n| OpenAPI spec | `\u002Fdocs\u002Fapi\u002F` or root | last modified, version |\n| Expo config | `app.config.js` or `app.json` | API URLs in `extra`, env vars |\n| Screens | `\u002Fapp\u002F` (Expo Router) | file-based routing |\n\n## Phase 2: API Layer Audit\n\n### 2.1 Orval Generation Health\n\n```bash\n# Check if generated code matches spec\nnpx orval --dry-run 2>&1 | head -50\n\n# Compare endpoint counts\njq '.paths | keys | length' docs\u002Fapi\u002Fopenapi.json  # endpoints in spec\nfind .\u002Fapi\u002Fgenerated -name \"*.ts\" -exec grep -l \"useQuery\\|useMutation\" {} \\; | wc -l\n```\n\nVerify:\n- [ ] Generated types match OpenAPI schemas\n- [ ] All spec endpoints have corresponding hooks\n- [ ] Custom mutator injects auth headers\n- [ ] Query defaults sensible (staleTime, gcTime, retry)\n\n### 2.2 Auth Token Handling\n\nInspect the axios client for these patterns:\n\n```typescript\n\u002F\u002F REQUIRED: Request interceptor injects token\nconfig.headers.Authorization = `Bearer ${token}`\n\n\u002F\u002F REQUIRED: Pre-emptive refresh before expiry\nif (tokenExpiresWithin(600)) await refreshToken()\n\n\u002F\u002F REQUIRED: 401 response triggers refresh\nif (error.response?.status === 401) { \u002F* refresh logic *\u002F }\n\n\u002F\u002F REQUIRED: Refresh deduplication\nif (isRefreshing) return pendingRefreshPromise\n\n\u002F\u002F REQUIRED: Failed refresh triggers logout\nclearTokens(); navigate('\u002Fauth')\n```\n\n**Expo-specific checks:**\n\n```bash\n# Token storage - MUST use expo-secure-store, not AsyncStorage\nrg \"AsyncStorage.*token|token.*AsyncStorage\" -t ts -i  # BAD if found\nrg \"SecureStore|expo-secure-store\" -t ts               # GOOD - should exist\n\n# Environment variables - should use expo-constants or app.config.js\nrg \"process\\.env\\.\" -t ts                              # BAD for Expo (won't work in production)\nrg \"Constants\\.expoConfig|Constants\\.manifest\" -t ts   # GOOD - Expo way\ngrep -l \"extra:\" app.config.* 2>\u002Fdev\u002Fnull              # Config-based env vars\n```\n\n**Red flags:**\n- Hardcoded tokens or API keys in source\n- Tokens in AsyncStorage (must use `expo-secure-store`)\n- API URLs using `process.env` (use `expo-constants` instead)\n- No refresh deduplication (parallel refresh calls)\n- Infinite refresh loops (refresh endpoint returns 401)\n- Race conditions between token check and request\n\n### 2.3 Direct API Violations\n\nFind calls bypassing Orval-generated hooks:\n\n```bash\n# Raw fetch (should use generated hooks)\nrg \"fetch\\(\" -t ts -t tsx --glob '!*.d.ts'\n\n# Direct axios (should use orval mutator)\nrg \"axios\\.|axios\\(\" -t ts -t tsx --glob '!*orval*'\n\n# Manual useQuery (should use generated)\nrg \"useQuery\\(|useMutation\\(\" -t ts -t tsx --glob '!*generated*'\n\n# Hardcoded URLs\nrg \"https?:\u002F\u002F[^\\\"']*api\" -t ts -t tsx\n\n# Expo-specific: process.env usage (won't work in Expo production builds)\nrg \"process\\.env\\.\" -t ts -t tsx  # Should use Constants.expoConfig.extra instead\n```\n\nClassify each finding:\n- **Legitimate**: Third-party APIs, file uploads, WebSocket\n- **Violation**: Backend calls not using generated hooks\n- **Hardcoded**: URLs that should use `expo-constants`\n- **Env error**: `process.env` usage (breaks in Expo production)\n\n## Phase 3: Screen Data Audit\n\nFor each screen in `\u002Fapp\u002F` (Expo Router) or `\u002Fscreens\u002F`:\n\n### 3.1 Data Source Classification\n\n| Category | Pattern | Status |\n|----------|---------|--------|\n| API Data | `useGet*()`, `use*Query()` | ✓ Correct |\n| Cached | React Query serving stale | ✓ Expected |\n| Zustand | Business data in store | ⚠️ Should be server state? |\n| Hardcoded | Mock arrays, placeholder objects | ❌ Flag |\n| Derived | Calculations from API data | ⚠️ Check if backend should compute |\n\n```bash\n# Find screens with no API hooks (suspicious)\nfor f in $(find .\u002Fapp -name \"*.tsx\" | grep -v \"_layout\"); do\n  if ! grep -q \"use.*Query\\|use.*Mutation\\|useGet\\|usePost\\|usePut\\|useDelete\" \"$f\"; then\n    echo \"NO API HOOKS: $f\"\n  fi\ndone\n\n# Find hardcoded arrays\u002Fobjects (rg version)\nrg \"useState\\(\\[\" -t tsx\nrg \"const.*=.*\\[\\{\" -t tsx\n```\n\n### 3.2 User Interaction Audit\n\nEvery user action that modifies data must trigger a mutation:\n\n| Action Type | Required Pattern |\n|-------------|------------------|\n| Form submit | `useMutation` + `onSuccess` invalidation |\n| Toggle\u002Fswitch | Mutation or debounced mutation |\n| Delete | Mutation with optimistic update or confirmation |\n| Drag\u002Freorder | Mutation on drop |\n| Settings change | Mutation (not just Zustand) |\n\n```bash\n# Forms without mutations (suspicious)\nfor f in $(rg -l \"onSubmit|handleSubmit\" -t tsx); do\n  if ! rg -q \"useMutation|usePost|usePut|usePatch\" \"$f\"; then\n    echo \"FORM WITHOUT MUTATION: $f\"\n  fi\ndone\n\n# Button handlers to audit\nrg \"onPress=|onClick=\" -t tsx | head -50\n```\n\n### 3.3 Zustand Store Audit\n\nZustand should hold **client-only** state. Flag if stores contain:\n- Data that should come from API (users, items, records)\n- Business logic calculations (should be server-side)\n- Duplicates of React Query cache\n\n```bash\n# List all Zustand stores and their state shape\nrg \"interface.*State|type.*State\" stores\u002F -t ts\n\n# Check for persist middleware (may duplicate RQ cache)\nrg \"persist\\(\" stores\u002F -t ts\n```\n\n**Valid Zustand uses**: auth state, UI preferences, navigation state, draft forms\n**Invalid**: fetched entities, computed business data, anything with an API endpoint\n\n## Phase 4: Offline Behavior Audit\n\n### 4.1 Network Mode Configuration\n\n```bash\n# Check query client defaults\nrg \"networkMode\" -t ts\n\n# Check for offline detection (Expo supports both)\nrg \"NetInfo|@react-native-community\u002Fnetinfo\" -t ts    # Community package\nrg \"expo-network|Network\\.getNetworkStateAsync\" -t ts  # Expo native package\nrg \"isConnected|isInternetReachable\" -t ts\n```\n\nExpected patterns:\n- Queries: `networkMode: 'offlineFirst'` (serve stale when offline)\n- Mutations: `networkMode: 'online'` or queue implementation\n\n### 4.2 Offline Scenarios to Test\n\n| Scenario | Expected Behavior | Check |\n|----------|-------------------|-------|\n| Load screen offline | Shows cached data or empty state | `isLoading` vs `isFetching` |\n| Submit form offline | Queue or clear error message | Mutation error handling |\n| Token refresh offline | Graceful failure, retry on reconnect | Interceptor error path |\n| App backgrounded then offline | Cache persists | AsyncStorage\u002FMMKV check |\n| Reconnect after offline | Automatic refetch | `refetchOnReconnect` |\n\n```bash\n# Check for offline queue implementation\nrg \"offlineQueue|pendingMutations|syncQueue\" -t ts\n\n# Check cache persistence\nrg \"persistQueryClient|createAsyncStoragePersister|MMKV\" -t ts\n```\n\n### 4.3 Error Boundary Coverage\n\n```bash\n# Find error boundaries\nrg \"ErrorBoundary|errorElement|onError\" -t tsx\n\n# Check query error handling\nrg \"isError|error:\" -t tsx | head -30\n```\n\n## Phase 5: Report Generation\n\nStructure findings by severity:\n\n### Critical (Auth\u002FSecurity)\n- Hardcoded credentials\n- Tokens in AsyncStorage (must use `expo-secure-store`)\n- `process.env` for secrets (won't work in Expo builds)\n- Auth bypass possibilities\n- Missing 401 handling\n\n### Major (Data Integrity)\n- Forms not syncing to API\n- User actions not persisted\n- Business logic in frontend\n- Stale data served as fresh\n- API URLs not using `expo-constants`\n\n### Medium (Reliability)\n- Missing error handling\n- No offline fallback\n- Race conditions\n- Missing loading states\n\n### Minor (Code Quality)\n- Direct API calls (should use generated)\n- Zustand holding server state\n- Inconsistent patterns\n\n## Output Templates\n\n### Markdown Report\n```markdown\n# API Integration Audit Report\n\n## Executive Summary\n- X critical issues, Y major, Z medium\n\n## Findings\n\n### [CRITICAL] Tokens Stored in AsyncStorage\n**File**: `services\u002Fauth\u002FtokenStorage.ts:15`\n**Issue**: JWT tokens stored in AsyncStorage instead of expo-secure-store\n**Fix**: Migrate to `import * as SecureStore from 'expo-secure-store'`\n\n### [CRITICAL] process.env in Production Code\n**File**: `api\u002Fclient.ts:8`\n**Issue**: `process.env.API_URL` won't work in Expo production builds\n**Fix**: Use `Constants.expoConfig?.extra?.apiUrl` from expo-constants\n\n### [MAJOR] Profile Form Not Syncing\n**File**: `app\u002Fprofile\u002Fedit.tsx`\n**Issue**: Form saves to Zustand only, no API call\n**Fix**: Add `useUpdateProfile` mutation on submit\n```\n\n### JSON Findings\n```json\n{\n  \"summary\": { \"critical\": 2, \"major\": 2, \"medium\": 5 },\n  \"findings\": [\n    {\n      \"severity\": \"critical\",\n      \"category\": \"auth\",\n      \"file\": \"services\u002Fauth\u002FtokenStorage.ts\",\n      \"line\": 15,\n      \"issue\": \"Tokens in AsyncStorage instead of expo-secure-store\",\n      \"fix\": \"Migrate to SecureStore.setItemAsync\u002FgetItemAsync\"\n    },\n    {\n      \"severity\": \"critical\", \n      \"category\": \"config\",\n      \"file\": \"api\u002Fclient.ts\",\n      \"line\": 8,\n      \"issue\": \"process.env.API_URL won't work in Expo builds\",\n      \"fix\": \"Use Constants.expoConfig.extra.apiUrl\"\n    }\n  ]\n}\n```\n\n## Quick Reference Commands\n\n```bash\n# Full audit (grep version)\necho \"=== Direct fetch ===\" && grep -rn \"fetch(\" --include=\"*.ts\" --include=\"*.tsx\" | grep -v node_modules | grep -v \".d.ts\"\necho \"=== Direct axios ===\" && grep -rn \"axios\\.\" --include=\"*.ts\" --include=\"*.tsx\" | grep -v node_modules | grep -v orval\necho \"=== Hardcoded URLs ===\" && grep -rn \"http:\u002F\u002F\\|https:\u002F\u002F\" --include=\"*.ts\" --include=\"*.tsx\" | grep -v node_modules\necho \"=== useState arrays ===\" && grep -rn \"useState\\(\\[\" --include=\"*.tsx\" | grep -v node_modules\necho \"=== Forms ===\" && grep -rn \"onSubmit\" --include=\"*.tsx\" | grep -v node_modules\n```\n\n```bash\n# Full audit (ripgrep version - much faster)\necho \"=== Direct fetch ===\" && rg \"fetch\\(\" -t ts -t tsx --glob '!*.d.ts'\necho \"=== Direct axios ===\" && rg \"axios\\.\" -t ts -t tsx --glob '!*orval*'\necho \"=== Hardcoded URLs ===\" && rg \"https?:\u002F\u002F\" -t ts -t tsx\necho \"=== useState arrays ===\" && rg \"useState\\(\\[\" -t tsx\necho \"=== Forms ===\" && rg \"onSubmit\" -t tsx\n```\n\n## Dependencies\n\nIf commands fail, install:\n```bash\n# ripgrep (highly recommended - 10x faster than grep)\nbrew install ripgrep  # or apt-get install ripgrep, cargo install ripgrep\n\n# jq for JSON parsing\nbrew install jq  # or apt-get install jq\n\n# For Orval dry-run\nnpm install -g orval  # or use npx\n```\n\n## Installation\n\nTo use this skill with Claude Code, add it to your project's `skills\u002F` directory:\n\n```\nmy-expo-app\u002F\n├── app\u002F                          # Expo Router screens\n├── stores\u002F\n├── api\u002F\n├── skills\u002F\n│   └── expo-api-audit\u002F\n│       └── SKILL.md\n├── app.config.js                 # Expo config\n├── package.json\n└── ...\n```\n\nClaude Code auto-discovers skills in this directory. Once installed, trigger the audit with prompts like:\n- \"Run an API integration audit\"\n- \"Check for hardcoded data in my screens\"\n- \"Audit my auth token handling\"\n- \"Find forms that aren't syncing to the API\"\n- \"Check if I'm using expo-secure-store correctly\"\n","# Expo API Integration Audit\n\n## Overview\n\nThis skill audits an Expo (React Native) TypeScript app's API integration layer to identify gaps, hardcoded data, auth issues, and offline behavior problems. Designed for apps using Expo Router, expo-secure-store, and expo-constants.\n\n## Inputs\n\nBefore starting, gather from the user:\n- **Known issues** (optional): Specific screens or flows suspected to be broken\n- **Output format preference**: markdown report, JSON findings, fix PRs, or task list\n- **Scope**: Full audit or specific focus (auth only, offline only, etc.)\n\n## Tool Note: ripgrep\n\nIf `rg` (ripgrep) is available, use it instead of `grep`—it's significantly faster and automatically ignores node_modules\u002F.git. All grep commands in this skill have rg equivalents:\n\n```bash\n# Check if ripgrep is available\nwhich rg && echo \"Use rg commands\" || echo \"Falling back to grep\"\n\n# Equivalents:\n# grep -rn \"pattern\" --include=\"*.ts\" | grep -v node_modules\n# rg \"pattern\" -t ts\n\n# grep -rln \"pattern\" --include=\"*.ts\" | grep -v node_modules  \n# rg -l \"pattern\" -t ts\n```\n\n## Phase 1: Discovery\n\nBuild a mental model before auditing. Run these commands to locate key files:\n\n```bash\n# Orval config and generated hooks\nfind . -name \"orval.config.*\" -o -name \"*.orval.ts\" 2>\u002Fdev\u002Fnull | head -5\nfind . -type d -name \"generated\" | xargs -I{} ls {} 2>\u002Fdev\u002Fnull | head -20\n\n# API client\u002Fmutator\nrg -l \"customInstance|axios\\.create|baseURL\" -t ts | head -10\n\n# Zustand stores\nrg -l \"create\\(\" -t ts | xargs rg -l \"zustand|devtools\" 2>\u002Fdev\u002Fnull | head -20\n\n# OpenAPI spec\nfind . -name \"openapi.json\" -o -name \"openapi.yaml\" -o -name \"swagger.json\" 2>\u002Fdev\u002Fnull\n\n# Auth infrastructure\nrg -l \"TokenManager|refreshToken|Bearer|interceptor\" -t ts\n\n# Expo config (environment variables, API URLs)\ncat app.config.js 2>\u002Fdev\u002Fnull || cat app.config.ts 2>\u002Fdev\u002Fnull || cat app.json\nrg \"expoConfig|Constants\\.manifest\" -t ts\n```\n\n### Key File Mapping\n\n| Component | Typical Location | What to Check |\n|-----------|------------------|---------------|\n| Orval config | `orval.config.ts` | client type, mutator path, output dir |\n| Generated hooks | `\u002Fapi\u002Fgenerated\u002F` or `\u002Fsrc\u002Fapi\u002F` | completeness vs OpenAPI spec |\n| Axios client | `\u002Fapi\u002F` or `\u002Fservices\u002F` | interceptors, base config |\n| Token manager | `\u002Fservices\u002Fauth\u002F` | must use `expo-secure-store` |\n| Zustand stores | `\u002Fstores\u002F` | which hold server state (violation?) |\n| OpenAPI spec | `\u002Fdocs\u002Fapi\u002F` or root | last modified, version |\n| Expo config | `app.config.js` or `app.json` | API URLs in `extra`, env vars |\n| Screens | `\u002Fapp\u002F` (Expo Router) | file-based routing |\n\n## Phase 2: API Layer Audit\n\n### 2.1 Orval Generation Health\n\n```bash\n# Check if generated code matches spec\nnpx orval --dry-run 2>&1 | head -50\n\n# Compare endpoint counts\njq '.paths | keys | length' docs\u002Fapi\u002Fopenapi.json  # endpoints in spec\nfind .\u002Fapi\u002Fgenerated -name \"*.ts\" -exec grep -l \"useQuery\\|useMutation\" {} \\; | wc -l\n```\n\nVerify:\n- [ ] Generated types match OpenAPI schemas\n- [ ] All spec endpoints have corresponding hooks\n- [ ] Custom mutator injects auth headers\n- [ ] Query defaults sensible (staleTime, gcTime, retry)\n\n### 2.2 Auth Token Handling\n\nInspect the axios client for these patterns:\n\n```typescript\n\u002F\u002F REQUIRED: Request interceptor injects token\nconfig.headers.Authorization = `Bearer ${token}`\n\n\u002F\u002F REQUIRED: Pre-emptive refresh before expiry\nif (tokenExpiresWithin(600)) await refreshToken()\n\n\u002F\u002F REQUIRED: 401 response triggers refresh\nif (error.response?.status === 401) { \u002F* refresh logic *\u002F }\n\n\u002F\u002F REQUIRED: Refresh deduplication\nif (isRefreshing) return pendingRefreshPromise\n\n\u002F\u002F REQUIRED: Failed refresh triggers logout\nclearTokens(); navigate('\u002Fauth')\n```\n\n**Expo-specific checks:**\n\n```bash\n# Token storage - MUST use expo-secure-store, not AsyncStorage\nrg \"AsyncStorage.*token|token.*AsyncStorage\" -t ts -i  # BAD if found\nrg \"SecureStore|expo-secure-store\" -t ts               # GOOD - should exist\n\n# Environment variables - should use expo-constants or app.config.js\nrg \"process\\.env\\.\" -t ts                              # BAD for Expo (won't work in production)\nrg \"Constants\\.expoConfig|Constants\\.manifest\" -t ts   # GOOD - Expo way\ngrep -l \"extra:\" app.config.* 2>\u002Fdev\u002Fnull              # Config-based env vars\n```\n\n**Red flags:**\n- Hardcoded tokens or API keys in source\n- Tokens in AsyncStorage (must use `expo-secure-store`)\n- API URLs using `process.env` (use `expo-constants` instead)\n- No refresh deduplication (parallel refresh calls)\n- Infinite refresh loops (refresh endpoint returns 401)\n- Race conditions between token check and request\n\n### 2.3 Direct API Violations\n\nFind calls bypassing Orval-generated hooks:\n\n```bash\n# Raw fetch (should use generated hooks)\nrg \"fetch\\(\" -t ts -t tsx --glob '!*.d.ts'\n\n# Direct axios (should use orval mutator)\nrg \"axios\\.|axios\\(\" -t ts -t tsx --glob '!*orval*'\n\n# Manual useQuery (should use generated)\nrg \"useQuery\\(|useMutation\\(\" -t ts -t tsx --glob '!*generated*'\n\n# Hardcoded URLs\nrg \"https?:\u002F\u002F[^\\\"']*api\" -t ts -t tsx\n\n# Expo-specific: process.env usage (won't work in Expo production builds)\nrg \"process\\.env\\.\" -t ts -t tsx  # Should use Constants.expoConfig.extra instead\n```\n\nClassify each finding:\n- **Legitimate**: Third-party APIs, file uploads, WebSocket\n- **Violation**: Backend calls not using generated hooks\n- **Hardcoded**: URLs that should use `expo-constants`\n- **Env error**: `process.env` usage (breaks in Expo production)\n\n## Phase 3: Screen Data Audit\n\nFor each screen in `\u002Fapp\u002F` (Expo Router) or `\u002Fscreens\u002F`:\n\n### 3.1 Data Source Classification\n\n| Category | Pattern | Status |\n|----------|---------|--------|\n| API Data | `useGet*()`, `use*Query()` | ✓ Correct |\n| Cached | React Query serving stale | ✓ Expected |\n| Zustand | Business data in store | ⚠️ Should be server state? |\n| Hardcoded | Mock arrays, placeholder objects | ❌ Flag |\n| Derived | Calculations from API data | ⚠️ Check if backend should compute |\n\n```bash\n# Find screens with no API hooks (suspicious)\nfor f in $(find .\u002Fapp -name \"*.tsx\" | grep -v \"_layout\"); do\n  if ! grep -q \"use.*Query\\|use.*Mutation\\|useGet\\|usePost\\|usePut\\|useDelete\" \"$f\"; then\n    echo \"NO API HOOKS: $f\"\n  fi\ndone\n\n# Find hardcoded arrays\u002Fobjects (rg version)\nrg \"useState\\(\\[\" -t tsx\nrg \"const.*=.*\\[\\{\" -t tsx\n```\n\n### 3.2 User Interaction Audit\n\nEvery user action that modifies data must trigger a mutation:\n\n| Action Type | Required Pattern |\n|-------------|------------------|\n| Form submit | `useMutation` + `onSuccess` invalidation |\n| Toggle\u002Fswitch | Mutation or debounced mutation |\n| Delete | Mutation with optimistic update or confirmation |\n| Drag\u002Freorder | Mutation on drop |\n| Settings change | Mutation (not just Zustand) |\n\n```bash\n# Forms without mutations (suspicious)\nfor f in $(rg -l \"onSubmit|handleSubmit\" -t tsx); do\n  if ! rg -q \"useMutation|usePost|usePut|usePatch\" \"$f\"; then\n    echo \"FORM WITHOUT MUTATION: $f\"\n  fi\ndone\n\n# Button handlers to audit\nrg \"onPress=|onClick=\" -t tsx | head -50\n```\n\n### 3.3 Zustand Store Audit\n\nZustand should hold **client-only** state. Flag if stores contain:\n- Data that should come from API (users, items, records)\n- Business logic calculations (should be server-side)\n- Duplicates of React Query cache\n\n```bash\n# List all Zustand stores and their state shape\nrg \"interface.*State|type.*State\" stores\u002F -t ts\n\n# Check for persist middleware (may duplicate RQ cache)\nrg \"persist\\(\" stores\u002F -t ts\n```\n\n**Valid Zustand uses**: auth state, UI preferences, navigation state, draft forms\n**Invalid**: fetched entities, computed business data, anything with an API endpoint\n\n## Phase 4: Offline Behavior Audit\n\n### 4.1 Network Mode Configuration\n\n```bash\n# Check query client defaults\nrg \"networkMode\" -t ts\n\n# Check for offline detection (Expo supports both)\nrg \"NetInfo|@react-native-community\u002Fnetinfo\" -t ts    # Community package\nrg \"expo-network|Network\\.getNetworkStateAsync\" -t ts  # Expo native package\nrg \"isConnected|isInternetReachable\" -t ts\n```\n\nExpected patterns:\n- Queries: `networkMode: 'offlineFirst'` (serve stale when offline)\n- Mutations: `networkMode: 'online'` or queue implementation\n\n### 4.2 Offline Scenarios to Test\n\n| Scenario | Expected Behavior | Check |\n|----------|-------------------|-------|\n| Load screen offline | Shows cached data or empty state | `isLoading` vs `isFetching` |\n| Submit form offline | Queue or clear error message | Mutation error handling |\n| Token refresh offline | Graceful failure, retry on reconnect | Interceptor error path |\n| App backgrounded then offline | Cache persists | AsyncStorage\u002FMMKV check |\n| Reconnect after offline | Automatic refetch | `refetchOnReconnect` |\n\n```bash\n# Check for offline queue implementation\nrg \"offlineQueue|pendingMutations|syncQueue\" -t ts\n\n# Check cache persistence\nrg \"persistQueryClient|createAsyncStoragePersister|MMKV\" -t ts\n```\n\n### 4.3 Error Boundary Coverage\n\n```bash\n# Find error boundaries\nrg \"ErrorBoundary|errorElement|onError\" -t tsx\n\n# Check query error handling\nrg \"isError|error:\" -t tsx | head -30\n```\n\n## Phase 5: Report Generation\n\nStructure findings by severity:\n\n### Critical (Auth\u002FSecurity)\n- Hardcoded credentials\n- Tokens in AsyncStorage (must use `expo-secure-store`)\n- `process.env` for secrets (won't work in Expo builds)\n- Auth bypass possibilities\n- Missing 401 handling\n\n### Major (Data Integrity)\n- Forms not syncing to API\n- User actions not persisted\n- Business logic in frontend\n- Stale data served as fresh\n- API URLs not using `expo-constants`\n\n### Medium (Reliability)\n- Missing error handling\n- No offline fallback\n- Race conditions\n- Missing loading states\n\n### Minor (Code Quality)\n- Direct API calls (should use generated)\n- Zustand holding server state\n- Inconsistent patterns\n\n## Output Templates\n\n### Markdown Report\n```markdown\n# API Integration Audit Report\n\n## Executive Summary\n- X critical issues, Y major, Z medium\n\n## Findings\n\n### [CRITICAL] Tokens Stored in AsyncStorage\n**File**: `services\u002Fauth\u002FtokenStorage.ts:15`\n**Issue**: JWT tokens stored in AsyncStorage instead of expo-secure-store\n**Fix**: Migrate to `import * as SecureStore from 'expo-secure-store'`\n\n### [CRITICAL] process.env in Production Code\n**File**: `api\u002Fclient.ts:8`\n**Issue**: `process.env.API_URL` won't work in Expo production builds\n**Fix**: Use `Constants.expoConfig?.extra?.apiUrl` from expo-constants\n\n### [MAJOR] Profile Form Not Syncing\n**File**: `app\u002Fprofile\u002Fedit.tsx`\n**Issue**: Form saves to Zustand only, no API call\n**Fix**: Add `useUpdateProfile` mutation on submit\n```\n\n### JSON Findings\n```json\n{\n  \"summary\": { \"critical\": 2, \"major\": 2, \"medium\": 5 },\n  \"findings\": [\n    {\n      \"severity\": \"critical\",\n      \"category\": \"auth\",\n      \"file\": \"services\u002Fauth\u002FtokenStorage.ts\",\n      \"line\": 15,\n      \"issue\": \"Tokens in AsyncStorage instead of expo-secure-store\",\n      \"fix\": \"Migrate to SecureStore.setItemAsync\u002FgetItemAsync\"\n    },\n    {\n      \"severity\": \"critical\", \n      \"category\": \"config\",\n      \"file\": \"api\u002Fclient.ts\",\n      \"line\": 8,\n      \"issue\": \"process.env.API_URL won't work in Expo builds\",\n      \"fix\": \"Use Constants.expoConfig.extra.apiUrl\"\n    }\n  ]\n}\n```\n\n## Quick Reference Commands\n\n```bash\n# Full audit (grep version)\necho \"=== Direct fetch ===\" && grep -rn \"fetch(\" --include=\"*.ts\" --include=\"*.tsx\" | grep -v node_modules | grep -v \".d.ts\"\necho \"=== Direct axios ===\" && grep -rn \"axios\\.\" --include=\"*.ts\" --include=\"*.tsx\" | grep -v node_modules | grep -v orval\necho \"=== Hardcoded URLs ===\" && grep -rn \"http:\u002F\u002F\\|https:\u002F\u002F\" --include=\"*.ts\" --include=\"*.tsx\" | grep -v node_modules\necho \"=== useState arrays ===\" && grep -rn \"useState\\(\\[\" --include=\"*.tsx\" | grep -v node_modules\necho \"=== Forms ===\" && grep -rn \"onSubmit\" --include=\"*.tsx\" | grep -v node_modules\n```\n\n```bash\n# Full audit (ripgrep version - much faster)\necho \"=== Direct fetch ===\" && rg \"fetch\\(\" -t ts -t tsx --glob '!*.d.ts'\necho \"=== Direct axios ===\" && rg \"axios\\.\" -t ts -t tsx --glob '!*orval*'\necho \"=== Hardcoded URLs ===\" && rg \"https?:\u002F\u002F\" -t ts -t tsx\necho \"=== useState arrays ===\" && rg \"useState\\(\\[\" -t tsx\necho \"=== Forms ===\" && rg \"onSubmit\" -t tsx\n```\n\n## Dependencies\n\nIf commands fail, install:\n```bash\n# ripgrep (highly recommended - 10x faster than grep)\nbrew install ripgrep  # or apt-get install ripgrep, cargo install ripgrep\n\n# jq for JSON parsing\nbrew install jq  # or apt-get install jq\n\n# For Orval dry-run\nnpm install -g orval  # or use npx\n```\n\n## Installation\n\nTo use this skill with Claude Code, add it to your project's `skills\u002F` directory:\n\n```\nmy-expo-app\u002F\n├── app\u002F                          # Expo Router screens\n├── stores\u002F\n├── api\u002F\n├── skills\u002F\n│   └── expo-api-audit\u002F\n│       └── SKILL.md\n├── app.config.js                 # Expo config\n├── package.json\n└── ...\n```\n\nClaude Code auto-discovers skills in this directory. Once installed, trigger the audit with prompts like:\n- \"Run an API integration audit\"\n- \"Check for hardcoded data in my screens\"\n- \"Audit my auth token handling\"\n- \"Find forms that aren't syncing to the API\"\n- \"Check if I'm using expo-secure-store correctly\"\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fcjharmath\u002Fexpo-api-audit",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill expo-api-audit",{"tool":59,"command":60},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill expo-api-audit",{"tool":62,"command":63},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill expo-api-audit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcjharmath\u002Fexpo-api-audit\u002FSKILL.md",true,[67],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"skill-report.json","REFERENCE","参考文档",25168,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcjharmath\u002Fexpo-api-audit\u002Fskill-report.json",[74,83,92,101,107,113],{"skillNo":75,"name":76,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":39},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[80,81,82],"model","model hierarchy","model hierarchy skill",{"skillNo":84,"name":85,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":39},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[89,90,91],"MCP","zoom","zoom mcp",{"skillNo":93,"name":94,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":39},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[98,99,100,90],"sdk","zoom apps sdk","apps",{"skillNo":102,"name":103,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":39},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[103],{"skillNo":108,"name":109,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":39},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[109],{"skillNo":114,"name":115,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":39},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[115]]