К основному содержанию
скилл GitHub Copilot официальный · GitHub

react-container-presentation-component — скилл для GitHub Copilot

Скилл создаёт React-компонент по паттерну Container/Presentation и раскладывает файлы по соглашениям TypeScript, Storybook и SCSS.

Установить в GitHub Copilot · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add github/awesome-copilot --skill react-container-presentation-component
Открыть на GitHub

Что делает react-container-presentation-component

Скилл создаёт компонент в src/components, сначала запрашивая имя и тип: ui или features. Для ui он использует путь src/components/ui/, для features — src/components/features/. Имя компонента должно быть в PascalCase.

Для ui создаются index.tsx, index.module.scss и index.stories.tsx. Для features добавляются use.tsx, presentation.tsx, types.ts, presentation.module.scss и presentation.stories.tsx. Скилл проверяет существующие компоненты, учитывает состояние, побочные эффекты, асинхронную обработку и бизнес-логику, а затем предлагает запустить сборку, линтер и проверку Storybook. Подходит, если в проекте уже приняты эти TypeScript, Storybook и SCSS-соглашения; иначе его стоит обходить, чтобы не навязывать такую структуру.

Какие задачи решает

  • создать React-компонент в src/components
  • разделить компонент на Container и Presentation
  • выбрать тип ui или features
  • сгенерировать файлы для TypeScript, Storybook и SCSS
  • проверить сборку и линтер после создания

Примеры запросов агенту

  • Запусти `/react-container-presentation-component` и создай `UserCard` типа `ui`.
  • Создай `CheckoutForm` типа `features` через `/react-container-presentation-component`.
  • Создай компонент `ProductList` в `src/components` и сначала уточни недостающие параметры.

Как установить react-container-presentation-component

1Через Skills CLI (Vercel)

npx skills add github/awesome-copilot --skill react-container-presentation-component

2GitHub CLI

gh skill install github/awesome-copilot react-container-presentation-component

3Вручную: положить файлы

.github/skills/react-container-presentation-component/SKILL.md

Из того же набора554

Весь набор →
git-commit официальный github Скилл разбирает изменения Git, выбирает связанные файлы и создаёт коммит в формате Conventional Commits. Пригодится, когда нужно закоммитить одну или несколько логических частей изменений. GitHub Copilot 47 165установок excalidraw-diagram-generator официальный github Скилл превращает описание на обычном языке в диаграмму Excalidraw. Подойдёт, когда нужно показать процесс, связи между объектами или устройство системы. GitHub Copilot 31 639установок multi-stage-dockerfile официальный github Скилл помогает создавать многоэтапные Dockerfile для разных языков и фреймворков. Пригодится, когда важны размер и состав runtime-образа. GitHub Copilot 29 688установок documentation-writer официальный github Скилл для создания технической документации по фреймворку Diátaxis: туториалы, гайды, справки и объяснения. Предлагает структуру перед написанием. GitHub Copilot 27 757установок prd официальный github Собирает из идеи структурированный PRD с пользовательскими историями, техническими требованиями и рисками. Подходит для планирования новых функций, в том числе с AI. GitHub Copilot 24 035установок refactor официальный github Скилл помогает менять структуру кода без изменения внешнего поведения. Подойдёт для постепенной уборки сложных функций, дублирования и кодовых запахов. GitHub Copilot 22 321установок java-springboot официальный github Задаёт практики разработки Spring Boot-приложений: от структуры проекта до тестов и безопасности. Пригодится, когда Copilot пишет или проверяет Java-код. GitHub Copilot 21 272установок create-readme официальный github Скилл изучает проект и создаёт структурированный README.md. Подойдёт, когда документацию нужно собрать по коду и файлам проекта. GitHub Copilot 19 081установок

Похожие

frontend-app-builder официальный OpenAI Помогает спроектировать и собрать интерфейс приложения, сайта или игры, затем проверить его в браузере. Подойдёт для новой frontend-разработки и явного запроса на редизайн. CX Codex GP ChatGPT 252установок frontend-testing-debugging официальный OpenAI Помогает агенту находить баги в интерфейсе, проверять локальный dev-сервер и верстку. Организует пошаговую валидацию через плагин Browser или Playwright. CX Codex GP ChatGPT 159установок frontend-design официальный anthropics Скилл задаёт осмысленное визуальное направление для новых интерфейсов и редизайна. Подойдёт, когда стандартный шаблонный UI не устраивает. Claude Code Claude.ai 1 025 790установок design-taste-frontend Leonxlnx Скилл задаёт арт-дирекцию для публичных страниц и рабочих экранов, а затем проверяет результат в браузере по скриншотам. Нужен, когда интерфейс выглядит шаблонным или недоработанным. Claude Code CX Codex Cursor +1 673 100установок prototype Matt Pocock Создаёт временный прототип, чтобы проверить логику, модель состояния или вид интерфейса до работы над основным кодом. Claude Code 986 201установок hyperframes heygen-com Скилл задаёт агенту правила рендера HTML-кода в видео через HyperFrames. Помогает собирать проморолики, эксплейнеры и титры прямо в коде проекта. Claude Code CX Codex Cursor +1 1 200 000установок hyperframes-cli heygen-com Управляет проектами HyperFrames через терминал: собирает таймлайн, проверяет контраст кадров, запускает предпросмотр и рендерит видео локально или в облаке. Claude Code CX Codex Cursor +1 1 200 000установок webapp-testing официальный anthropics Скилл запускает проверки локальных веб-приложений через Playwright: помогает отлаживать UI, делать скриншоты и смотреть логи браузера. Claude Code Claude.ai 186 758установок

Вопросы о react-container-presentation-component

Как установить react-container-presentation-component в GitHub Copilot?

Выполните npx skills add github/awesome-copilot --skill react-container-presentation-component, gh skill install github/awesome-copilot react-container-presentation-component или используйте путь .github/skills/react-container-presentation-component/SKILL.md.

Что делает react-container-presentation-component?

Скилл создаёт React-компоненты по паттерну Container/Presentation, спрашивает имя и тип, проверяет существующие пути и формирует набор файлов для ui или features.

Какие файлы создаются для типа `features`?

Создаются index.tsx, use.tsx, presentation.tsx, types.ts, presentation.module.scss и presentation.stories.tsx.

Исходный текст

SKILL.md · MIT
---
name: react-container-presentation-component
description: "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."
argument-hint: "componentName type(ui|features)"
user-invocable: true
---

# 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.

2. Decide target directory

- `ui`: `src/components/ui/<ComponentName>`
- `features`: `src/components/features/<ComponentName>`

3. 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`

4. 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`

5. 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.

6. 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.

© github · MIT · github/awesome-copilot

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой