{"name":"debug-frontend-spa-prompt","description":"A prompt that finds a client-side fault in a single-page app, such as a blank screen, a bad route, or a Vite, React or Angular error. Use when the user pastes an SPA error, a white screen after deploy, or a browser-only bug.","category":"coding-prompts","tags":["spa","react"],"models":["any"],"proven":false,"passing_families":0,"model_testing":"Not yet model-tested; testing Jan 2027","url":"https://theskillvault.ai/skills/debug-frontend-spa-prompt","api_url":"https://theskillvault.ai/api/skills/debug-frontend-spa-prompt","raw_url":"https://theskillvault.ai/api/skills/debug-frontend-spa-prompt/raw","body":"# Debug a frontend SPA (prompt)\n\nThis prompt debugs a single-page app in the browser. It does not assume a server is there to blame.\n\n## When to use\n- A React, Angular or Vite app shows a blank screen or a white screen.\n- A route fails only after the SPA is deployed.\n- The user pasted a browser error and the fault looks client-side.\n\n## When not to use\n- You want a method for any bug in any layer. Use debug-systematically.\n- You want Chrome DevTools driven for you. Use debug-with-chrome-devtools.\n- The console says hydration failed. Use fix-react-hydration-errors.\n- The browser reports a CORS header. Use debug-cors-errors.\n\n## Steps\n1. Paste the error text, the framework and where it is hosted.\n2. Remove cookies, tokens and private URLs first.\n3. Run the checks in order. Stop when one check explains the screen.\n4. Apply one change, then reload. Do not stack fixes.\n\n## Prompt\n```text\nDebug this single-page app as a client-side fault. Do not assume a backend exists.\n\nPROBLEM:\n{{WHAT THE SCREEN DOES}}\n\nFRAMEWORK:\n{{ANGULAR, REACT, VITE, OR OTHER}}\n\nHOST:\n{{VERCEL, NETLIFY, GITHUB PAGES, OR OTHER}}\n\nERROR TEXT:\n{{CONSOLE OR BUILD TEXT}}\n\nWrite these sections only:\n\n# Problem analysis\nWhat the screen is doing, in two or three sentences. Quote the error if one was pasted.\n\n# Likely cause\nThe single most likely client-side cause, and one sentence on why.\nIf the text is a hydration mismatch or a CORS header, name that and stop.\nIf the notes are too thin, write \"not enough to name a cause\".\n\n# Checks to run\nThree to six checks, in order. Each check says what you look at and what result would confirm the cause.\nPrefer the route base path, the built asset URL, the env value baked at build time, and a stale cache.\nDo not invent a stack frame, a config key or a file that was not in the notes.\n\n# How to prevent it\nTwo short practices that would catch this before the next deploy.\n\nRules:\n- Client-side only. Do not propose a server rewrite.\n- If no framework is named, say which assumption you used.\n- Plain words. One check is one sentence.\n```\n\n## How to adapt\n- Svelte, Vue or another framework? Keep the same four sections. Swap the framework name.\n- A static host other than the ones listed? Put its name under HOST.\n\n## Gotchas\n- Do not paste API keys, session cookies or passwords into a public AI.\n- A blank screen can be a 404 on one script. Check the network row before you edit code.\n- Several changes at once hide which check mattered.\n\n## Portability\nWorks with any AI chat. Angular, React, Vite, or another framework, on any host.\n\n## Done when\n- The cause is one client-side sentence, or the note says the evidence is too thin.\n- The checks can be run in the browser without a backend.\n- Hydration and CORS were named and stopped, when the error text is one of those.\n\n## Example prompt\n\"Debug this Vite React SPA. The production site is a white screen. The console says the main script 404s. Hosted on Netlify.\"\n\n---\nAdapted from the \"Senior Frontend Debugger for SPA Websites (Angular, React, Vite)\" prompt by ovulgo22 on prompts.chat (CC0 1.0, public domain).","files":[],"license":"CC0-1.0","license_name":"CC0 1.0","license_url":"https://creativecommons.org/publicdomain/zero/1.0/","attribution":"Based on work by ovulgo22 (prompts.chat) (Public domain (CC0 1.0) - prompt contributed to prompts.chat by ovulgo22. Upstream title: Senior Frontend Debugger for SPA Websites (Angular, React, Vite)., CC0 1.0), https://github.com/f/prompts.chat/blob/b09880e229d2f091ffa2254bc187532fb8980f9b/prompts.csv; adapted by TheSkillVault, https://theskillvault.ai","install":{"claude_code":"curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/debug-frontend-spa-prompt/raw' -o ~/'.claude/skills/debug-frontend-spa-prompt/SKILL.md'","cursor":"curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/debug-frontend-spa-prompt/raw' -o '.cursor/skills/debug-frontend-spa-prompt/SKILL.md'","agents":"curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/debug-frontend-spa-prompt/raw' -o '.agents/skills/debug-frontend-spa-prompt/SKILL.md'","mcp_url":"https://theskillvault.ai/mcp","cursor_mcp_deeplink":"cursor://anysphere.cursor-deeplink/mcp/install?name=theskillvault&config=eyJ1cmwiOiJodHRwczovL3RoZXNraWxsdmF1bHQuYWkvbWNwIn0%3D","mcp_config":{"mcpServers":{"theskillvault":{"url":"https://theskillvault.ai/mcp"}}}},"bundles":[],"tested_on":[{"family":"chatgpt","name":"ChatGPT","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"claude","name":"Claude","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"gemini","name":"Gemini","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"grok","name":"Grok","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"llama","name":"Llama","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"deepseek","name":"DeepSeek","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"mistral","name":"Mistral","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"qwen","name":"Qwen","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"kimi","name":"Kimi K","outcome":null,"date":null,"source":null,"counts":false,"stale":false}],"proven_rule":{"threshold":5,"window_days":365,"computed_at":"2026-11-29T03:42:30.374Z"}}