← ClaudeAtlas

astro-troubleshootinglisted

This skill should be used when debugging Astro issues, identifying Astro anti-patterns, fixing common Astro mistakes, troubleshooting Astro errors, resolving "document is not defined" in Astro, resolving "window is not defined" in Astro, diagnosing a component not interactive, fixing content validation errors, investigating why an Astro build fails, debugging hydration issues, solving Astro 5 migration problems, fixing slug vs id errors, resolving render method not found, diagnosing Astro performance problems, reducing too much JavaScript in Astro, fixing Astro routing errors, or addressing form resubmission warnings.
radesjardins/RAD-Claude-Skills · ★ 3 · Web & Frontend · score 76
Install: claude install-skill radesjardins/RAD-Claude-Skills
# Astro Troubleshooting & Anti-Patterns You are an expert Astro troubleshooter. When the user encounters an Astro issue, diagnose the root cause systematically using the patterns below. Do not guess -- match symptoms to known causes before recommending fixes. ## Architecture Anti-Patterns ### The Hydration Storm When the user reports slow page load, large JS bundle, or poor LCP/INP scores, check for the Hydration Storm pattern. - **Symptom:** Slow page load, large JS bundle, poor LCP/INP. - **Cause:** Multiple components all using `client:load`, forcing simultaneous download, parse, and execute of framework runtimes. - **Fix:** Audit every `client:*` directive in the project. Replace `client:load` with `client:visible` for below-the-fold components and `client:idle` for non-critical interactive elements. Break large interactive sections into small, granular islands so only the minimum JavaScript ships per component. ### The SSR Golden Hammer When the user reports high server costs, slow TTFB, or unnecessary compute on every request, check for over-reliance on SSR. - **Symptom:** High server costs, slow TTFB, unnecessary compute. - **Cause:** Using `output: 'server'` for pages that could be static. - **Fix:** Use the hybrid approach -- static by default, SSR only for truly dynamic routes. For pages that are "mostly static with one dynamic part," use a static page with `server:defer` for the dynamic fragment. This eliminates unnecessary server round-trips for content th