Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

web-frontend

БесплатноБез исполняемых скриптовНе проверен

Guidelines for building minimal, professional, and concise frontend components in the /web project using TypeScript, React Router v7, Tailwind CSS, and the…

flaming-codesот flaming-codes★ 18 звёзд на GitHub7 установок в других каталогах

Об этом скилле

Web Frontend Development Skill

This skill provides guidance for developing frontend components in the /web project for CRAN/E, a PWA that searches CRAN packages and authors.

Tech Stack

  • TypeScript for type safety
  • React Router v7 (Vite build) with Remix-style file-based routes
  • Tailwind CSS with Radix Colors for styling
  • CVA (Class Variance Authority) for component variants
  • Remix Icons (@remixicon/react) for icons
  • Supabase for data fetching via typed client

Design Principles

Minimal & Professional

The design follows a clean, minimal aesthetic with:

  • Gradient accents (iris, ruby, jade, bronze, sand, amethyst, opal)
  • Subtle hover effects with slow transitions (duration-700)
  • Rounded corners (rounded-full for pills, rounded-xl for cards)
  • Consistent spacing using Tailwind's gap utilities
  • Dark mode support via Radix Colors

Component Structure

All UI components follow these patterns:

  1. Props Definition: Use PropsWithChildren when accepting children, combine with VariantProps<typeof twBase> from CVA
  2. CVA Styling: Define variants using cva() for reusable, type-safe class composition
  3. Display Name: Always set Component.displayName for debugging
  4. Type Safety: Leverage TypeScript for props, Zod schemas for validation

Core Component Patterns

Layout Components

Header (app/modules/header.tsx):

  • Gradient backgrounds with variants
  • Headline + optional subline structure
  • Optional ornament slot for additional content

PageContent (app/modules/page-content.tsx):

  • Full-width wrapper with consistent padding
  • full-width class for spanning viewport width
  • Inner flex column with gap-16 for section spacing

PageContentSection (app/modules/page-content-section.tsx):

  • Headline, subline, and fragment ID for anchor navigation
  • Prose variant for long-form text styling
  • Gap-16 for consistent vertical rhythm

Interactive Components

InfoPill (app/modules/info-pill.tsx):

  • Rounded-full border with gradient hover effects
  • Optional label slot (left-aligned, gray-dim)
  • Size variants: xs, sm, md, lg
  • Gradient variants matching design system
  • Hover opacity transition on gradient overlay

InfoCard (app/modules/info-card.tsx):

  • Rounded-xl border with gradient hover effects
  • Min height for consistent card sizing
  • Icon indicators (external/internal) with wiggle animation on hover
  • Group hover states for coordinated animations

Tag (app/modules/tag.tsx):

  • Small, uppercase, rounded-full labels
  • Border gradients (iris, jade) for semantic meaning
  • Size variants: xs, sm

Utility Components

Separator (app/modules/separator.tsx):

  • Simple <hr> with opacity-20 for subtle dividers

Prose (app/modules/prose.tsx):

  • Typography component for long-form content
  • Supports dangerouslySetInnerHTML for rendered HTML
  • Text-xl, font-light, leading-normal baseline

Anchors & AnchorLink (app/modules/anchors.tsx):

  • Navigation for in-page sections
  • Fragment-based routing

Color System

Use Radix Colors with semantic variants:

  • iris: Primary/action color
  • ruby: Error/destructive actions
  • jade: Success/positive states
  • bronze: Neutral/informational
  • sand/gold: Warm highlights
  • amethyst: Secondary accent (plum + iris mix)
  • opal: Cool accent (iris + sky mix)

Text colors:

  • text-gray-normal: Body text
  • text-gray-dim: Secondary/muted text
  • text-gray-12/text-gray-4: Prose (dark/light mode)

Page Structure Pattern

Reference pages follow this structure:

  1. Header with gradient and title
  2. Anchors navigation (if multiple sections)
  3. PageContent wrapper
  4. PageContentSection for each major section
  5. Separator between sections

Example from _page.privacy._index.tsx:

<Header gradient="sand" headline="Privacy" subline="..." />
<Anchors anchorIds={...}>...</Anchors>
<PageContent>
  <PageContentSection headline="General" fragment="general">
    <p>...</p>
  </PageContentSection>
  <Separator />
  <PageContentSection headline="..." fragment="...">
    ...
  </PageContentSection>
</PageContent>

Route Patterns

  • _page.* files: Public pages with layout wrapper
  • _page.package.$packageName.tsx: Package detail pages
  • _page.author.$authorName.tsx: Author profile pages
  • _page.privacy._index.tsx: Static content pages
  • api.*: API endpoints (search, MCP)
  • *.og.*: Open Graph image generation

Data Loading

Use React Router's loader pattern:

export const loader: LoaderFunction = async ({ params }) => {
  const data = await Service.fetchData(params.id);
  if (!data) throw data(null, { status: 404 });
  return data(data);
};

Access via useLoaderData<LoaderData>().

Meta Tags

Use mergeMeta() helper for combining meta tags:

export const meta = mergeMeta(({ data }) => {
  const title = `${data.name} | CRAN/E`;
  return [
    { title },
    { name: "description",
Полный SKILL.md на GitHub

Установить web-frontend в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл web-frontend?

Guidelines for building minimal, professional, and concise frontend components in the /web project using TypeScript, React Router v7, Tailwind CSS, and the CVA pattern.

Как установить скилл web-frontend?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл web-frontend запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить web-frontend с