expo-api-routes
Skill by sickn33
Guides an assistant in creating API routes in Expo Router and deploying them to EAS Hosting. It is for Expo developers who need server-side secrets, webhooks or API proxies. The source stresses implementing auth and input limits before exposing routes.
Install expo-api-routes
Built from the published package, never by AI.
git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills /tmp/agentic-awesome-skills && mkdir -p ~/.claude/skills && cp -r /tmp/agentic-awesome-skills/skills/expo-api-routes ~/.claude/skills/expo-api-routesRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills /tmp/agentic-awesome-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/agentic-awesome-skills/skills/expo-api-routes ~/.gemini/antigravity-cli/skills/expo-api-routesAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This agent skill from the expo/skills repository gives guidelines for building API routes in Expo Router. It covers the +api.ts file structure, exported HTTP method handlers, dynamic routes, request handling, CORS headers and error handling. It also explains when to use API routes and when a managed backend is a better fit.
The skill shows how to keep secrets in process.env on the server, test locally with npx expo start, and deploy with eas deploy to EAS Hosting. It describes the Cloudflare Workers runtime, including missing filesystem access and a 30 second timeout for CPU-intensive tasks. It is aimed at developers building Expo apps who need a server-side layer, and it warns that example code needs real authentication and validation before use.
Written from the project's SKILL.md and checked against it.
What it can do
- Route file structureMaps +api.ts files in the app directory to URL paths, including dynamic routes.
- HTTP method handlersShows named GET, POST, PUT, DELETE and OPTIONS exports in route files.
- Request handlingCovers reading query parameters, headers and JSON bodies in route handlers.
- Environment variablesExplains using process.env for server secrets and setting them with eas env:create.
- CORS headersAdds CORS headers so web clients can call API routes.
- Auth guidanceShows a bearer token check that returns 401 when credentials are missing.
- Local testing and deploymentCovers testing with npx expo start and deploying with eas deploy.
- Runtime limitsLists Cloudflare Workers limits such as no filesystem access and a 30 second timeout.
What you need
- An Expo project using Expo Router
- EAS CLI installed with npm install -g eas-cli
- An EAS account to log in with eas login
- Third-party API keys, if a route proxies an external service
Try asking
- Create an Expo API route that proxies OpenAI with the key kept on the server.
- Add a dynamic users route at app/api/users/[id]+api.ts with a GET handler.
- Show me how to set a production secret with eas env:create for my Expo app.
Good to know
- The filesystem (fs) module is unavailable on EAS Hosting.
- A 30 second timeout applies to CPU-intensive tasks.
- WebSockets require Durable Objects, and persistent connections are not available by default.
- Example routes are incomplete demos and need real auth, validation and rate limits.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/expo-api-routes/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md10 KB -
agents/openai.yaml353 B
Alternatives to expo-api-routes
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
expo-api-routes: common questions
Where do API routes live in an Expo project?
They live in the app directory with a +api.ts suffix, such as app/api/hello+api.ts. Each named export like GET or POST handles that HTTP method.
Where do EAS Hosting API routes run?
The source says API routes run on Cloudflare Workers. It lists limits such as no Node.js filesystem access.
How should secrets be handled?
Keep secrets out of EXPO_PUBLIC variables and client imports. Use process.env on the server and set production values with eas env:create or the Expo dashboard.
How do I install expo-api-routes?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is expo-api-routes free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is expo-api-routes safe to use?
It scores 92 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to expo-api-routes?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
