agentleFS
param087param087/saas-ui-skills/skills/dashboard-layout/SKILL.md

dashboard-layout

Skill3 starsChanged 6 months agoMITView on GitHub

Use when building a dashboard or overview page — stat/KPI cards, chart placement, responsive grids, and a scannable hierarchy. Covers metric cards with deltas, where charts go, and loading/empty states for data.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use a React chart lib (Recharts, or shadcn's Chart wrapper) — give the container a fixed height (h-72) so it doesn't collapse.

    line 68
  2. Distinctive:

    Add a time-range selector that drives all widgets.

    line 77
  3. Distinctive:

    Keep it to what's actionable — a dashboard is not a data dump.

    line 78

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Dashboard Layout

Overview

A dashboard answers "how are things?" at a glance. Lead with a row of KPI cards, follow with charts and recent activity, and let the grid reflow responsively. Prioritize scannability: the most important number should be the largest, top-left, where eyes land first.

When to use

  • Building an app's home/overview page.
  • Showing KPIs, trends, and recent activity together.
  • A dashboard feels cluttered or has no clear hierarchy.

KPI cards with deltas

A metric is more useful with a trend. Show the value big, the change small and colored, and never rely on color alone — pair it with an arrow/sign:

function StatCard({ label, value, delta }: { label: string; value: string; delta: number }) {
  const up = delta >= 0;
  return (
    <Card>
      <CardHeader className="pb-2">
        <CardDescription>{label}</CardDescription>
        <CardTitle className="text-3xl tabular-nums">{value}</CardTitle>
      </CardHeader>
      <CardContent>
        <p className={cn("flex items-center gap-1 text-xs", up ? "text-emerald-600" : "text-destructive")}>
          {up ? <ArrowUp className="h-3 w-3" aria-hidden /> : <ArrowDown className="h-3 w-3" aria-hidden />}
          {Math.abs(delta)}% <span className="text-muted-foreground">vs last month</span>
        </p>
      </CardContent>
    </Card>
  );
}

Responsive grid

<div className="space-y-6">
  {/* KPI row: 1 → 2 → 4 columns */}
  <div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4">
    <StatCard label="MRR" value="$24,580" delta={12.5} />
    <StatCard label="Active users" value="1,429" delta={4.2} />
    <StatCard label="Churn" value="2.1%" delta={-0.4} />
    <StatCard label="Signups" value="312" delta={18.0} />
  </div>

  {/* Main chart + side panel */}
  <div className="grid grid-cols-1 gap-4 lg:grid-cols-3">
    <Card className="lg:col-span-2"><CardHeader><CardTitle>Revenue</CardTitle></CardHeader>
      <CardContent className="h-72"><RevenueChart /></CardContent>
    </Card>
    <Card><CardHeader><CardTitle>Recent activity</CardTitle></CardHeader>
      <CardContent><ActivityFeed /></CardContent>
    </Card>
  </div>
</div>

Charts

  • Use a React chart lib (Recharts, or shadcn's Chart wrapper) — give the container a fixed height (h-72) so it doesn't collapse.
  • Pull series colors from theme tokens (hsl(var(--primary))) so charts match light/dark.
  • Label axes; format numbers/currency; keep it to one idea per chart.
  • Provide a loading skeleton sized to the chart and an empty state ("No data for this range").

Hierarchy & scannability

  • Most important metric: largest, top-left.
  • Group related cards; use whitespace, not borders, to separate sections.
  • Add a time-range selector that drives all widgets.
  • Keep it to what's actionable — a dashboard is not a data dump.

Pitfalls

  • Bare numbers, no trend/context — a KPI without a delta or comparison.
  • Color-only deltas — add an arrow/sign for colorblind users.
  • Charts with no fixed height — they collapse or jump on load.
  • No loading/empty states — see empty-and-loading-states.
  • Everything the same size — no hierarchy means nothing stands out.
  • Hard-coded chart colors that break in dark mode — use tokens.

Hand-off

The overview that sits in responsive-layout, reuses empty-and-loading-states for data, links to data-tables for detail and billing-and-pricing for usage/upgrade.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.