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.

referencestypescript-and-scss-rules.md

≈341 tokens on demand. Your agent reads this file only when SKILL.md points to it.

TypeScript and SCSS Rules Reference

TypeScript Rules

  • Do not use any.

    // Bad
    const handler = (e: any) => {};
    
    // Good
    const handler = (e: React.ChangeEvent<HTMLInputElement>) => {};
  • Use type for props instead of interface.

    // Bad
    interface ButtonProps {
      label: string;
    }
    
    // Good
    type ButtonProps = { label: string };
  • Explicitly annotate function return types.

    // Bad
    const getLabel = () => "hello";
    
    // Good
    const getLabel = (): string => "hello";

SCSS Rules

Tokens

  • Use color variables from src/styles/theme.scss.
  • Use animation variables from src/styles/animation.scss.
  • Define z-index tokens in src/styles/z-index.scss and consume those tokens in component styles.
  • In component SCSS, do not hardcode z-index values (for example, avoid z-index: 10; and use a z-index token instead).

Style Constraints

  • Prefer Mantine or other UI libraries first; use SCSS only when complementing library styles is necessary.
  • Do not use negative margins.
  • Prefer unitless line-height.
  • Prefer letter-spacing in em.
  • When margin is needed, only margin-top and margin-left are allowed.
  • Do not set margin or position on root elements.
  • The numeric values inside src/styles/z-index.scss must follow a 50-step scale (100, 150, ...).

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.