xiaohongshu
xiaohongshu
generate-card
Generate dashboard card component with shadcn Card structure, TypeScript props, and optional sub-components. Use when creating new dashboard widgets or stat cards.
Full skill instructions
Generate a dashboard card component following Health Tracker 9000 patterns.
When user requests to create a card component, ask for:
Based on src/components/dashboard/HealthScoreCard.tsx pattern.
Create file: src/components/dashboard/{CardName}.tsx
'use client';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { Progress } from '@/components/ui/progress';
import { cn } from '@/lib/utils';
import { Activity } from 'lucide-react';
interface CardNameProps {
score: number;
data: {
field1: number;
field2: number;
};
}
export function CardName({ score, data }: CardNameProps) {
const getScoreColor = (value: number) => {
if (value >= 80) return 'text-green-500';
if (value >= 60) return 'text-yellow-500';
return 'text-red-500';
};
const getProgressColor = (value: number) => {
if (value >= 80) return 'bg-green-500';
if (value >= 60) return 'bg-yellow-500';
return 'bg-red-500';
};
return (
<Card className="overflow-hidden">
<CardHeader className="flex flex-row items-center justify-between pb-2 space-y-0">
<CardTitle className="text-sm font-medium">Card Title</CardTitle>
<Activity className="h-4 w-4 text-muted-foreground" />
</CardHeader>
<CardContent>
<div className="flex flex-col items-center justify-center py-4">
<div className={cn('text-5xl font-bold mb-2', getScoreColor(score))}>
{score}
</div>
<p className="text-xs text-muted-foreground">Subtitle</p>
</div>
<div className="space-y-3 mt-4">
<ItemComponent
label="Item 1"
value={data.field1}
description="Description of what this measures"
/>
<ItemComponent
label="Item 2"
value={data.field2}
description="Description of what this measures"
/>
</div>
</CardContent>
</Card>
);
}
interface ItemComponentProps {
label: string;
value: number;
description: string;
}
function ItemComponent({ label, value, description }: ItemComponentProps) {
return (
<div className="space-y-1">
<div className="flex items-center justify-between text-xs">
<div className="flex items-center gap-1 text-muted-foreground">
{label}
</div>
<span className="font-medium">{value}%</span>
</div>
<Progress value={value} className="h-1" />
</div>
);
}
For cards with charts, add Recharts:
'use client';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from 'recharts';
import { TrendingUp } from 'lucide-react';
interface ChartCardProps {
data: Array<{ label: string; value: number }>;
title: string;
}
export function ChartCard({ data, title }: ChartCardProps) {
return (
<Card>
<CardHeader className="flex flex-row items-center justify-between pb-2 space-y-0">
<CardTitle className="text-sm font-medium">{title}</CardTitle>
<TrendingUp className="h-4 w-4 text-muted-foreground" />
</CardHeader>
<CardContent>
<ResponsiveContainer width="100%" height={300}>
<BarChart data={data}>
<CartesianGrid strokeDasharray="3 3" />
<XAxis dataKey="label" />
<YAxis />
<Tooltip />
<Bar dataKey="value" fill="#3b82f6" />
</BarChart>
</ResponsiveContainer>
</CardContent>
</Card>
);
}
'use client' directive at top@/components/ui/card{ComponentName}PropsReact.memo() wrapper for performance optimizationsrc/components/dashboard/{CardName}.tsxxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience