xiaohongshu
xiaohongshu
expo-gluestack
Comprehensive instructions for building Expo apps using gluestack-ui.
Full skill instructions
This document defines the skill set and operational guidelines for AI agents working on this project. The primary goal is to build high-quality, visually appealing mobile applications using Expo and gluestack-ui.
When starting a new project or setting up the environment, the agent must follow these steps:
Use the latest Expo template:
npx create-expo-app@latest my-app --template default
cd my-app
Follow the official installation guide to integrate gluestack-ui:
Initialize gluestack-ui:
npx gluestack-ui init
GluestackUIProvider.components folder for your UI components.Wrap Application Root:
Ensure the root layout (e.g., app/_layout.tsx or App.tsx) is wrapped with the provider:
import { GluestackUIProvider } from "@/components/ui/gluestack-ui-provider";
import "@/global.css"; // If using NativeWind or global styles
export default function Layout() {
return (
<GluestackUIProvider>
<Slot /> {/* or your main app content */}
</GluestackUIProvider>
);
}
gluestack-ui is unstyled by default and headless, meaning you add components as you need them.
NEVER try to import a component that hasn't been added to the project. Always check the components/ui directory first.
To add a new component (e.g., Button, Box, Text):
npx gluestack-ui add [component-name]
# Example:
npx gluestack-ui add button box text
Agent Note: If a user asks for a UI element, identify the corresponding gluestack component, run the add command if it's missing, and then implement it.
Box, VStack, HStack, Center for layout instead of raw View styles.
<VStack space="md" reversed={false}>
<Box className="w-20 h-20 bg-primary-500" />
</VStack>
Text and Heading with size props.Button, Pressable, Link.$2, $4, md, lg).<Box w="$full" md-w="$1/2"> (Full width on mobile, half width on medium screens/tablets).space prop in stacks or padding props).import { useForm, Controller } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
// ... define z.object schema ...
lucide-react-native).import { Camera } from "lucide-react-native";
import { Icon } from "@/components/ui/icon";
// Usage: <Icon as={Camera} size="md" />
app/_layout.tsx: Root provider setup (gluestack, query client).app/(tabs): For tab-based navigation.app/[id].tsx: For dynamic routes.Link from expo-router for web-compatible navigation.File Structure:
app/ (if using Expo Router).components/.hooks/ or utils/.Code Style:
useState, useEffect) appropriately.Error Handling:
npx gluestack-ui add), if they fail, analyze the error (e.g., missing peer dependencies) and fix it before proceeding.Dependency Management:
npx expo install [package-name] instead of npm install or yarn add when possible, as this ensures the installed version is compatible with the project's Expo SDK version.When assigned a task to build a screen:
components/ui; if not, run npx gluestack-ui add ....VStack/HStack for layout.To enhance capability, the agent should leverage established skill sets from industry leaders:
upgrading-expo: When moving between Expo SDK versions.expo-deployment: For setting up EAS Build and Submit.expo-app-design: General Expo app architecture guidance.xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience