react-container-presentation-component
Что он делает
Этот инструмент создаёт компоненты кода для сайта или приложения на React. Он помогает упорядочить код, следуя определённому шаблону под названием «Container/Presentation».
Когда использовать
- ✓Когда вы хотите создать новый компонент кода для своего проекта на React.
- ✓Когда нужно лучше организовать код проекта по определённому шаблону.
- ✓Когда хотите убедиться, что код следует принятым правилам организации и стиля.
Ссылка на скилл
https://github.com/github/awesome-copilot/blob/main/skills/react-container-presentation-component/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Создайте компонент React с именем «UserProfile» по шаблону Container/Presentation и отнесите его к категории «ui».”
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.mdreferences/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
uivsfeaturesclassification within the Container/Presentation pattern
Required Questions
If any of the following information is missing, ask the user using ask_user.
- Component name
- Type (
uiorfeatures) - 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 existingfeaturesshould be replaced with the new component
Procedure
- Check existing components
- Check whether
src/components/ui/<ComponentName>orsrc/components/features/<ComponentName>already exists. - If it exists, do not overwrite; confirm the preferred approach with the user.
- Decide target directory
ui:src/components/ui/<ComponentName>features:src/components/features/<ComponentName>
- Re-check classification (only when
uiis specified)
- Even when
uiis specified, before creating files, reviewReclassification Ruleinreferences/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 asui; useask_userand confirm one of the following before continuing.Create as featuresKeep ui and move state/logic to parent or features
- Create required files
ui:index.tsx,index.module.scss,index.stories.tsxfeatures:index.tsx,use<ComponentName>.tsx,presentation.tsx,types.ts,presentation.module.scss,presentation.stories.tsx
- Replace existing usages (only when creating
ui)
- Only when the user approves, replace equivalent direct implementations using Mantine or other UI libraries in existing
featureswith the newuicomponent.
- Validate
- Run build and lint commands, and ensure both pass; if issues are introduced by newly added or updated files, fix them.
- Follow
Storybook Minimuminreferences/component-architecture.mdfor story state decisions. - Ask the user via
ask_userwhether to run a Storybook check (for example: "Run" / "Skip for now"). - Run
npm run storybookonly 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
uiorfeatures. - 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?
Это способ организации кода, при котором один компонент («контейнер») отвечает за логику и данные, а другой («презентационный») отвечает только за то, как что-то выводится на экран.
Что такое «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
- Обновлён
- 15.10.2026
Комментарии
- …
Другие скиллы из этого репозитория
acquire-codebase-knowledge
40kПомогает агенту понять и задокументировать существующий проект.
acreadiness-assess
40kАгент оценивает готовность проекта к работе с ИИ и составляет отчёт.
acreadiness-generate-instructions
40kПомогает агенту создать инструкции для ИИ-инструментов по итогам оценки.
acreadiness-policy
40kАгент помогает задавать политики оценки ИИ-готовности проектов.
Похожие скиллы
angular-developer
280kПомогает агенту писать код на Angular и советовать по структуре проекта. Полезен для новых проектов, создания частей кода и улучшения производительности.
frontend-a11y
280kПомогает агенту делать веб-интерфейсы доступными для всех, чтобы сайты и приложения работали с программами чтения с экрана и клавиатурой.
frontend-patterns
280kАгент применяет современные паттерны фронтенд-разработки: оптимизирует производительность, управляет состоянием и следует практикам React и Next.js.