Skip to content
Back to skills

Required Cn Helper

ASecurity

Sub-skill of elite-frontend-ux: Required: cn() Helper (+3).

  • 17 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
developmenttypescriptgofrontend

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add vamseeachanta/workspace-hub --skill required-cn-helper --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Required Cn Helper?

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

Security grade badge for Required Cn Helper
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vamseeachanta-required-cn-helper/badge)](https://www.skillsdirectory.com/skills/vamseeachanta-required-cn-helper)

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: elite-frontend-ux-required-cn-helper
description: 'Sub-skill of elite-frontend-ux: Required: cn() Helper (+3).'
version: 1.0.0
category: development
type: reference
scripts_exempt: true
---

# Required: cn() Helper (+3)

## Required: cn() Helper

```typescript
import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";

export function cn(...inputs: ClassValue[]) {
  return twMerge(clsx(inputs));
}
```


## NEVER Use Dynamic Class Names

```typescript
// ❌ BROKEN — Tailwind purges these
<div className={`bg-${color}-500`} />

// ✅ CORRECT — object map
const colorMap = { blue: "bg-blue-500", red: "bg-red-500" };
<div className={colorMap[color]} />
```


## Component Variants (CVA)

```typescript
import { cva, type VariantProps } from "class-variance-authority";

const buttonVariants = cva(
  "inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50",
  {
    variants: {
      variant: {
        default: "bg-primary text-primary-foreground hover:bg-primary/90",
        destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
        outline: "border border-input bg-background hover:bg-accent",
        ghost: "hover:bg-accent hover:text-accent-foreground",
      },
      size: {
        sm: "h-9 px-3 text-sm",
        default: "h-10 px-4 py-2",
        lg: "h-11 px-8 text-base",
      },
    },
    defaultVariants: { variant: "default", size: "default" },
  }
);
```


## Mobile-First Responsive

```html
<div class="
  flex flex-col md:flex-row
  gap-4 md:gap-8
  p-4 md:p-6 lg:p-8
">
```

Breakpoints: `sm`=640px · `md`=768px · `lg`=1024px · `xl`=1280px · `2xl`=1536px

---

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.

Comments

Loading comments…

Newsletter

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