skeleton-auditor

Detect and fix skeleton-to-loaded-component layout shifts in React and Next.js branch diffs.

Updated Jul 17, 2026
One-click install
npx skills add https://github.com/guneysol/agent-configs --skill skeleton-auditor-guneysol
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: skeleton-auditor
Source: https://github.com/guneysol/agent-configs/tree/main/agents/skills/skeleton-auditor
Command: npx skills add https://github.com/guneysol/agent-configs --skill skeleton-auditor-guneysol

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Skeleton loading states that don't match the real component's dimensions cause visible layout shifts when content loads, degrading perceived performance and user experience. Manually comparing every skeleton against its loaded counterpart across a branch diff is tedious and easy to miss. ## Core Features & Use Cases - Skeleton/Component Pair Detection: Identifies pairs of loading states (loading.tsx, <Suspense fallback>, shadcn <Skeleton />) and the real components they stand in for within the branch diff against the actual default branch. - Layout Parity Checks: Verifies shared layout shells, per-element height/width/padding parity, line-height matching, and aspect-ratio usage on media, flagging magic numbers like h-4 where content-driven sizes belong. - In-Place Fixes and Reporting: Applies narrow fixes (shared shells, matched leaf dimensions, aspect-ratio) when mutation is in scope, and reports per-pair findings ending with a summary line. - Use Case: After adding a new Suspense fallback to a Next.js dashboard page, run the audit to confirm the skeleton's wrapper, spacing, and block heights match the loaded component so nothing jumps when data arrives. ## Quick Start Ask the assistant to use skeleton-auditor to review the current branch diff for skeleton-to-loaded layout shifts and fix any mismatches it finds.

Frequently Asked Questions about skeleton-auditor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix skeleton loading layout shift in React?▼

Skeleton layout shift is fixed by making the skeleton and real component share the same outer wrapper and matching each skeleton block's dimensions to the real element. Match heights to line-height rather than font-size, and use aspect-ratio for media instead of fixed widths.

How to audit Suspense fallbacks for layout shifts in Next.js?▼

Diff your branch against the repository's actual default branch, then pair each Suspense fallback, loading.tsx, or Skeleton component with the real component it replaces. Check wrapper parity, per-element dimensions, and flag arbitrary sizes like h-4 where content-driven sizing belongs.

Does the audit work with shadcn Skeleton components?▼

Yes, shadcn <Skeleton /> components are explicitly detected as skeletons and paired with the real components they stand in for. The same parity checks for height, width, padding, and border apply to them.

Why does my skeleton cause content to jump when data loads?▼

Jumps usually come from different outer wrappers between skeleton and loaded states, or skeleton blocks sized with magic numbers that don't match real line-heights. Tailwind text-base has a 24px line-height, so an h-4 (16px) skeleton block shifts content by 8px.

Can it measure actual layout shift in a browser?▼

If a browser surface is available, it loads changed routes with throttled network, snapshots bounding boxes for skeleton and loaded states, and reports deltas greater than 1px. It skips this step silently when no browser surface is available.

When should I not run a skeleton audit?▼

Skip it when the branch diff contains no loading states, Suspense fallbacks, or Skeleton components and no changes to components that have skeletons. If the diff is empty, the audit reports that in one line and stops.