Skip to content
Back to skills

New Component

ASecurity

Use when creating a new React component — scaffolds with ZAO OS conventions (use client, dark theme, mobile-first, Tailwind v4)

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 23, 2026
developmenttypescriptreact

Works with

  • cli

Security analysis

A100/100

Scanned November 23, 2026

npx -y skills add bettercallzaal/ZAOOS --skill new-component --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of New Component?

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

Security grade badge for New Component
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bettercallzaal-new-component/badge)](https://www.skillsdirectory.com/skills/bettercallzaal-new-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: new-component
description: Use when creating a new React component — scaffolds with ZAO OS conventions (use client, dark theme, mobile-first, Tailwind v4)
disable-model-invocation: true
argument-hint: "[feature/ComponentName] e.g. music/TrackCard"
---

# New Component — Scaffold a ZAO OS Component

Creates a new component following all conventions from `.claude/rules/components.md`.

## Usage

```
/new-component music/TrackCard
```

Creates `src/components/music/TrackCard.tsx`.

## Scaffold Template

```tsx
"use client";

import { useState } from "react";
// Use @/ alias for ALL project imports, e.g.:
// import { someUtil } from "@/lib/utils";
// import { SomeComponent } from "@/components/shared/SomeComponent";

interface TrackCardProps {
  /** Define props here */
  title: string;
}

export default function TrackCard({ title }: TrackCardProps) {
  return (
    <div className="bg-[#0a1628] text-white rounded-lg p-3 sm:p-4 md:p-6">
      <h2 className="text-sm sm:text-base md:text-lg font-semibold text-[#f5a623]">
        {title}
      </h2>
    </div>
  );
}
```

## Rules (ALL are mandatory — every generated component MUST satisfy each one)

1. **`"use client"` directive** — ALWAYS include `"use client";` as the very first line. Every scaffolded component is interactive.
2. **Dark theme colors in markup** — The root element MUST use `bg-[#0a1628]`. Use `text-[#f5a623]` for primary accent elements (headings, icons, active states). Do NOT omit these hex values or substitute other colors.
3. **`@/` import alias** — ALL project imports MUST use the `@/` path alias (e.g., `@/lib/`, `@/components/`, `@/hooks/`). NEVER use relative paths like `../../`. Only external packages (react, next) use bare specifiers.
4. **TypeScript props interface** — ALWAYS define an `interface [ComponentName]Props` with at least one typed prop. Destructure props in the function signature.
5. **Responsive prefixes in className** — ALWAYS include at least one Tailwind responsive prefix (`sm:`, `md:`, or `lg:`) on an actual element's className. Do NOT rely on comments alone — the responsive class must appear in rendered markup (e.g., `p-3 sm:p-4 md:p-6`).

### Additional conventions

- Use `next/dynamic` with `{ ssr: false }` for heavy components
- Use Tailwind CSS v4 classes — no inline styles or CSS modules
- PascalCase file names matching the component name
- Ask the user what the component should do before writing

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 development →

Comments

Loading comments…

Newsletter

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