.claude/skills/audit-skeleton/SKILL.md
Audit every page to ensure it has a layout-accurate skeleton loading state using useMinLoadTime, matching the page's actual structure (cards, grids, tables, charts, sidebars). Use after adding pages, before /complete-session, and during UX audits.
npx skillsauth add malhajri07/real-estate-CRM-project audit-skeletonInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Every page must show a skeleton loading state that mirrors its actual layout — not a generic spinner or empty div. Users should see the page's structure (metric cards, tables, charts, sidebars) shimmer into place so the transition to real content feels seamless.
import { useMinLoadTime } from "@/hooks/useMinLoadTime";
import { SomePageSkeleton } from "@/components/skeletons/page-skeletons";
import { PAGE_WRAPPER } from "@/config/platform-theme";
import PageHeader from "@/components/ui/page-header";
export default function SomePage() {
const showSkeleton = useMinLoadTime();
const { data, isLoading } = useQuery({ queryKey: ['/api/...'] });
if (isLoading || showSkeleton) {
return (
<div className={PAGE_WRAPPER}>
<PageHeader title="عنوان الصفحة" />
<SomePageSkeleton />
</div>
);
}
return (
<div className={PAGE_WRAPPER}>
<PageHeader title="عنوان الصفحة" />
{/* actual content */}
</div>
);
}
A skeleton is layout-accurate when:
GRID_METRICS (4 cols), the skeleton renders 4 skeleton cards in the same gridlg:grid-cols-3 with a sidebar, the skeleton replicates that splitanimate-pulse — the top-level skeleton div must include animate-pulseborder-border, bg-card, rounded-2xl (never hardcoded colors)Inventory all pages. Collect every file under apps/web/src/pages/platform/, apps/web/src/pages/admin/, and apps/web/src/pages/client/ that exports a default component.
Check each page for the skeleton pattern. For each page grep/read for:
useMinLoadTime import — required@/components/skeletons/ — requiredif (isLoading || showSkeleton) returning the skeleton — requiredFlag missing skeletons. Pages that fail any check above go into the "Missing skeleton" list.
Audit skeleton accuracy. For each page that does have a skeleton:
Report a table with columns: | Page | Status | Skeleton component | Issues | |------|--------|--------------------|--------| | leads | OK | LeadsSkeleton | — | | inbox | MISSING | — | No useMinLoadTime, no skeleton | | dashboard | MISMATCH | DashboardSkeleton | Skeleton missing the quick-actions row |
Fix missing skeletons — for each missing page:
apps/web/src/components/skeletons/page-skeletons.tsx that matches the layoutuseMinLoadTimeSkeletonCard, SkeletonMetricRow, SkeletonChartArea, SkeletonListItem) where possibleFix mismatched skeletons — update the skeleton component to match the current page layout.
Run /typecheck to confirm zero TS errors after all changes.
| Block | Use for |
|-------|---------|
| SkeletonCard | Single metric/stat card |
| SkeletonMetricRow | Row of 2-5 metric cards in GRID_METRICS |
| SkeletonChartArea | Chart container with title placeholder |
| SkeletonListItem | Avatar + text + badge row in a list |
If none of these fit, create a page-specific skeleton function (e.g. InboxSkeleton) using the same Skeleton primitive and animate-pulse pattern.
pages/platform/, pages/admin/, pages/client/ has a skeletonuseMinLoadTime (min 2000ms)animate-pulse at the top levelborder-border, bg-card, rounded-2xl) — no hardcoded colorsms-, me-, ps-, pe-, border-s, border-e)/typecheck passes<Spinner />) as a page loading state — always use a structural skeletonuseMinLoadTime(2000) to prevent flashPAGE_WRAPPER — it must be inside the same wrapper as the loaded content so spacing is consistenttesting
Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax. Use when working with .md files in Obsidian, or when the user mentions wikilinks, callouts, frontmatter, tags, embeds, or Obsidian notes.
tools
Interact with Obsidian vaults using the Obsidian CLI to read, create, search, and manage notes, tasks, properties, and more. Also supports plugin and theme development with commands to reload plugins, run JavaScript, capture errors, take screenshots, and inspect the DOM. Use when the user asks to interact with their Obsidian vault, manage notes, search vault content, perform vault operations from the command line, or develop and debug Obsidian plugins and themes.
data-ai
Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.
tools
Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections. Use when working with .canvas files, creating visual canvases, mind maps, flowcharts, or when the user mentions Canvas files in Obsidian.