skeletonizer
Skill1 starsChanged 8 days agoMITView on GitHub
Turn an existing UI into a loading skeleton - find screens and components that show a spinner, blank space or "Loading..." while data loads, then add skeleton placeholders that match the real layout (no layout shift), wired into the framework's loading state, with accessibility and reduced-motion handled. Works with React, Next.js, Vue/Nuxt, Svelte, Angular, plain HTML/CSS, Flutter, SwiftUI and React Native. Use when asked to add skeleton loading, shimmer placeholders, loading states, or to replace spinners. Use proactively whenever you build UI that fetches data, so the loading state is a skeleton from the start.
In this repository8 other files it gives its agents.
- skills/zero-trust-review/references/agents.mdAGENTS.md
- api-security-guardSkill
- app-readiness-auditSkill
- build-flow-mapSkill
- monitor-alerts-builderSkill
- motionsiteSkill
- session-journalSkill
- zero-trust-reviewSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Runs on its own: when Claude builds UI that loads data it writes the skeleton as part of it, and when it writes a bare spinner or …
- Distinctive: line 19
Prefer mirror for routes and lists.
- Distinctive: line 32
Treat results as leads; open the file before changing it.
- Very specific: line 38
Add the timing guard: if the data usually arrives in under about 300 ms: show the skeleton only after a short delay and keep it for a …
- Distinctive: line 44
Repeat honestly: Use the number of items that fit the first screen, not 50.
- Distinctive: line 51
Do not skeleton what is instant: If content is already in cache or bundled, no skeleton.
- Distinctive: line 57
Look at it. With Playwright (if available): throttle the network or delay the API route, screenshot the loading state and the loaded state …
- Very specific: line 58
Check reduced motion (page.emulateMedia({ reducedMotion: 'reduce' })), dark mode, and a narrow mobile width.
- Distinctive: line 59
Check the error and empty paths still render something.
- Very specific: line 60
If the project has component tests, add one that renders the loading state and asserts aria-busy="true".
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Skeletonizer
Makes an existing interface feel fast while data loads by showing grey placeholder shapes that look like the final content. It edits the real UI; it does not redesign it.
Runs on its own: when Claude builds UI that loads data it writes the skeleton as part of it, and when it writes a bare spinner or "Loading..." for content it is reminded to use a skeleton.
Two ways to build a skeleton
| Mode | What it is | Use when |
| Mirror | A separate XxxSkeleton component with the same outer layout as Xxx, using placeholder blocks | Content shape is different from its loading shape (lists, cards with images, tables), or the framework has a loading slot (loading.tsx, <Suspense fallback>, @placeholder) |
| Overlay | The real component stays; a data-loading / aria-busy state paints its text and images as grey bars with CSS (templates/skeleton.css) | The component already renders fine with empty or fake data and you want zero layout drift with the least code |
Prefer mirror for routes and lists. Prefer overlay for small components (profile header, stat card, form with prefilled values).
Procedure
- Find candidates. Run
python3 <skill-dir>/scripts/find_loading_candidates.py <project>and read the groups:spinner-for-content: a spinner or "Loading..." where content will appear (best wins)blank-while-loading: returnsnullwhile loading, so the area is blank and then jumpsno-loading-state: client components that fetch data and never handle the loading phaseroute-missing-loading: Next.js App Router pages with data but noloading.*in the folder or a parentasync-component-no-suspense: async server components used without a<Suspense>boundaryalready-skeleton: leave alone Priority ishighfor pages, screens and real server data calls,mediumfor smaller components or per-request rendering. Treat results as leads; open the file before changing it. If the user named a screen, start there and skip the scan.
- Understand the real layout. Read the component and its styles. Write down for each region: size (width, height, aspect ratio), spacing, radius, how many repeats (list rows, cards). Skeleton blocks must use the same numbers or the page will jump when data arrives. If a Playwright or browser tool is available, screenshot the loaded page first and measure real element boxes.
- Pick the loading signal the code already has (
isLoading,isPending,status === 'pending', Suspense, route transition,@defer,FutureBuilder,redacted). Do not add new fetching logic.references/frameworks.mdhas the exact pattern for each framework. - Add the shared pieces once. Copy
templates/skeleton.css(styles, shimmer, dark mode, reduced motion) and, for React/Next,templates/Skeleton.tsx. Reuse the project's design tokens (colors, radius) if it has them; otherwise keep the template's CSS variables. - Write the skeleton per component using the rules below. Keep each skeleton next to its component and export it with the same props that affect layout (for example
rows). - Wire it in at the loading signal. Replace the spinner for content areas. Keep a small spinner only for button actions and background refreshes.
- Add the timing guard if the data usually arrives in under about 300 ms: show the skeleton only after a short delay and keep it for a minimum time so it does not flash (
templates/useDelayedLoading.ts, or the CSS-only delay inskeleton.css). - Check it. See "Verify" below. Report what changed and what to look at.
Rules for a good skeleton
- Same box, not same pixels. Match width, height, spacing and radius of the real elements. Text lines: one block per line at line-height, last line shorter (about 60 percent). Avatars: circle of the real size. Images: reserve the real aspect ratio.
- Repeat honestly. Use the number of items that fit the first screen, not 50. Use a stable count (for example 5 rows); do not read data to decide.
- Skeleton content, not chrome. Headers, nav, buttons, labels and static text that do not depend on data render normally. Never grey out a control the user can already use.
- No fake data in the DOM. Skeleton blocks contain no text, so screen readers and search engines do not read invented values.
- One animation, calm. A slow shimmer (about 1.5 s) or a gentle pulse. Never both. Stop animation under
prefers-reduced-motion: reduce(the template does). - Theme aware. Colors come from CSS variables with a dark-mode override.
- Accessible. The loading region gets
aria-busy="true"; skeleton blocks getaria-hidden="true"; provide one visually hidden "Loading" message (role="status"). When loaded, removearia-busy. - Errors and empty states are different. A skeleton must end. Make sure a failed fetch shows an error and an empty result shows an empty state, never an endless skeleton.
- Do not skeleton what is instant. If content is already in cache or bundled, no skeleton.
- Avoid layout shift. Same container, same scroll height. For long lists prefer a fixed-height skeleton container.
Verify
- Build or type-check (
tsc,npm run build,flutter analyze, etc.) and fix errors. - Look at it. With Playwright (if available): throttle the network or delay the API route, screenshot the loading state and the loaded state at the same viewport, and compare element positions. A shift of more than a few pixels means the skeleton does not match.
- Check reduced motion (
page.emulateMedia({ reducedMotion: 'reduce' })), dark mode, and a narrow mobile width. - Check the error and empty paths still render something.
- If the project has component tests, add one that renders the loading state and asserts
aria-busy="true".
Output to the user
List each file changed with one line on why, the shared files added, anything skipped and why (for example "route already has loading.tsx"), and how to preview the loading state (the delay or throttle used). Do not paste whole components back into chat.
Files
| File | Purpose |
scripts/find_loading_candidates.py | Heuristic scan for where skeletons are missing or spinners are used for content |
references/frameworks.md | Exact patterns for React, Next.js, Vue/Nuxt, SvelteKit, Angular, plain HTML, React Native, Flutter, SwiftUI |
references/anatomy.md | How to turn common UI (list row, card, table, profile, chart, form) into skeleton blocks |
templates/skeleton.css | Shimmer, dark mode, reduced motion, overlay mode, delayed show |
templates/Skeleton.tsx | React primitives: Skeleton, SkeletonText, SkeletonAvatar, SkeletonRegion |
templates/useDelayedLoading.ts | Hook that delays showing and enforces a minimum display time |
templates/next-loading.tsx | Example Next.js loading.tsx |
templates/demo.html | Open in a browser to preview mirror mode, overlay mode, dark mode |
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
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.

