用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/kwkraus/my-dashboard --skill add-dashboard-card命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | add-dashboard-card |
| description | Add a new metric card to the dashboard with proper styling and components |
When adding a new dashboard metric card to this Next.js 15 dashboard application:
Choose the appropriate card component based on the metric type:
DashboardCard for basic metrics with custom contentDashboardStatCard for statistics with trend indicators (percentage changes)DashboardChartCard for metrics that include embedded chartsImport the required components:
import { DashboardCard, DashboardStatCard } from "@/components/DashboardCards";
import { IconName } from "lucide-react"; // For stat cards
Add the card data to the appropriate data array:
DashboardCharts.tsx, add to the stats array:
{
title: "Metric Name",
value: "Value with units",
change: "+X.X%",
changeType: "positive" | "negative",
icon: IconName,
}
Follow styling conventions:
hsl(var(--border)), hsl(var(--muted-foreground))cn() utility from @/lib/utils for conditional classesMaintain the grid layout:
grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-6Type safety:
as const for union types like changeType// In DashboardCharts.tsx, add to stats array:
{
title: "Monthly Revenue",
value: "$12,345",
change: "+15.3%",
changeType: "positive" as const,
icon: DollarSign,
}
<DashboardCard title="Custom Metric" value="142">
<MiniLineChart data={chartData} />
</DashboardCard>
src/components/DashboardCards.tsxsrc/components/DashboardCharts.tsxsrc/lib/charts.tsxadd-chartadd-shadcn-component