MCP HubMCP Hub
SKILL·BCCB49

expo-project-structure

expo
更新日 Yesterday
1 閲覧
2,217
112
2,217
GitHubで表示
その他api

について

このスキルは、Expo Routerを使用する新しいExpoアプリ向けに標準化されたフォルダ構造を提供し、開発者がプロジェクトの基盤を作成し、ファイルの配置を決定するのを支援します。モダンな慣習に従い、ルート、コンポーネント、ユーティリティ、アセット用に整理されたディレクトリを含みます。このレイアウトは新規プロジェクト専用であり、既存のアプリをこの構成に合わせて再構築することは避けてください。

クイックインストール

Claude Code

推奨
メイン
npx skills add expo/skills -a claude-code
プラグインコマンド代替
/plugin add https://github.com/expo/skills
Git クローン代替
git clone https://github.com/expo/skills.git ~/.claude/skills/expo-project-structure

このコマンドをClaude Codeにコピー&ペーストしてスキルをインストールします

ドキュメント

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:

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) 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/elsebar-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 by Kadi Kraman. For src/ precedence and alias mechanics, see the Expo docs.

GitHub リポジトリ

expo/skills
パス: plugins/expo/skills/expo-project-structure
0
FAQ

Frequently asked questions

What is the expo-project-structure skill?

expo-project-structure is a Claude Skill by expo. Skills package instructions and resources that Claude loads on demand, so Claude can perform expo-project-structure-related tasks without extra prompting.

How do I install expo-project-structure?

Use the install commands on this page: add expo-project-structure to Claude Code as a plugin, or clone its repository into your skills directory, then restart Claude so it picks up the skill.

What category does expo-project-structure belong to?

expo-project-structure is in the Other category, tagged api.

Is expo-project-structure free to use?

Yes. expo-project-structure is listed on AIMCP and free to install. It runs inside Claude, so no separate service account is required to use the skill itself.

関連スキル

llamaguard
その他

LlamaGuardは、暴力やヘイトスピーチなど6つの安全性カテゴリーにおいて、LLMの入力と出力をモデレートするMetaの70-80億パラメータモデルです。94〜95%の精度を提供し、vLLM、Hugging Face、Amazon SageMakerを使用してデプロイ可能です。このスキルを使用して、AIアプリケーションにコンテンツフィルタリングと安全策を簡単に統合できます。

スキルを見る
cost-optimization
その他

このClaudeスキルは、リソースの適正サイジング、タグ付け戦略、支出分析を通じて、開発者がクラウドコストを最適化することを支援します。AWS、Azure、GCPにわたるクラウド支出の削減とコストガバナンスの実施のためのフレームワークを提供します。インフラコストの分析、リソースの適正サイジング、または予算制約への対応が必要な際にご利用ください。

スキルを見る
sports-betting-analyzer
その他

このClaudeスキルは、スポーツベッティング市場(スプレッド、オーバー/アンダー、プロップベットなど)を分析し、過去の傾向や状況統計を検証することでバリューベットを特定します。教育目的のための実践的な提案を構造化されたマークダウン形式で出力します。開発者はスポーツベッティング分析ツールとして本機能を活用できますが、娯楽および教育目的に限定されている点に留意してください。

スキルを見る
quantizing-models-bitsandbytes
その他

このスキルは、bitsandbytesを使用してLLMを8ビットまたは4ビット精度に量子化し、精度の低下を最小限に抑えつつ50〜75%のメモリ削減を実現します。限られたGPUメモリでより大規模なモデルを実行したり、推論を高速化するのに理想的で、INT8、NF4、FP4などのフォーマットをサポートしています。HuggingFace Transformersと統合され、QLoRAトレーニングや8ビットオプティマイザーを可能にします。

スキルを見る