
Container/Presentation Component
OfficialFreeEasily scaffold React components using best practices.
Free · Opens the source repo
What Container/Presentation Component does
The Container/Presentation Component skill is designed to help developers create React components that adhere to the Container/Presentation pattern. This pattern separates the logic of the component (the container) from its presentation (the UI), promoting better organization and reusability of code. By utilizing this skill, users can quickly scaffold components in the src/components directory, ensuring that they follow established conventions for TypeScript, Storybook, and SCSS.
When using this skill, developers are prompted to provide the component name and type, either ui or features. The skill then checks for existing components to prevent overwriting and guides the user through the classification process. If a component is classified as ui, the skill ensures that it does not include state management or business logic, which would necessitate a features classification instead. This clear separation helps maintain a clean architecture in React applications.
The bundled references, such as component-architecture.md and typescript-and-scss-rules.md, provide additional guidelines on the rules and best practices to follow. This ensures that developers not only create components efficiently but also adhere to the standards that enhance maintainability and scalability. This skill is particularly useful for teams looking to enforce consistent patterns across their React projects, making it ideal for both individual developers and larger development teams.
When to use it
Use this skill when you need to create a new React component that follows the Container/Presentation pattern, especially when you want to maintain a clean separation of concerns.
When not to use it
Avoid this skill if you are not using the Container/Presentation pattern or if your component does not fit within the `ui` or `features` classifications.
What you can build with it
Creating a New UI Component
When you need to create a new UI component that does not manage state, use this skill to scaffold it quickly.
Refactoring Existing Components
If you want to refactor an existing component to follow the Container/Presentation pattern, this skill can guide you through the process.
Team Standardization
For teams looking to enforce coding standards, this skill helps ensure that all developers create components consistently.
How to install Container/Presentation Component
View source1. Install with the skills CLI
npx skills add github/awesome-copilot/react-container-presentation-component --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by githubContainer/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.
Frequently asked questions about Container/Presentation Component
Similar skills
Rhino 3D Scripting
Streamline your Rhinoceros 3D scripting tasks.
MVVM Toolkit
Streamline ViewModel development with source generators.
FreeCAD Scripts
Generate Python scripts for FreeCAD automation and modeling.
Azure Architecture Builder
Design and deploy Azure infrastructure using natural language.
Command Development
Streamline your command creation for Claude Code.
Create Cowork Plugin
Easily build and package plugins through guided sessions.
