From automation
Guide to building Next.js loading.tsx skeleton pages that mirror page content structure. Use this skill whenever creating loading states, skeleton pages, or loading.tsx files for any page type — list pages, form sub-pages, detail overviews, cards grids, description lists, or custom content pages. Must be triggered when the user mentions loading page, skeleton, loading state, or loading.tsx.
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin finstreet-fe-claude-pluginsThis skill uses the workspace's default tool permissions.
Loading pages are Next.js files (`loading.tsx`) that show skeleton placeholders while the real page loads. They mirror the structure of their corresponding page — same layout components, same spacing, same hierarchy — but replace dynamic content with skeleton components.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Loading pages are Next.js files (loading.tsx) that show skeleton placeholders while the real page loads. They mirror the structure of their corresponding page — same layout components, same spacing, same hierarchy — but replace dynamic content with skeleton components.
page.tsx to understand its structureAnalyze what the page imports and renders:
Suspense, has force-dynamic) → List LoadingFormLayout) → Form Sub-Page LoadingTaskGroup / TaskPanel, shows grouped tasks) → Detail Overview LoadingDescriptionsList) → Description List LoadingCardsGridLayout or renders card panels) → Cards Grid LoadingLoading pages follow a two-file pattern:
loading.tsx (in src/app/...)Thin wrapper that imports and renders the feature-level loading component.
import { FeatureLoading } from "@/features/{feature}/components/FeatureLoading";
export default function PageNameLoading() {
return <FeatureLoading />;
}
src/features/...)Contains the actual skeleton layout. Lives alongside the feature's other components.
Exception — List pages: Only need the page-level loading.tsx since they delegate directly to the shared ListLoading component. No feature-level component needed.
| Component | Import | Purpose |
|---|---|---|
BoxSkeleton | @finstreet/ui/components/base/Skeletons/BoxSkeleton | Rectangular placeholder for content blocks |
TextSkeleton | @finstreet/ui/components/base/Skeletons/TextSkeleton | Animated text lines (lines, fontSize props) |
AvatarSkeleton | @finstreet/ui/components/base/Skeletons/AvatarSkeleton | Circular placeholder (size prop) |
| Component | Import | Use for |
|---|---|---|
ListLoading | @/shared/components/ListLoading | List pages — accepts title prop |
FormSkeleton | @/shared/components/FormSkeleton | Form pages — renders form field placeholders, no props |
SubPageHeaderSkeleton | @/shared/components/SubPageHeaderSkeleton | Sub-pages — accepts title prop, renders back button + title + text skeleton |
getTranslations() from next-intl/server. Export as async function."use client" directive. Use useTranslations() from next-intl.Choose based on what the component needs:
getTranslations()useParams, etc.) → client component with useTranslations()See loading-patterns.md for detailed code templates and examples of each loading type.
ListLoading, FormSkeleton, SubPageHeaderSkeleton) whenever the pattern matches — do not reinvent themloading.tsx function name: {RouteSegments}Loading (PascalCase from route path){FeatureName}LoadingBoxSkeleton height="200")Typography with a translation key, the loading page should render that same translated text — descriptions are static and known at load time