Create Skeleton
Create or update loading skeleton components that match existing UI layout, spacing, and design tokens. Use when the user asks for a skeleton, loading placeholder, shimmer, or pulse state for a React screen, section, modal, card, or table.
Source: .agents/skills/create-skeleton/SKILL.md
Metadata
- name: create-skeleton
Content
Create Skeleton
Goal
Implement loading placeholders that feel native to this codebase and mirror the final UI structure.
Workflow
- Find the target component and identify the exact section that needs a loading state.
- Load
.agents/skills/feature-context/SKILL.mdfor the touched domain and inspect the relevant.agents/references/features/pack before editing. - If the skeleton is Figma-driven, load
.agents/references/coding-standard/figma-guidance.md. - Reuse existing skeleton patterns in nearby files first (animation, colors, radii, spacing).
- Build a dedicated skeleton component in its own file (
<FeatureName>Skeleton.tsx) with:animate-pulsebg-npl-neutral-light-alpha-3for placeholder blocks- section containers that match production rounding/background tokens
- Wire the skeleton using explicit loading state (
isLoading...) and render fallback first:- loading -> skeleton
- loaded -> actual content
- Keep skeleton dimensions close to final content (text rows, avatars, chips, buttons, media thumbs).
- Avoid inline styles; use Tailwind utility classes and project tokens.
- Do not add locale strings for skeleton-only UI.
Implementation Rules
- One top-level React functional component per file.
- Use TypeScript (
.tsx) for new skeleton components. - Keep skeleton code presentational only (no data fetching inside skeleton file).
- Prefer readable names (
<Feature>Skeleton,isLoading<Feature>). - If the skeleton establishes a durable loading-state pattern for a feature domain, update the matching
.agents/references/features/*.mdfile.
Quick Checklist
- Loading state exists and is toggled in success + error branches.
- Skeleton visually maps to the final layout.
- Colors/radius/spacing use existing NPL/Tailwind tokens.
- Lints pass for touched files.