horusgoul/eslint-plugin-react-render-types/react-render-types-composition

Claude Code and agent skill by horusgoul/eslint-plugin-react-render-types

Trust tier 2
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Composition patterns for building React components with @renders type annotations from eslint-plugin-react-render-types. Use when: (1) writing React components that need @renders JSDoc annotations, (2) building a design system with enforced component composition (e.g., Menu only accepts MenuItem), (3) deciding which @renders modifier to use (required, optional, many, unchecked), (4) creating wrapper or transparent components, (5) annotating slot props like children/header/footer, (6) using render chains, union types, or type aliases with @renders, or (7) building app layouts that consume a @renders-annotated design system.

Install

npx vskill@latest install horusgoul/eslint-plugin-react-render-types/react-render-types-composition

SKILL.md

React Render Types — Composition Patterns

Patterns for building React components with @renders type annotations. Covers design system primitives, app-level composition, and advanced techniques.

Annotation Syntax Quick Reference

@renders {X} Required — must return X
@renders? {X} Optional — may return X or null
@renders* {X} Many — zero or more X
@renders! {X} Unchecked — declares X, skips return validation
@renders {A | B} Union — must return A or B
@renders {MyAlias} Type alias — resolves type MyAlias = A | B at lint time
@transparent Wrapper — plugin looks through to validate children
(or use additionalTransparentComponents setting for built-ins)

Pattern Categories

PriorityCategoryWhen to read
1Design System PatternsBuilding constrained component APIs
2Wrapper PatternsCreating transparent or conditional wrappers
3App Composition PatternsConsuming a design system in app layouts
4Advanced PatternsUnions, chains, dynamic rendering, expressions

Design System Patterns

Core patterns for building component libraries with enforced composition.

  • constrained-children — Restrict children to specific component types (Menu → MenuItem)
  • typed-slot-props — Enforce types on named slot props (header, footer, sidebar)
  • component-variants — Create specialized variants that satisfy a base render type

Read detailed examples: references/patterns/design-system.md

Wrapper Patterns

Patterns for components that wrap other content without breaking composition.

  • transparent-wrappers — Mark layout/styling wrappers with @transparent
  • conditional-rendering — Use @renders? and @renders* for optional/repeated content

Read detailed examples: references/patterns/wrappers.md

App Composition Patterns

Patterns for building app-level layouts that consume design system components.

  • page-layouts — Compose pages with typed header/content/footer slots
  • dashboard-composition — Build dashboards with constrained card/widget areas
  • navigation-structure — Typed sidebar/nav with enforced nav item types

Read detailed examples: references/patterns/app-composition.md

Advanced Patterns

Techniques for complex scenarios.

  • union-types — Accept multiple component types in a single slot
  • type-aliases — Define reusable type unions for @renders annotations
  • render-chains — Satisfy render types transitively through intermediate components
  • unchecked-escape-hatch — Use @renders! for dynamic rendering the plugin can't analyze
  • expression-analysis — Ternary, logical AND, and .map() in annotated returns

Read detailed examples: references/patterns/advanced.md

Choosing the Right Modifier

Can the slot be empty?
├── No → Must always render something
│ ├── Exactly one component → @renders {X}
│ └── One of several types → @renders {A | B}
└── Yes
├── Zero or one component → @renders? {X}
└── Zero or more instances → @renders* {X}
Can the plugin analyze the return?
├── Yes → use the modifier above
└── No (dynamic/registry) → add ! → @renders! {X}, @renders?! {X}, @renders*! {X}

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
104
Repository npm downloads, 7 days
536
7-day trend score
37

Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 22 Mar 2026, 7 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/horusgoul/eslint-plugin-react-render-types/react-render-types-composition/badge)](https://verified-skill.com/skills/horusgoul/eslint-plugin-react-render-types/react-render-types-composition)

Something wrong with this skill or its page? Tell us.