Technical & DevelopmentIntermediate
expo-api-routes
Create API routes in Expo Router with EAS Hosting
Developer Setup
Setup & Installation
bash
npx skills add https://github.com/expo/skills --skill expo-api-routesnpx skills add https://github.com/expo/skills --skill expo-api-routesOr paste this URL into your assistant to install:
Overview
What This Skill Does
API routes in Expo Router let you run server-side code alongside your mobile and web app, using the same file-based routing convention. Routes are defined with a `+api.ts` suffix and deploy to Cloudflare Workers via EAS Hosting.
Application
When to use this Skill
- Configuring integration settings for custom agent workflows.
- Optimizing query execution and response latency in production.
- Developing clean, standard-compliant implementations for enterprise services.
- Troubleshooting connection timeouts and authentication handshakes.
- Monitoring API rate limits and execution pipelines programmatically.
Documentation
Show Skills.md file
When to Use API Routes
Use API routes when you need:
- Server-side secrets — API keys, database credentials, or tokens that must never reach the client
- Database operations — Direct database queries that shouldn't be exposed
- Third-party API proxies — Hide API keys when calling external services (OpenAI, Stripe, etc.)
- Server-side validation — Validate data before database writes
- Webhook endpoints — Receive callbacks from services like Stripe or GitHub
- Rate limiting — Control access at the server level
- Heavy computation — Offload processing that would be slow on mobile
When NOT to Use API Routes
Avoid API routes when:
- Data is already public — Use direct fetch to public APIs instead
- No secrets required — Static data or client-safe operations
- Real-time updates needed — Use WebSockets or services like Supabase Realtime
- Simple CRUD — Consider Firebase, Supabase, or Convex for managed backends
- File uploads — Use direct-to-storage uploads (S3 presigned URLs, Cloudflare R2)
- Authentication only — Use Clerk, Auth0, or Firebase Auth instead
File Structure
Lines 1 - 25 of 361
Recommendations
Explore other random skills
TechnicalIntermediate
audit-context-building
Deep architectural context via ultra-granular code analysis
TechnicalIntermediate
building-secure-contracts
Smart contract security toolkit with vulnerability scanners for 6 blockchains
TechnicalIntermediate
constant-time-analysis
Detect compiler-induced timing side-channels in crypto code