roninforge/roninforge-expo/expo-new-route

Claude Code and agent skill by roninforge/roninforge-expo

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Scaffolds a new Expo Router 55 route file under app/ following file-based routing conventions. Produces either a static route (app/<segment>/index.tsx), a dynamic route (app/<segment>/[id].tsx with useLocalSearchParams<{ id: string }>()), or a catch-all route (app/<segment>/[...rest].tsx). The scaffolded file includes a default exported function component, typed useLocalSearchParams when applicable, a Stack.Screen options block for the route title, an optional ErrorBoundary export, and uses expo-image for any image imports. Refuses class components, useRoute and useNavigation from @react-navigation/native, raw Image from react-native for remote content, untyped useLocalSearchParams, NavigationContainer, createStackNavigator, and any router.navigate calls expecting stack-pop semantics (use router.dismissTo instead).

Install

npx vskill@latest install roninforge/roninforge-expo/expo-new-route

SKILL.md

The same SKILL.md was published earlier as roninforge/roninforge-expo/expo-new-route.

expo-new-route

Use when the user asks for "a new screen", "a new route", "a new page", "a profile screen", etc. in an Expo Router 55 project.

Decide the file path

IntentFilename
Single screen at /fooapp/foo.tsx
Nested screens sharing a layout at /foo/*app/foo/_layout.tsx + app/foo/index.tsx
Dynamic id route at /post/:idapp/post/[id].tsx
Catch-all under /docs/*app/docs/[...rest].tsx
Group with shared layout but no URL prefixapp/(group)/_layout.tsx + screens

Template: static route

tsx
// app/about.tsx
import { Stack } from "expo-router";
import { Text, View } from "react-native";
export default function About() {
return (
<View style={{ flex: 1, padding: 16 }}>
<Stack.Screen options={{ title: "About" }} />
<Text>About this app.</Text>
</View>
);
}

Template: dynamic route

tsx
// app/post/[id].tsx
import { Stack, useLocalSearchParams } from "expo-router";
import { Text, View } from "react-native";
import { Image } from "expo-image";
export default function Post() {
const { id } = useLocalSearchParams<{ id: string }>();
return (
<View style={{ flex: 1, padding: 16 }}>
<Stack.Screen options={{ title: `Post ${id}` }} />
<Image
source={`https://example.com/post/${id}/cover.jpg`}
style={{ width: "100%", aspectRatio: 16 / 9 }}
contentFit="cover"
transition={200}
/>
<Text>Post id: {id}</Text>
</View>
);
}
export function ErrorBoundary({ error }: { error: Error }) {
return <Text>Failed to load post: {error.message}</Text>;
}

Template: catch-all

tsx
// app/docs/[...rest].tsx
import { useLocalSearchParams } from "expo-router";
import { Text } from "react-native";
export default function Docs() {
const { rest } = useLocalSearchParams<{ rest: string[] }>();
return <Text>Docs path: {rest?.join("/")}</Text>;
}

Refuses

  • Class components (use function components)
  • import { useRoute, useNavigation } from "@react-navigation/native" (use useLocalSearchParams and router from expo-router)
  • import { Image } from "react-native" for remote URLs (use expo-image)
  • useLocalSearchParams() without type parameter
  • Imports from @react-navigation/native for navigation primitives
  • router.navigate("/feed") expecting it to pop the stack (use router.dismissTo("/feed"))
  • Adding the file to a routes config (not needed; file-based routing is implicit)

After scaffolding, remind the user to run npx expo start so the typed-routes generator can pick up the new file.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/roninforge/roninforge-expo/expo-new-route/badge)](https://verified-skill.com/skills/roninforge/roninforge-expo/expo-new-route)

Something wrong with this skill or its page? Tell us.