web-frontend
БесплатноБез исполняемых скриптовНе проверенGuidelines for building minimal, professional, and concise frontend components in the /web project using TypeScript, React Router v7, Tailwind CSS, and the…
Об этом скилле
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:
- Props Definition: Use
PropsWithChildrenwhen accepting children, combine withVariantProps<typeof twBase>from CVA - CVA Styling: Define variants using
cva()for reusable, type-safe class composition - Display Name: Always set
Component.displayNamefor debugging - 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-widthclass 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 texttext-gray-dim: Secondary/muted texttext-gray-12/text-gray-4: Prose (dark/light mode)
Page Structure Pattern
Reference pages follow this structure:
- Header with gradient and title
- Anchors navigation (if multiple sections)
- PageContent wrapper
- PageContentSection for each major section
- 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 pagesapi.*: 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",
Установить 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), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic