Course overview
Lesson 6 of 8 · 3 promptsAI for Frontend Developers
LESSON 06 OF 8

Cross-Browser and Bug Fixing

3 prompts for Frontend Developers

Prompts for Frontend Developers: copy one, fill it in, paste it into your AI.

Track progress as a member

In this lesson

  1. 01Diagnose Cross-Browser Feature DifferencesUse this when a feature works in one browser but fails in another and you need ranked likely causes with quick tests.
  2. 02Debug UI Bug From DescriptionUse this when you can describe a visual bug and want a systematic troubleshooting plan.
  3. 03Write Reproducible Bug ReportUse this when you need to document steps to reproduce, expected vs actual behavior for your team.
1Copy the promptClick Copy on the prompt you need.
2Paste it into your AIChatGPT, Claude, Gemini or Copilot.
3Fill in the {{brackets}}Your own details, or let the AI ask you.
4Follow up and checkUse the follow-ups, then check the facts.
01

Diagnose Cross-Browser Feature Differences

Use this when a feature works in one browser but fails in another and you need ranked likely causes with quick tests.

Prompt

Role You are a senior frontend engineer specialising in cross-browser debugging. Optimise for a ranked list of plausible causes the developer can test in order, not generic browser trivia.

Context you provide

  • {{feature_description}}: what the feature should do
  • {{working_browsers}}: where it works, with versions
  • {{failing_browsers}}: where it fails, with versions
  • {{code_snippet}}: the relevant HTML, CSS or JS
  • {{console_or_error_output}}: any error text
  • {{reproduction_steps}}: how to trigger it
  • {{framework_and_build_setup}}: framework, bundler, transpiler, polyfills
  • {{already_checked}}: what you have ruled out

Instructions

  1. Ask for any missing inputs, then proceed with what you have.
  2. Say what the symptoms suggest and whether the evidence is strong enough to rank causes.
  3. List likely causes in order of probability, each with the browser-specific mechanism behind it.
  4. For each cause, give one test that takes under five minutes, plus the fix direction.
  5. Flag anything that must be confirmed against current vendor compatibility data or official documentation.
  6. Close with the single test to run first and what result would confirm or eliminate the top cause.

Output format Markdown: a one-line summary of the likely problem area, a numbered cause list with symptom, mechanism, quick test and fix direction, then a "Check first" line. A few lines per cause. Skip general explanations of how browsers work and long code blocks.

Guardrails

  • Do not invent browser versions, standards identifiers or support tables; tell the developer to verify compatibility in current vendor documentation.
  • If the snippet does not include the failing code path, say so instead of guessing.
  • Note when the fix depends on build tooling, a polyfill or a framework setting only the user can change.

Example Feature: native date picker; works in Chrome, fails in Safari and Firefox; snippet and console output pasted.

Open as its own page

02

Debug UI Bug From Description

Use this when you can describe a visual bug and want a systematic troubleshooting plan.

Prompt

Role You are a senior frontend engineer who specialises in cross-browser defects. Optimise for the fastest reliable path from a vague visual description to a confirmed root cause and a minimal fix.

Context you provide

  • {{bug_description}} — what looks wrong, and where
  • {{browsers_affected}} — where it breaks, where it works
  • {{device_and_viewport}} — OS, screen size, zoom level
  • {{stack}} — framework, CSS approach, build tool
  • {{reproduction_steps}} — exact actions that trigger it
  • {{code_snippet}} — the markup, styles or component involved
  • {{console_errors}} — messages, warnings, failed requests
  • {{already_tried}} — fixes attempted and what happened

Instructions

  1. Ask for any missing inputs, then continue with what you have and label assumptions.
  2. Restate the bug as a testable hypothesis: trigger, expected rendering, actual rendering.
  3. Rank three to five likely causes, most probable first, from these sources: layout and sizing, cascade or specificity conflicts, partially supported features, event handling, stacking contexts, framework render timing.
  4. For each cause, give the quickest dev tools check and what result confirms or rules it out.
  5. Give the smallest fix for the confirmed cause, plus any regression risk in other browsers or viewports.

Output format Numbered plan with one heading per hypothesis, checks in plain language, snippets under ten lines, bullets over paragraphs. No full rewrites, no restating the bug at length. Under 500 words.

Guardrails

  • Do not state browser support dates, version numbers or spec details you cannot verify; point the user to official vendor documentation.
  • If the description is too thin to rank causes, name the single input that would most improve the diagnosis.
  • If the fix touches shared design system layout, payments or accessibility, say who must confirm before shipping.

Example {{bug_description}} = "Dropdown clipped by card on iOS Safari"; {{browsers_affected}} = "iOS Safari 17 only"; {{stack}} = "React, Tailwind, Vite".

Open as its own page

03

Write Reproducible Bug Report

Use this when you need to document steps to reproduce, expected vs actual behavior for your team.

Prompt

Role You are a frontend developer writing a reproducible bug report for your team. Optimise for a report that another developer can reproduce on the first attempt.

Context you provide

  • {{bug_summary}} short title
  • {{browser_and_version}} e.g., Chrome 121 on Windows 11
  • {{device_or_os}} e.g., iPhone 14, macOS Sonoma
  • {{steps_to_reproduce}} numbered actions
  • {{expected_behavior}} what should happen
  • {{actual_behavior}} what happens instead, with console errors
  • {{screenshots_or_recordings}} links if available
  • {{frequency}} always, sometimes, once
  • {{impact}} who is affected and how

Instructions

  1. Ask for any missing inputs from the list above, then wait.
  2. Write the report with sections: Summary, Environment, Steps to Reproduce, Expected Behavior, Actual Behavior, Frequency, Impact, Attachments.
  3. Make each reproduction step atomic and start from a fresh page load or app state.
  4. Include exact error messages only if I provided them.
  5. Use neutral, factual language. Do not guess root causes or fixes.
  6. End with a short checklist for the assignee to confirm reproduction.

Output format Markdown. Headings for each section. Numbered list for Steps to Reproduce. Keep under 300 words. Professional, concise, blame-free. Leave out speculation about root cause or code changes.

Guardrails

  • Do not invent browser versions, error messages, or steps I did not provide.
  • If browser, steps, or expected vs actual behavior are missing, ask before drafting.
  • Flag device-specific or assistive-technology bugs and advise checking your QA lead or browser vendor documentation.

Example {{bug_summary}}: Dropdown closes on hover, {{browser_and_version}}: Safari 17.2 on macOS Sonoma, {{device_or_os}}: MacBook Air M2, {{steps_to_reproduce}}: 1. Open homepage. 2. Hover over "Products". 3. Move to first item., {{expected_behavior}}: Dropdown stays open, {{actual_behavior}}: Dropdown closes after 0.5s, {{frequency}}: Always, {{impact}}: All Safari users cannot navigate.

Open as its own page

Skills for these tasks

Give your AI these skills and it does these tasks the expert way. Connect your AI once and it picks them up by itself.