React Native Screen Component Creation

VerifiedSafe

Creates a React Native screen component file in src/screens/. Used when adding a new screen, such as 'home screen' or 'profile screen'. The skill generates a TypeScript file with a basic template including flexbox layout, StatusBar, and proper naming conventions.

Sby Skills Guide Bot
DevelopmentIntermediate
1406/2/2026
Claude Code
#react-native#screen-component#typescript#expo#ui-component

Recommended for

Our review

Creates a React Native screen component in the src/screens/ directory with a standard template including imports, styling, and 'Screen' suffix.

Strengths

  • Automatically creates the directory and .tsx file
  • Appends 'Screen' suffix if missing
  • Provides a functional template with StyleSheet, View, Text, and StatusBar

Limitations

  • Does not handle advanced navigation props or typing automatically
  • No business logic or custom hooks are generated
When to use it

When adding a new screen to a React Native project using Expo.

When not to use it

For reusable UI components (buttons, cards) or screens requiring highly specific configurations.

Security analysis

Safe
Quality score90/100

The skill only generates a React Native screen component boilerplate file. It uses allowed tools for reading/writing files and running basic shell commands (mkdir, file creation) without any destructive or exfiltrating actions. No risks identified.

No concerns found

Examples

Add a Home screen
Add a screen called Home to the project.
新しい画面を追加
ホーム画面を作って

name: screen description: React Nativeの画面(Screen)コンポーネントを作成する。「画面を追加して」「ホーム画面を作って」などのリクエストで使用する。 allowed-tools: Read, Write, Edit, Glob, Grep, Bash argument-hint: [画面名]

画面コンポーネント作成

src/screens/ に画面用コンポーネントを作成する。

手順

  1. src/screens/ ディレクトリが存在しなければ作成する
  2. PascalCase のファイル名で .tsx ファイルを作成する(例: $ARGUMENTS.tsx または ${ARGUMENTS}Screen.tsx
  3. 画面名が "Screen" で終わっていなければ自動でサフィックスを付ける

テンプレート

import React from 'react';
import { StyleSheet, View, Text } from 'react-native';
import { StatusBar } from 'expo-status-bar';

export const ScreenNameScreen: React.FC = () => {
  return (
    <View style={styles.container}>
      <Text style={styles.title}>ScreenName</Text>
      <StatusBar style="auto" />
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
  title: {
    fontSize: 24,
    fontWeight: 'bold',
  },
});

ルール

  • 画面コンポーネントは flex: 1 でフルスクリーンにする
  • SafeAreaViewStatusBar を適切に使う
  • ナビゲーションライブラリが導入済みなら、navigation props の型を適切に定義する
  • ビジネスロジックが複雑な場合はカスタムフックに切り出す
Related skills