component-architecture
БесплатноБез исполняемых скриптовНе проверенReusable component patterns for cards, sections, forms, and layouts with consistent prop interfaces and composition strategies. Use when creating new…
от BlackBeltTechnology★ 357 звёзд на GitHubОб этом скилле
Component Architecture
Folder Structure
components/
├── ui/ # shadcn/ui base components
│ ├── button.tsx
│ ├── card.tsx
│ └── ...
├── layout/ # Page structure components
│ ├── Header.tsx
│ ├── Footer.tsx
│ ├── MobileNav.tsx
│ └── LanguageSwitcher.tsx
├── sections/ # Home page sections
│ ├── Hero.tsx
│ ├── TrustRow.tsx
│ ├── ServicesPreview.tsx
│ ├── AboutPreview.tsx
│ └── LeadCapture.tsx
├── cards/ # Reusable card components
│ ├── ServiceCard.tsx
│ ├── ProgrammeCard.tsx
│ ├── TestimonialCard.tsx
│ └── PricingCard.tsx
├── forms/ # Form components
│ ├── ContactForm.tsx
│ ├── BookingForm.tsx
│ └── LeadCaptureForm.tsx
├── shared/ # Utility components
│ ├── Container.tsx
│ ├── SectionHeader.tsx
│ ├── CTAButton.tsx
│ └── Breadcrumbs.tsx
└── seo/ # SEO components
├── JsonLd.tsx
└── OrganizationJsonLd.tsx
Component Template
// components/cards/ServiceCard.tsx
import Link from 'next/link';
import { ArrowRight } from 'lucide-react';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { Badge } from '@/components/ui/badge';
import type { Service } from '@/types';
interface ServiceCardProps {
service: Service;
locale: string;
}
export function ServiceCard({ service, locale }: ServiceCardProps) {
return (
<Card className="group hover:shadow-lg transition-shadow">
<CardHeader>
<div className="flex items-start justify-between">
<CardTitle className="text-xl">{service.name}</CardTitle>
<Badge variant="secondary">{service.duration}</Badge>
</div>
</CardHeader>
<CardContent className="space-y-4">
<p className="text-muted-foreground">{service.shortDesc}</p>
<div className="flex flex-wrap gap-2">
{service.tags.map((tag) => (
<Badge key={tag} variant="outline" className="text-xs">
{tag}
</Badge>
))}
</div>
<div className="flex items-center justify-between pt-4 border-t">
<span className="font-semibold">From €{service.priceFrom}</span>
<Link
href={`/${locale}/services/${service.slug}`}
className="flex items-center gap-1 text-primary hover:underline"
>
Learn more
<ArrowRight className="w-4 h-4 group-hover:translate-x-1 transition-transform" />
</Link>
</div>
</CardContent>
</Card>
);
}
Section Component Pattern
// components/sections/ServicesPreview.tsx
import { getTranslations } from 'next-intl/server';
import { getServices } from '@/lib/data';
import { Container } from '@/components/shared/Container';
import { SectionHeader } from '@/components/shared/SectionHeader';
import { ServiceCard } from '@/components/cards/ServiceCard';
import { CTAButton } from '@/components/shared/CTAButton';
import type { Locale } from '@/i18n.config';
interface ServicesPreviewProps {
locale: Locale;
}
export async function ServicesPreview({ locale }: ServicesPreviewProps) {
const t = await getTranslations({ locale, namespace: 'home.services' });
const services = await getServices(locale);
const featured = services.slice(0, 4);
return (
<section className="py-16 md:py-24">
<Container>
<SectionHeader
title={t('title')}
subtitle={t('subtitle')}
centered
/>
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-4 mt-12">
{featured.map((service) => (
<ServiceCard
key={service.slug}
service={service}
locale={locale}
/>
))}
</div>
<div className="flex justify-center mt-12">
<CTAButton href={`/${locale}/services`} variant="outline">
{t('viewAll')}
</CTAButton>
</div>
</Container>
</section>
);
}
Shared Components
// components/shared/Container.tsx
import { cn } from '@/lib/utils';
interface ContainerProps {
children: React.ReactNode;
className?: string;
size?: 'default' | 'narrow' | 'wide';
}
export function Container({
children,
className,
size = 'default',
}: ContainerProps) {
return (
<div
className={cn(
'mx-auto px-4 md:px-6',
{
'max-w-7xl': size === 'default',
'max-w-4xl': size === 'narrow',
'max-w-screen-2xl': size === 'wide',
},
className
)}
>
{children}
</div>
);
}
// components/shared/SectionHeader.tsx
import { cn } from '@/lib/utils';
interface SectionHeaderProps {
title: string;
subtitle?: string;
centered?: boolean;
className?: string;
}
export function SectionHeader({
title,
subtitle,
centered = false,
className,
}: SectionHeaderProps)
Установить component-architecture в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл component-architecture?
Reusable component patterns for cards, sections, forms, and layouts with consistent prop interfaces and composition strategies. Use when creating new components, refactoring existing ones, or establishing component design patterns.
Как установить скилл component-architecture?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл component-architecture запускает скрипты?
Нет, скилл состоит только из инструкций (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