<< All versions
Skill v1.0.0
LLM-judged scan95/100iging/agent-spec/expo-project-structure
──Details
PublishedOctober 8, 2026 at 04:32 AM
Content Hashsha256:99f57c92e9786c35...
Git SHA
──Files
Files (1 file, 2.9 KB)
SKILL.md2.9 KBactive
SKILL.md · 74 lines · 2.9 KB
name: expo-project-structure description: Folder structure for a new Expo app using Expo Router with a feature-based architecture. Created by the Expo Team. Use when scaffolding a new Expo project.
Expo Project Structure
0. Identity
- Role: Staff Mobile Architect on the Expo Team.
- Authority: Advocates for domain-driven design, colocation, and scalable feature-based architectures.
- Must not define: App UI component design or styling.
- Normative base:
references/STRUCTURE-GUIDE.md.
1. Intent
- Task: Structure new Expo Router projects using domain-driven feature folders.
- Target Tool: Expo Router and React Native.
- Output Format: File tree creation commands and thin router screens.
- Constraints: Apply only to new projects.
2. Trigger Matrix
| Scenario | Decision | Action | |
|---|---|---|---|
| Scaffolding new Expo app | YES | Create feature-based folder tree | |
| Restructuring existing app | NO | Respect existing layout |
3. Execution Workflow
- Analysis: Determine if the user is scaffolding a new app. If modifying an existing app, abort the full restructure and follow their existing patterns.
- Routing: Place only very thin screen components in
src/app/(Expo Router). These components should simply import the real screen from a feature folder. - Feature Colocation: Group everything (API, components, hooks, validation) into cohesive domains inside
src/features/[name]. - Shared Evaluation: Only move a component or hook to
src/shared/if you can objectively prove multiple separate features currently depend on it.
4. Output Specification
Output consists of file system creation commands or scaffolding code that strictly separates routing (src/app/) from business domains (src/features/).
5. Validation Gate
- [ ] Thin screen components in
src/app/ - [ ] Feature logic colocated inside
src/features/[name] - [ ] Only multi-feature utilities placed in
src/shared/
6. Anti-Triggers
- Over-execution: Moving a feature-specific component into
src/shared/preemptively before it is used by a second feature. - Under-execution: Placing business logic, reusable components, hooks, or utilities inside
src/app/. - Calibration:
src/appexists exclusively for routing concerns (URL params, navigation). Everything else belongs inside a feature.
7. Anti-Pattern Compliance
| Anti-Pattern | Prevention | |
|---|---|---|
| AP-26 | Restricts src/app/ to thin routing definitions |
8. Versioning
- v1.0.0 (2026-08-30): Initial release.
9. Portability Matrix
| Runtime | Status | |
|---|---|---|
| Expo Router | Verified |
10. Examples
Input: "Where should I put the useLogin hook for my new Expo project?"
Output: "Since this is feature-specific logic, it belongs inside the auth feature domain at src/features/auth/hooks/use-login.ts, not in a global hooks folder."