Index of every page on this site: llms.txt
All skills
github avatar

/react-container-presentation-component

@f10fdb8 official
by githubgithub/awesome-copilot42k stars
5,426
Run it yourself

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.

Use this Skill: https://skilld.dev/gh/github/awesome-copilot/react-container-presentation-component

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈102 tokens for metadata: the name and description. ≈907 when used: this file. ≈1.7k more on demand in 2 files.

Description uses 5.1% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈407 characters, or 5.1%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts28d3 checks · Risk SAFE
  • Gen Agent Trust Hub28d

    This skill scaffolds React components using the Container/Presentation pattern. It creates files, refactors existing code, and runs project validation scripts. While it includes input validation and user confirmation steps, it processes user-provided names that are used in file operations and build commands.

  • Socket28d

    No alerts

  • Snyk28d

    Risk: LOW · No issues

Signed by skilld at f10fdb8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 5 months ago
argument-hint
componentName type(ui|features)
user-invocable
true
  • React
  • TypeScript
  • container-presentation
  • component-scaffold
  • storybook
  • scss
  • ui-components

README badge

README badge for github/awesome-copilot/react-container-presentation-component

Scaffolds a React component in src/components using the Container/Presentation pattern, generating TypeScript files, SCSS modules, and Storybook stories that match the repository's conventions. Asks for component name and type (ui or features), then creates the appropriate file structure with validation against state and side-effect rules.

Generated from the current SKILL.md.

Does this skill work with existing components or only create new ones?
It checks for existing components first and will not overwrite them. If a component already exists, it asks you to confirm the preferred approach before proceeding.
What's the difference between ui and features components?
ui components are presentational with no state or business logic; features components handle state management, side effects, and business logic. The skill will reclassify a ui component as features if it detects state, async processing, or context updates.
Does this skill update existing usages of Mantine or other UI libraries?
Only when creating a ui component and only with your explicit approval. It will ask whether to replace equivalent direct implementations in existing features components.
What files does this skill generate?
For ui: index.tsx, index.module.scss, and index.stories.tsx. For features: index.tsx, use<ComponentName>.tsx, presentation.tsx, types.ts, presentation.module.scss, and presentation.stories.tsx.
Does this skill run Storybook automatically?
No. It asks whether to run `npm run storybook` after generating files; you can skip Storybook verification if preferred.

Generated from the current SKILL.md. These answers refresh after source changes.