본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)40k · #7382

react-container-presentation-component

하는 일

이 도구는 React로 만든 웹사이트나 앱의 코드 컴포넌트를 만듭니다. 'Container/Presentation'이라는 특정 패턴을 따라 코드를 체계적으로 정리하도록 돕습니다.

사용하는 경우

  • ✓React 프로젝트에 새 코드 컴포넌트를 만들고 싶을 때.
  • ✓특정 패턴을 따라 프로젝트 코드를 더 잘 정리해야 할 때.
  • ✓코드가 정해진 구조와 스타일 규칙을 따르도록 하고 싶을 때.

스킬 링크

https://github.com/github/awesome-copilot/blob/main/skills/react-container-presentation-component/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/github/awesome-copilot/blob/main/skills/react-container-presentation-component/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“'ui'로 분류되는 'UserProfile'이라는 React 컴포넌트를 Container/Presentation 패턴으로 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

컴포넌트 이름과, 'ui'(인터페이스) 또는 'features'(기능) 중 어느 쪽인지 알려 줍니다. 그러면 도구가 프로젝트의 구조와 스타일 규칙을 지키며 필요한 파일을 만듭니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Container/Presentation Component

Use this skill to create a React component under src/components that follows the Container/Presentation pattern.

Refer to this skill's bundled references for detailed rules.

  • references/component-architecture.md
  • references/typescript-and-scss-rules.md

If the /react-container-presentation-component input is incomplete, ask questions first before creating files.

When To Use

  • When the user runs /react-container-presentation-component
  • When the user explicitly asks for a React component that follows the Container/Presentation pattern
  • When the user wants help deciding or implementing ui vs features classification within the Container/Presentation pattern

Required Questions

If any of the following information is missing, ask the user using ask_user.

  1. Component name
  2. Type (ui or features)
  3. Whether to replace existing components (only when creating ui)

Question requirements:

  • Provide the type as options (ui, features)
  • Require the component name to be in PascalCase
  • For ui, ask whether direct usage of Mantine or other UI libraries in existing features should be replaced with the new component

Procedure

  1. Check existing components
  • Check whether src/components/ui/<ComponentName> or src/components/features/<ComponentName> already exists.
  • If it exists, do not overwrite; confirm the preferred approach with the user.
  1. Decide target directory
  • ui: src/components/ui/<ComponentName>
  • features: src/components/features/<ComponentName>
  1. Re-check classification (only when ui is specified)
  • Even when ui is specified, before creating files, review Reclassification Rule in references/component-architecture.md.
  • If the implementation includes state management, side effects, async processing, context/store updates, or business logic, treat it as features.
  • If the result is closer to features, do not proceed as ui; use ask_user and confirm one of the following before continuing.
    • Create as features
    • Keep ui and move state/logic to parent or features
  1. Create required files
  • ui: index.tsx, index.module.scss, index.stories.tsx
  • features: index.tsx, use<ComponentName>.tsx, presentation.tsx, types.ts, presentation.module.scss, presentation.stories.tsx
  1. Replace existing usages (only when creating ui)
  • Only when the user approves, replace equivalent direct implementations using Mantine or other UI libraries in existing features with the new ui component.
  1. Validate
  • Run build and lint commands, and ensure both pass; if issues are introduced by newly added or updated files, fix them.
  • Follow Storybook Minimum in references/component-architecture.md for story state decisions.
  • Ask the user via ask_user whether to run a Storybook check (for example: "Run" / "Skip for now").
  • Run npm run storybook only if the user selects "Run".
  • If the user selects "Skip for now", explicitly mention in the final report that Storybook execution was skipped.

Output Contract

  • Report the list of files created.
  • If replacements were performed, report the list of changed files and replacement details.
  • Provide one usage example of the created component.
  • Report whether Storybook verification was executed (run/skip), and if run, include the command used.
  • Explain why the component was classified as ui or features.
  • Summarize where state, side effects, and rendering responsibilities were placed.
  • Confirm whether there were any dependency direction violations.
  • Clearly state any unresolved items.
자주 묻는 질문

Container/Presentation 패턴은 무엇인가요?

한 컴포넌트('container')가 로직과 데이터를 처리하고, 다른 컴포넌트('presentation')는 화면에 보여 주는 방법만 처리하도록 코드를 정리하는 방식입니다.

'ui'와 'features'는 무엇인가요?

'ui' 컴포넌트는 버튼이나 텍스트 입력 칸처럼 모양만 담당합니다. 'features' 컴포넌트는 데이터를 가져오거나 양식을 관리하는 등 로직을 가집니다.

같은 이름의 컴포넌트가 이미 있으면 어떻게 되나요?

도구는 자동으로 덮어쓰지 않습니다. 대신 원하는 방식을 물어봅니다. 예를 들어 이름을 바꾸거나 만들지 않는 것입니다.

상세 정보

작성자의 원본 설명

Create a React component using the Container/Presentation pattern in src/components by asking for the component name and type (ui or features), then scaffold files that follow this repository's TypeScript, Storybook, and SCSS conventions. Use when the user explicitly asks for a Container/Presentation-based component or runs /react-container-presentation-component.

repo: github/awesome-copilot

인기도

GitHub 스타
40k
순위
#7382
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬