Manages compound component slots in Primer React. Enables flexible child extraction for complex UI patterns.

Install

mkdir -p .claude/skills/slots && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10045" && unzip -o skill.zip -d .claude/skills/slots && rm skill.zip

Installs to .claude/skills/slots

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Use when: building, modifying, or wrapping compound components that use child-component "slots" in Primer React. Covers when to add a `__SLOT__` marker, the `useSlots` hook, the `isSlot` helper, the `asSlot` wrapper helper, naming conventions for slot symbols, and common pitfalls.
281 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Advanced

Key capabilities

  • →Build compound components
  • →Extract named children
  • →Create reusable slots
  • →Wrap slot sub-components
  • →Branch on slot types

How it works

It uses a marker-based system to extract specific named children from a parent component's children.

Inputs & outputs

You give it
Children elements
You get back
Extracted slots

When to use slots

  • →Building compound components
  • →Extracting named children
  • →Creating reusable component slots

About slots

Provides utilities for creating and consuming child-component slots. It defines the patterns for adding markers, extracting slots with hooks, and wrapping sub-components.

Use when: building, modifying, or wrapping compound components that use child-component "slots" in Primer React. Covers when to add a `__SLOT__` marker, the `useSlots` hook, the `isSlot` helper, the `asSlot` wrapper helper, naming conventions for slot symbols, and common pitfalls.

When not to use it

  • →Rendering children as-is
  • →Inspecting grandchildren

Prerequisites

@primer/react

Limitations

  • →Single-match-per-key
  • →Not for per-child side-effect transforms

How it compares

It provides an SSR-compatible slot system rather than relying on refs or DOM inspection.

Compared to similar skills

slots side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
slots (this skill)05moNo flagsAdvanced
screenshot-to-code2045moNo flagsBeginner
web-artifacts-builder497moReviewIntermediate
radix-ui-design-system335moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

screenshot-to-code

OneWave-AI

Convert UI screenshots into working HTML/CSS/React/Vue code. Detects design patterns, components, and generates responsive layouts. Use this when users provide screenshots of websites, apps, or UI designs and want code implementation.

204389

web-artifacts-builder

anthropics

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

49162

radix-ui-design-system

sickn33

Build accessible design systems with Radix UI primitives. Headless component customization, theming strategies, and compound component patterns for production-grade UI libraries.

33130

figma-integration

duongdev

Guides design-to-code workflow using Figma integration. Helps extract designs, analyze components, and generate implementation specs. Auto-activates when users mention Figma URLs, design implementation, component conversion, or design-to-code workflows. Works with /ccpm:planning:design-ui, design-approve, design-refine, and /ccpm:utils:figma-refresh commands.

23129

3d-web-experience

davila7

Expert in building 3D experiences for the web - Three.js, React Three Fiber, Spline, WebGL, and interactive 3D scenes. Covers product configurators, 3D portfolios, immersive websites, and bringing depth to web experiences. Use when: 3D website, three.js, WebGL, react three fiber, 3D experience.

3570

tamagui

tamagui

Universal React UI framework for web and native. Use when building cross-platform apps with Tamagui, creating styled components with `styled()`, configuring design tokens/themes, using Tamagui UI components, or working with animations. Triggers: "tamagui", "styled()", "$token", "XStack/YStack", "useTheme", "@tamagui/*" imports, "createStyledContext", "variants".

2478

Search skills

Search the agent skills registry