Agent Native

expo-project-structure

This skill provides a folder structure template for new Expo apps using Expo Router.

by ExpoOfficial publisherNot reviewed

Identity proven by GitHub's verified organisation badge (expo)

Agents
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode
License
MIT (permissive)
Pin
d4f4840pinned Oct 9, 2026
Context cost
about 1,500 tokenswhen the skill loads
GitHub stars
2,682on expo/skills
Scripts
None found

What it does

“Folder structure for a new Expo app. Use when scaffolding or laying out a new Expo project with Expo Router, or deciding where a file should live in one. For new projects only — never restructure an existing app to match.”
The author's description, from SKILL.md

Generated summary from the skill's own text

This skill provides a folder structure template for new Expo apps using Expo Router. It organizes code into src/ with subdirectories for routes, components, screens, server logic, utilities, and hooks. The layout separates concerns by keeping route files in app/, reusable UI in components/, screen logic in screens/, and server helpers in server/.

When to use it

  • Scaffolding a brand new Expo project from scratch
  • Setting up folder organization for an Expo Router app
  • Deciding where files belong in an Expo codebase
  • Organizing platform-specific component variants

When not to

  • Restructuring an existing app with established conventions
  • Projects that already have a committed folder layout
  • When the project structure should not be changed to match conventions

Install

These commands install from the publisher's repository and need no account.

skills CLI

npx skills add expo/skills --skill expo-project-structure

Installs from the repository's default branch, which may have changed since the commit we checked.

GitHub CLI 2.90 or later

gh skill install expo/skills expo-project-structure@d4f484024fec15196bfd3c272e953e3f983972cf

Installs the commit we checked (d4f4840).

Copy by hand

Download the folder at d4f4840 and put it in .claude/skills/expo-project-structure for Claude Code and in .agents/skills/expo-project-structure for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.

Skill folder on GitHub at d4f4840

Claude Code plugin

/plugin install expo@claude-plugins-official

The publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.

Copy for your agent

A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.

Prompt

Install the agent skill "expo-project-structure" by Expo.

Source, pinned to commit d4f484024fec15196bfd3c272e953e3f983972cf:
https://github.com/expo/skills/tree/d4f484024fec15196bfd3c272e953e3f983972cf/plugins/expo/skills/expo-project-structure

1. Download that folder at exactly this commit. Do not use the default branch.
2. Copy every file unchanged, keeping the folder structure, into .claude/skills/expo-project-structure/ for Claude Code and .agents/skills/expo-project-structure/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist.
3. Do not edit the files, and do not run any script in the folder unless I ask you to.
4. When you are done, list the files you copied and where you put them.

Listing and checks: https://www.agentnative.dev/skills/expo/expo-project-structure

SKILL.md at the pin

---
name: expo-project-structure
description: Folder structure for a new Expo app. Use when scaffolding or laying out a new Expo project with Expo Router, or deciding where a file should live in one. For new projects only — never restructure an existing app to match.
version: 1.0.0
license: MIT
---

# Expo Project Structure

A starting skeleton for a **new** Expo app — one with no committed folder structure yet.

**Apply only to new projects.** If the app already has a layout, follow its existing conventions and leave files where they are — a default to start from, never a standard to enforce or migrate toward. When unsure whether a project is new, ask before moving anything.

The whole layout, assembled from the rules below:

```
├── assets/
├── scripts/
├── src/
│   ├── app/                       # Expo Router routes ONLY — every file is a route
│   │   ├── api/                   #   server API routes, grouped here
│   │   │   ├── user+api.ts
│   │   │   └── settings+api.ts
│   │   ├── _layout.tsx
│   │   ├── _layout.web.tsx         #   platform-specific layout
│   │   ├── index.tsx
│   │   └── settings.tsx
│   ├── components/                 # reusable UI: button, card, table…
│   │   ├── table/                  #   complex component → folder + index.tsx
│   │   │   ├── cell.tsx
│   │   │   └── index.tsx
│   │   ├── bar-chart.tsx
│   │   ├── bar-chart.web.tsx        #   platform-specific variant
│   │   └── button.tsx
│   ├── screens/                    # screen bodies that route files render
│   │   ├── home/
│   │   │   ├── card.tsx            #   used only by Home — not shared
│   │   │   └── index.tsx           #   rendered by src/app/index.tsx
│   │   └── settings.tsx
│   ├── server/                     # server-only helpers used by app/api
│   │   ├── auth.ts
│   │   └── db.ts
│   ├── utils/                      # standalone helpers + colocated tests
│   │   ├── format-date.ts
│   │   └── format-date.test.ts
│   ├── hooks/                      # reusable hooks: use-theme.ts…
│   ├── constants.ts
│   └── theme.ts
├── app.json
├── eas.json
└── package.json
```

## `src/` and `src/app`

Keep app code under `src/` to separate it from config files. Expo Router supports both `app/` and `src/app/` out of the box — to switch, move the folder and restart the bundler. The default template aliases `@/*` to `./src/*` in `tsconfig.json`.

`src/app` is **routes-only**: every file there becomes a route, so nothing else belongs in it. Everything below lives in sibling folders.

## components/ — reusable UI

Generic, reused UI (button, card, table) with one named export each. Name files in **kebab-case** (`bar-chart.tsx`), matching the default `create-expo-app` template. When a component grows, give it its own folder with the root in `index.tsx` and **colocate** its private sub-components beside it — the import path (`@/components/table`) stays unchanged.

## screens/ — screen bodies

Because `app/` files must be routes, complex screen UI that isn't reused has no home there. Once a screen grows big enough to need breaking out to separate components, put it in `screens/` and let each route just render its screen:

```tsx
import { Home } from "@/screens/home";

export default function HomeScreen() {
  // route-specific concerns only — e.g. read url params here
  return <Home />;
}
```

**Colocate** a screen's private components inside its folder (`screens/home/components/`). A bonus: the same screen can render under multiple routes.

## server/ + app/api/ — separate server code

Appending `+api` to a file in `app/` makes it a server **API route**. Server code is different from frontend code — it runs in a Node-like server environment (deployed with EAS Hosting or on [third-party services](https://docs.expo.dev/router/web/api-routes/#hosting-on-third-party-services)) and can read secret env vars (`process.env.X`, not just `EXPO_PUBLIC_*`). Keep it apart:

- Group all routes under `app/api/` → `/api/user`, `/api/settings`. This colocates them and avoids collisions (e.g. a `/user` screen and a `/user` route).
- Put shared server-only helpers in `src/server/`.
- Consider ESLint rules that fence `+api` files and `server/` off from frontend-only checks.

## Platform-specific code

Small differences: use `Platform.select` / `Platform.OS`. For larger ones, split into platform files instead of inline `if/else` — `bar-chart.tsx` + `bar-chart.web.tsx`, imported extension-free (`@/components/bar-chart`); Metro picks the right file per target.

- Props must be identical across variants.
- A default file (no platform extension) is always required — make it a no-op if the component is single-platform.
- Supported extensions: `.ios`, `.android`, `.native`, `.web`.

## Colocate styles and tests

- **Styles:** keep the `StyleSheet.create({ ... })` object at the bottom of the component file rather than in a separate `.styles` file.
- **Tests:** put `format-date.test.ts` next to `format-date.ts` (preferred over a separate `__tests__/` folder) so tested files are obvious at a glance.

## AI and config files

Agent instructions live at the repo root — `AGENTS.md` / `CLAUDE.md`, with project skills under `.claude/`. Other config and assets stay outside `src/`: `app.json` / `app.config.ts`, `eas.json`, `package.json`, `assets/`, and `scripts/`.

---

Based on [Expo app folder structure best practices](https://expo.dev/blog/expo-app-folder-structure-best-practices) by Kadi Kraman. For `src/` precedence and alias mechanics, see the [Expo docs](https://docs.expo.dev/router/reference/src-directory/).

## Submitting Feedback
If you encounter errors, misleading or outdated information in this skill, report it so Expo can improve:
```bash
npx --yes submit-expo-feedback@latest --category skills --subject "expo-project-structure" "<actionable feedback>"
```
Only submit when you have something specific and actionable to report. Include as much relevant context as possible.
If an AI agent repeatedly failed or the user had to take over an Expo task, load the expo-skill-feedback skill and follow its eval-candidate flow instead of reusing the command above.

From expo/skills at d4f4840, shown as plain text under its license: MIT (permissive). The license text is in plugins/expo/skills/expo-project-structure/SKILL.md.

View SKILL.md on GitHub at d4f4840

Files

2 files, 6.8 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.

Skill folder on GitHub at d4f4840
All 27 skills from Expo

More from Expo

  • expo-app-intents

    This skill adds Apple App Intents to Expo apps, enabling Siri voice commands and Shortcuts automation through Swift declarations that dispatch to JavaScript…

    Claude Code, Codex, Cursor +4 · about 3.6K tokens · pinned 6 days ago

  • expo-sqlite

    This skill enables SQLite database operations in Expo and React Native apps for structured data storage, offline queues, and persistent caches.

    Claude Code, Codex, Cursor +4 · about 2.6K tokens · pinned 6 days ago

  • eas-app-stores

    This skill configures and executes iOS and Android app builds and store submissions using EAS, Expo's app distribution service.

    Claude Code, Codex, Cursor +3 · about 1.7K tokens · pinned 6 days ago

  • eas-hosting

    This skill deploys Expo web applications and API routes to EAS Hosting, a managed edge platform running on Cloudflare Workers.

    Claude Code, Codex, Cursor +3 · about 2.7K tokens · pinned 6 days ago

  • eas-observe

    EAS Observe tracks startup, navigation, and custom-event performance in production Expo apps through instrumentation (AppMetricsRoot/ObserveRoot wrapper…

    Claude Code, Codex, Cursor +3 · about 1.1K tokens · pinned 6 days ago

  • eas-simulator

    Runs a user's app on a remote iOS or Android simulator hosted on EAS cloud infrastructure, accessible from machines without local simulator support like Linux…

    Claude Code, Codex, Cursor +3 · about 6.3K tokens · pinned 6 days ago

All Mobile skills
  • expo-animation

    This skill guides building animations in React Native and Expo apps using Reanimated, Gesture Handler, and Expo Router.

    by ExpoOfficial publisher

    Claude Code, Codex, Cursor +3 · about 4.6K tokens · pinned 6 days ago

  • expo-app-clip

    This skill adds an iOS App Clip target to an Expo project, creating a lightweight app experience invoked from URLs on your domain.

    by ExpoOfficial publisher

    Claude Code, Codex, Cursor +4 · about 2.3K tokens · pinned 6 days ago

  • expo-brownfield

    This skill helps agents add React Native to existing native iOS or Android apps incrementally using Expo.

    by ExpoOfficial publisher

    Claude Code, Codex, Cursor +4 · about 1.4K tokens · pinned 6 days ago

  • expo-data-fetching

    This skill guides implementing network requests, API calls, and data fetching in Expo apps using fetch, React Query, SWR, and Expo Router loaders.

    by ExpoOfficial publisher

    Claude Code, Codex, Cursor +3 · about 3.3K tokens · pinned 6 days ago

  • expo-dev-client

    This skill builds and distributes Expo development clients for testing native code changes on physical devices and simulators.

    by ExpoOfficial publisher

    Claude Code, Codex, Cursor +3 · about 1.1K tokens · pinned 6 days ago

  • expo-dom

    This skill enables Expo apps to run web code in webviews on native platforms and as-is on web using DOM components marked with the 'use dom' directive.

    by ExpoOfficial publisher

    Claude Code, Codex, Cursor +3 · about 2.5K tokens · pinned 6 days ago

The skills listed here are third-party software, collected from public GitHub repositories as a catalog of recent skills and provided as is. Agent Native does not write or control them and is not responsible for any harm, loss or damage caused by installing or using them. Labels and checks describe what we saw at one commit and are not a guarantee. Read a skill's files before you run it. Terms of use