Skip to content
Back to skills

React Component

ASecurity

Use when writing or editing a React component. Covers preferred patterns for functional components, prop types, and styling.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 10, 2026
ai-agentsreactdocumentation

Security analysis

A100/100

Scanned November 21, 2026

npx -y skills add LandonSchropp/agent-toolkit --skill react-component --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of React Component?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for React Component
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/landonschropp-react-component/badge)](https://www.skillsdirectory.com/skills/landonschropp-react-component)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: react-component
description: Use when writing or editing a React component. Covers preferred patterns for functional components, prop types, and styling.
---

## Conventions

- Functional component declared with `export function ComponentName` (named export, not default, not arrow)
- Props typed above the component as `type ComponentNameProps = { ... }`
- Props whose purpose isn't evident from their name and type carry a JSDoc description, written with the `ls-code:comments-and-documentation` skill
- Destructure props in the function signature
- Use Tailwind classes for styling (no custom CSS classes)
- Use `clsx` only when combining dynamic classes

## Example

```tsx
import clsx from "clsx";

type UserAvatarProps = {
  /** The URL of the user's avatar image. */
  imageUrl: string;

  /** The user's full name, used as the alt text. */
  name: string;

  /** The size of the avatar. */
  size?: "small" | "medium" | "large";
};

export function UserAvatar({ imageUrl, name, size = "medium" }: UserAvatarProps) {
  return (
    <img
      src={imageUrl}
      alt={name}
      className={clsx(
        "rounded-full",
        size === "small" && "h-8 w-8",
        size === "medium" && "h-12 w-12",
        size === "large" && "h-16 w-16",
      )}
    />
  );
}
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.