Crawler Summary

react-composition-patterns answer-first brief

Guides coding agents to write React components using composition patterns (children, compound components, render props, slots) instead of monolithic, prop-heavy components. Apply when writing, reviewing, or refactoring React components. --- name: react-composition-patterns description: > Guides coding agents to write React components using composition patterns (children, compound components, render props, slots) instead of monolithic, prop-heavy components. Apply when writing, reviewing, or refactoring React components. license: MIT metadata: author: shutallbridge version: "1.0.0" --- React Composition Patterns Core Philosophy **Composition over con Capability contract not published. No trust telemetry is available yet. Last updated 4/15/2026.

Freshness

Last checked 4/15/2026

Best For

react-composition-patterns is best for change, render, use workflows where OpenClaw compatibility matters.

Not Ideal For

Contract metadata is missing or unavailable for deterministic execution.

Evidence Sources Checked

editorial-content, GITHUB OPENCLEW, runtime-metrics, public facts pack

Claim this agent
Agent DossierGitHubSafety: 94/100

react-composition-patterns

Guides coding agents to write React components using composition patterns (children, compound components, render props, slots) instead of monolithic, prop-heavy components. Apply when writing, reviewing, or refactoring React components. --- name: react-composition-patterns description: > Guides coding agents to write React components using composition patterns (children, compound components, render props, slots) instead of monolithic, prop-heavy components. Apply when writing, reviewing, or refactoring React components. license: MIT metadata: author: shutallbridge version: "1.0.0" --- React Composition Patterns Core Philosophy **Composition over con

OpenClawself-declared

Public facts

4

Change events

1

Artifacts

0

Freshness

Apr 15, 2026

Verifiededitorial-contentNo verified compatibility signals

Capability contract not published. No trust telemetry is available yet. Last updated 4/15/2026.

Trust evidence available

Trust score

Unknown

Compatibility

OpenClaw

Freshness

Apr 15, 2026

Vendor

Shutallbridge

Artifacts

0

Benchmarks

0

Last release

Unpublished

Executive Summary

Key links, install path, and a quick operational read before the deeper crawl record.

Verifiededitorial-content

Summary

Capability contract not published. No trust telemetry is available yet. Last updated 4/15/2026.

Setup snapshot

git clone https://github.com/shutallbridge/react-composition-skill.git
  1. 1

    Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.

  2. 2

    Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Evidence Ledger

Everything public we have scraped or crawled about this agent, grouped by evidence type with provenance.

Verifiededitorial-content
Vendor (1)

Vendor

Shutallbridge

profilemedium
Observed Apr 15, 2026Source linkProvenance
Compatibility (1)

Protocol compatibility

OpenClaw

contractmedium
Observed Apr 15, 2026Source linkProvenance
Security (1)

Handshake status

UNKNOWN

trustmedium
Observed unknownSource linkProvenance
Integration (1)

Crawlable docs

6 indexed pages on the official domain

search_documentmedium
Observed Apr 15, 2026Source linkProvenance

Release & Crawl Timeline

Merged public release, docs, artifact, benchmark, pricing, and trust refresh events.

Self-declaredagent-index

Artifacts Archive

Extracted files, examples, snippets, parameters, dependencies, permissions, and artifact metadata.

Self-declaredGITHUB OPENCLEW

Extracted files

0

Examples

6

Snippets

0

Languages

typescript

Parameters

Executable Examples

tsx

function Card({ children }: { children: React.ReactNode }) {
  return <div className="rounded-lg border p-6 shadow-sm">{children}</div>;
}

// Consumer composes freely
<Card>
  <h2>Title</h2>
  <p>Any content the consumer wants.</p>
</Card>

tsx

<Select onValueChange={setColor}>
  <Select.Trigger>
    <Select.Value placeholder="Pick a color" />
  </Select.Trigger>
  <Select.Content>
    <Select.Item value="red">Red</Select.Item>
    <Select.Item value="blue">Blue</Select.Item>
  </Select.Content>
</Select>

tsx

<Combobox options={users} filterFn={fuzzyMatch}>
  {({ inputProps, results, highlighted }) => (
    <div>
      <input {...inputProps} />
      <ul>
        {results.map((user, i) => (
          <li key={user.id} data-active={i === highlighted}>
            {user.name}
          </li>
        ))}
      </ul>
    </div>
  )}
</Combobox>

tsx

interface PageLayoutProps {
  header: React.ReactNode;
  sidebar: React.ReactNode;
  children: React.ReactNode;
  footer?: React.ReactNode;
}

function PageLayout({ header, sidebar, children, footer }: PageLayoutProps) {
  return (
    <div className="grid grid-cols-[250px_1fr] grid-rows-[auto_1fr_auto]">
      <header className="col-span-2">{header}</header>
      <aside>{sidebar}</aside>
      <main>{children}</main>
      {footer && <footer className="col-span-2">{footer}</footer>}
    </div>
  );
}

tsx

import { Slot } from "@radix-ui/react-slot";

interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
  asChild?: boolean;
}

function Button({ asChild, ...props }: ButtonProps) {
  const Comp = asChild ? Slot : "button";
  return <Comp {...props} />;
}

// Renders as a link with Button's props merged
<Button asChild>
  <a href="/home">Home</a>
</Button>

tsx

<Switch.Root render={<label />}>
  <Switch.Thumb />
</Switch.Root>

Docs & README

Full documentation captured from public sources, including the complete README when available.

Self-declaredGITHUB OPENCLEW

Docs source

GITHUB OPENCLEW

Editorial quality

ready

Guides coding agents to write React components using composition patterns (children, compound components, render props, slots) instead of monolithic, prop-heavy components. Apply when writing, reviewing, or refactoring React components. --- name: react-composition-patterns description: > Guides coding agents to write React components using composition patterns (children, compound components, render props, slots) instead of monolithic, prop-heavy components. Apply when writing, reviewing, or refactoring React components. license: MIT metadata: author: shutallbridge version: "1.0.0" --- React Composition Patterns Core Philosophy **Composition over con

Full README

name: react-composition-patterns description: > Guides coding agents to write React components using composition patterns (children, compound components, render props, slots) instead of monolithic, prop-heavy components. Apply when writing, reviewing, or refactoring React components. license: MIT metadata: author: shutallbridge version: "1.0.0"

React Composition Patterns

Core Philosophy

Composition over configuration. Instead of adding props to control every rendering variation, break components into smaller pieces that consumers assemble. This produces components that are easier to understand, test, and extend without modifying the original source.

Inversion of control. Let consumers decide what renders. The component provides behavior, structure, and state — the consumer provides content. A <Dialog> shouldn't accept title, body, footer strings. It should accept children that the consumer composes.

Stable Dependency Principle. Encapsulate what changes (rendering decisions, content) and expose what's stable (behavior, state management, accessibility). When a component's public API is stable, consumers can change their rendering without modifying the component itself.

Prefer many small components over one big configurable one. A component with 15 props is harder to use than 5 components with 3 props each. Small components compose; large components configure. If you catch yourself adding a boolean prop to toggle between two rendering modes, split into two components instead.

Pattern Overviews

Children Composition

The simplest composition pattern. A component accepts children and wraps them with layout, styling, or behavior — without knowing or caring what the children are.

function Card({ children }: { children: React.ReactNode }) {
  return <div className="rounded-lg border p-6 shadow-sm">{children}</div>;
}

// Consumer composes freely
<Card>
  <h2>Title</h2>
  <p>Any content the consumer wants.</p>
</Card>

Use when building layout wrappers, containers, or any component whose job is to wrap rather than render content.

For detailed examples and common mistakes, see rules/children-composition.md.

Compound Components

A set of related components that share implicit state via createContext/useContext. The parent manages state; children consume it. This keeps the API declarative while allowing flexible composition.

<Select onValueChange={setColor}>
  <Select.Trigger>
    <Select.Value placeholder="Pick a color" />
  </Select.Trigger>
  <Select.Content>
    <Select.Item value="red">Red</Select.Item>
    <Select.Item value="blue">Blue</Select.Item>
  </Select.Content>
</Select>

Important: Always use Context for shared state between compound component parts. Never use React.Children.map, React.cloneElement, or child type inspection — these approaches are not type-safe, break when children are wrapped in other components, and fail with fragments.

Use when building components with multiple sub-parts that share state (Tabs, Accordion, Select, Menu, Dialog).

For detailed examples and common mistakes, see rules/compound-components.md.

Render Props

A function prop that gives the consumer access to internal state or data while letting them control what renders. Useful when the component manages logic (fetching, measuring, tracking) and the consumer decides presentation.

<Combobox options={users} filterFn={fuzzyMatch}>
  {({ inputProps, results, highlighted }) => (
    <div>
      <input {...inputProps} />
      <ul>
        {results.map((user, i) => (
          <li key={user.id} data-active={i === highlighted}>
            {user.name}
          </li>
        ))}
      </ul>
    </div>
  )}
</Combobox>

Use when the consumer needs full rendering control over data or state your component manages. Often combined with custom hooks — if there's no JSX to wrap, a hook is simpler.

For detailed examples and common mistakes, see rules/render-props.md.

Slots Pattern

Named content areas via typed props. Instead of inspecting children by type, accept explicit props like header, footer, sidebar, icon. Fully type-safe, no React.Children dependency.

interface PageLayoutProps {
  header: React.ReactNode;
  sidebar: React.ReactNode;
  children: React.ReactNode;
  footer?: React.ReactNode;
}

function PageLayout({ header, sidebar, children, footer }: PageLayoutProps) {
  return (
    <div className="grid grid-cols-[250px_1fr] grid-rows-[auto_1fr_auto]">
      <header className="col-span-2">{header}</header>
      <aside>{sidebar}</aside>
      <main>{children}</main>
      {footer && <footer className="col-span-2">{footer}</footer>}
    </div>
  );
}

Use when a component has multiple named content areas with a fixed layout structure. Use children for the primary content area and named props for secondary areas.

For detailed examples and common mistakes, see rules/slots-pattern.md.

Polymorphic Components

A component that can render as different HTML elements or other components. Don't roll your own as prop with complex generics — use an established library approach instead.

Radix UI approach (asChild + <Slot>):

import { Slot } from "@radix-ui/react-slot";

interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
  asChild?: boolean;
}

function Button({ asChild, ...props }: ButtonProps) {
  const Comp = asChild ? Slot : "button";
  return <Comp {...props} />;
}

// Renders as a link with Button's props merged
<Button asChild>
  <a href="/home">Home</a>
</Button>

Base UI approach (render prop):

<Switch.Root render={<label />}>
  <Switch.Thumb />
</Switch.Root>

Both approaches are well-supported since shadcn/ui works with both Radix and Base UI as of 2026. Pick whichever matches your project's existing primitive library.

For detailed examples and common mistakes, see rules/polymorphic-components.md.

Custom Hooks

Extract reusable logic (state, effects, subscriptions, calculations) into hooks when multiple components need the same behavior. Hooks compose logic without affecting the component tree.

function useMediaQuery(query: string): boolean {
  const [matches, setMatches] = useState(false);

  useEffect(() => {
    const mql = window.matchMedia(query);
    setMatches(mql.matches);
    const handler = (e: MediaQueryListEvent) => setMatches(e.matches);
    mql.addEventListener("change", handler);
    return () => mql.removeEventListener("change", handler);
  }, [query]);

  return matches;
}

// Any component can use it
function Sidebar() {
  const isDesktop = useMediaQuery("(min-width: 768px)");
  return isDesktop ? <DesktopSidebar /> : <MobileSidebar />;
}

Use when you need to share logic (not JSX) between components. If a render prop component has no meaningful wrapper JSX, it should probably be a hook instead.

For detailed examples and common mistakes, see rules/custom-hooks.md.

Decision Guide

Use this to pick the right pattern for your situation:

| Situation | Pattern | |---|---| | Flexible layout wrapper (Card, Section, Container) | Children | | Multiple sub-parts sharing state (Tabs, Select, Accordion) | Compound components (Context) | | Consumer needs rendering control with provided data | Render props | | Multiple named content areas with fixed layout | Slots (typed props) | | Component must render as different elements/components | Polymorphic (use a library) | | Reusable logic, no JSX output | Custom hooks |

Never do this:

  • Add boolean/config props to toggle between rendering modes (showIcon, variant="card" | "list", mode="compact")
  • Use React.Children.map or React.cloneElement for shared state — use Context instead
  • Build your own as prop with complex TypeScript generics — use Radix Slot or Base UI render
  • Accept a config array/object when composition would be clearer (items={[{label, icon, onClick}]})

Anti-Pattern Red Flags

Watch for these signals that a component needs refactoring toward composition:

  • >5 rendering-related props — the component is trying to be everything to everyone
  • Conditional rendering via variant/type/mode props — these are separate components pretending to be one
  • Copy-pasting a component for a slight variation — extract the shared parts and compose
  • Deeply nested ternaries in JSX — the rendering logic is too complex for a single component
  • Wrapper that just passes props through — eliminate the wrapper or use composition
  • React.Children.map, React.cloneElement, or typeof child.type checks — use Context for shared state, typed props for slots
  • Config arrays for renderable itemsitems={[{label, icon}]} should be <Item icon={X}>Label</Item>

For detailed examples and refactoring walkthroughs, see rules/anti-patterns.md.

Contract & API

Machine endpoints, protocol fit, contract coverage, invocation examples, and guardrails for agent-to-agent use.

MissingGITHUB OPENCLEW

Contract coverage

Status

missing

Auth

None

Streaming

No

Data region

Unspecified

Protocol support

OpenClaw: self-declared

Requires: none

Forbidden: none

Guardrails

Operational confidence: low

No positive guardrails captured.
Invocation examples
curl -s "https://xpersona.co/api/v1/agents/shutallbridge-react-composition-skill/snapshot"
curl -s "https://xpersona.co/api/v1/agents/shutallbridge-react-composition-skill/contract"
curl -s "https://xpersona.co/api/v1/agents/shutallbridge-react-composition-skill/trust"

Reliability & Benchmarks

Trust and runtime signals, benchmark suites, failure patterns, and practical risk constraints.

Missingruntime-metrics

Trust signals

Handshake

UNKNOWN

Confidence

unknown

Attempts 30d

unknown

Fallback rate

unknown

Runtime metrics

Observed P50

unknown

Observed P95

unknown

Rate limit

unknown

Estimated cost

unknown

Do not use if

Contract metadata is missing or unavailable for deterministic execution.
No benchmark suites or observed failure patterns are available.

Media & Demo

Every public screenshot, visual asset, demo link, and owner-provided destination tied to this agent.

Missingno-media
No screenshots, media assets, or demo links are available.

Related Agents

Neighboring agents from the same protocol and source ecosystem for comparison and shortlist building.

Self-declaredprotocol-neighbors
GITHUB_REPOSactivepieces

Rank

70

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

Traction

No public download signal

Freshness

Updated 2d ago

OPENCLAW
GITHUB_REPOScherry-studio

Rank

70

AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs

Traction

No public download signal

Freshness

Updated 5d ago

MCPOPENCLAW
GITHUB_REPOSAionUi

Rank

70

Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!

Traction

No public download signal

Freshness

Updated 6d ago

MCPOPENCLAW
GITHUB_REPOSCopilotKit

Rank

70

The Frontend for Agents & Generative UI. React + Angular

Traction

No public download signal

Freshness

Updated 23d ago

OPENCLAW
Machine Appendix

Contract JSON

{
  "contractStatus": "missing",
  "authModes": [],
  "requires": [],
  "forbidden": [],
  "supportsMcp": false,
  "supportsA2a": false,
  "supportsStreaming": false,
  "inputSchemaRef": null,
  "outputSchemaRef": null,
  "dataRegion": null,
  "contractUpdatedAt": null,
  "sourceUpdatedAt": null,
  "freshnessSeconds": null
}

Invocation Guide

{
  "preferredApi": {
    "snapshotUrl": "https://xpersona.co/api/v1/agents/shutallbridge-react-composition-skill/snapshot",
    "contractUrl": "https://xpersona.co/api/v1/agents/shutallbridge-react-composition-skill/contract",
    "trustUrl": "https://xpersona.co/api/v1/agents/shutallbridge-react-composition-skill/trust"
  },
  "curlExamples": [
    "curl -s \"https://xpersona.co/api/v1/agents/shutallbridge-react-composition-skill/snapshot\"",
    "curl -s \"https://xpersona.co/api/v1/agents/shutallbridge-react-composition-skill/contract\"",
    "curl -s \"https://xpersona.co/api/v1/agents/shutallbridge-react-composition-skill/trust\""
  ],
  "jsonRequestTemplate": {
    "query": "summarize this repo",
    "constraints": {
      "maxLatencyMs": 2000,
      "protocolPreference": [
        "OPENCLEW"
      ]
    }
  },
  "jsonResponseTemplate": {
    "ok": true,
    "result": {
      "summary": "...",
      "confidence": 0.9
    },
    "meta": {
      "source": "GITHUB_OPENCLEW",
      "generatedAt": "2026-04-16T23:27:48.821Z"
    }
  },
  "retryPolicy": {
    "maxAttempts": 3,
    "backoffMs": [
      500,
      1500,
      3500
    ],
    "retryableConditions": [
      "HTTP_429",
      "HTTP_503",
      "NETWORK_TIMEOUT"
    ]
  }
}

Trust JSON

{
  "status": "unavailable",
  "handshakeStatus": "UNKNOWN",
  "verificationFreshnessHours": null,
  "reputationScore": null,
  "p95LatencyMs": null,
  "successRate30d": null,
  "fallbackRate": null,
  "attempts30d": null,
  "trustUpdatedAt": null,
  "trustConfidence": "unknown",
  "sourceUpdatedAt": null,
  "freshnessSeconds": null
}

Capability Matrix

{
  "rows": [
    {
      "key": "OPENCLEW",
      "type": "protocol",
      "support": "unknown",
      "confidenceSource": "profile",
      "notes": "Listed on profile"
    },
    {
      "key": "change",
      "type": "capability",
      "support": "supported",
      "confidenceSource": "profile",
      "notes": "Declared in agent profile metadata"
    },
    {
      "key": "render",
      "type": "capability",
      "support": "supported",
      "confidenceSource": "profile",
      "notes": "Declared in agent profile metadata"
    },
    {
      "key": "use",
      "type": "capability",
      "support": "supported",
      "confidenceSource": "profile",
      "notes": "Declared in agent profile metadata"
    }
  ],
  "flattenedTokens": "protocol:OPENCLEW|unknown|profile capability:change|supported|profile capability:render|supported|profile capability:use|supported|profile"
}

Facts JSON

[
  {
    "factKey": "docs_crawl",
    "category": "integration",
    "label": "Crawlable docs",
    "value": "6 indexed pages on the official domain",
    "href": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
    "sourceUrl": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
    "sourceType": "search_document",
    "confidence": "medium",
    "observedAt": "2026-04-15T05:03:46.393Z",
    "isPublic": true
  },
  {
    "factKey": "vendor",
    "category": "vendor",
    "label": "Vendor",
    "value": "Shutallbridge",
    "href": "https://github.com/shutallbridge/react-composition-skill",
    "sourceUrl": "https://github.com/shutallbridge/react-composition-skill",
    "sourceType": "profile",
    "confidence": "medium",
    "observedAt": "2026-04-15T01:16:05.505Z",
    "isPublic": true
  },
  {
    "factKey": "protocols",
    "category": "compatibility",
    "label": "Protocol compatibility",
    "value": "OpenClaw",
    "href": "https://xpersona.co/api/v1/agents/shutallbridge-react-composition-skill/contract",
    "sourceUrl": "https://xpersona.co/api/v1/agents/shutallbridge-react-composition-skill/contract",
    "sourceType": "contract",
    "confidence": "medium",
    "observedAt": "2026-04-15T01:16:05.505Z",
    "isPublic": true
  },
  {
    "factKey": "handshake_status",
    "category": "security",
    "label": "Handshake status",
    "value": "UNKNOWN",
    "href": "https://xpersona.co/api/v1/agents/shutallbridge-react-composition-skill/trust",
    "sourceUrl": "https://xpersona.co/api/v1/agents/shutallbridge-react-composition-skill/trust",
    "sourceType": "trust",
    "confidence": "medium",
    "observedAt": null,
    "isPublic": true
  }
]

Change Events JSON

[
  {
    "eventType": "docs_update",
    "title": "Docs refreshed: Sign in to GitHub · GitHub",
    "description": "Fresh crawlable documentation was indexed for the official domain.",
    "href": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
    "sourceUrl": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
    "sourceType": "search_document",
    "confidence": "medium",
    "observedAt": "2026-04-15T05:03:46.393Z",
    "isPublic": true
  }
]

Sponsored

Ads related to react-composition-patterns and adjacent AI workflows.