fix-chrome-open-not-showing
Skill0 starsChanged 4 months agoMITView on GitHub
Diagnose and fix macOS Google Chrome running with no visible window. Use when Chrome's menu bar shows but no window appears, a window is stuck off-screen on a disconnected external monitor, or Cmd+N and File menu New Window do nothing. Skip Chrome that crashes on launch, and skip non-macOS.
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 43
Ask the user if a window appeared.
- Very specific: line 58
Verify nothing remains (must print 0):
- Very specific: line 64
If it is not 0, repeat the pgrep | xargs kill -9 line until it is.
- Distinctive: line 69
Read each profile's saved rectangle:
- Distinctive: line 105
Make sure Chrome is fully dead (rerun Step 3), then launch with explicit geometry that Chrome cannot override from saved state:
- Distinctive: line 125
Use the menu bar: Window > Move & Resize > Center (or Zoom) to pull the window onto the main display.
- Distinctive: line 127
Check other desktops/Spaces with Mission Control (F3).
- Very specific: line 133
After Step 5, python3 scripts/window_placement.py inspect shows all rectangles within the current display bounds.
- Very specific: line 147
Not macOS: stop. This skill relies on macOS-only tooling (osascript, system_profiler, the macOS Preferences path).
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Fix Chrome Open Not Showing
Outcome
A visible, on-screen Google Chrome window, plus the reason it was hidden (almost always: Chrome restored its window onto an external monitor that is no longer connected, so it opened off-screen).
When this applies
- Chrome is running (menu bar reads "Chrome") but you see no window.
- The
Windowmenu shows Minimize and Zoom greyed out — that means Chrome has zero windows, not a hidden one. - New-window shortcuts (Cmd+N, File > New Window) appear to do nothing.
macOS only. If Chrome crashes seconds after launch instead, this is the wrong skill.
How to run it
Escalate through the ladder in order. After each step that could produce a window, stop and ask the user: "Did a Chrome window appear?" Only continue to the next step if the answer is no. Do not run destructive steps (kill, Preferences rewrite) before confirming the cheap steps failed.
The scripts/window_placement.py helper handles the profile-inspection and
reset steps deterministically. Invoke it with the path relative to this skill
directory.
Step 1 — Ask Chrome to make a window (cheap, non-destructive)
osascript -e 'tell application "Google Chrome" to make new window' \
-e 'tell application "Google Chrome" to activate'Ask the user if a window appeared. If yes → done. If no → continue.
Step 2 — Confirm zero windows
Have the user open the Window menu. If Minimize/Zoom are greyed out, Chrome genuinely has no windows and Step 1 failed silently — this confirms the off-screen saved-bounds diagnosis. Continue.
Step 3 — Fully quit and kill every Chrome process
osascript -e 'tell application "Google Chrome" to quit'; sleep 2
pgrep -i "Google Chrome" | xargs -r kill -9Verify nothing remains (must print 0):
pgrep -i "Google Chrome" | wc -lIf it is not 0, repeat the pgrep | xargs kill -9 line until it is. Helper
processes can be stubborn; killing by PID is more reliable than killall.
Step 4 — Inspect saved window bounds vs. the current display
Read each profile's saved rectangle:
python3 scripts/window_placement.py inspectGet the current display bounds:
system_profiler SPDisplaysDataType | grep -E "Resolution|UI Looks like"Any profile whose left/top lies outside the active display (for example
left greater than the screen width, such as left=3572 on a 1920-wide
display) is parked on a disconnected monitor. That is the root cause.
Step 5 — Reset all profiles to a safe on-screen rectangle
python3 scripts/window_placement.py resetThis rewrites browser.window_placement in every profile's Preferences to a
box that fits a standard 1920x1080 display (left 100, top 80, right 1600,
bottom 1000). Override with --left/--top/--right/--bottom for a smaller
screen. Chrome must be fully quit (Step 3) for this to stick. Then relaunch:
open -a "Google Chrome"; sleep 2
osascript -e 'tell application "Google Chrome" to activate'Ask the user if a window appeared. If yes → done. If no → continue.
Step 6 — Force a positioned window on launch (reliable fallback)
Make sure Chrome is fully dead (rerun Step 3), then launch with explicit geometry that Chrome cannot override from saved state:
open -na "Google Chrome" --args \
--window-position=100,80 --window-size=1400,900 \
--new-window "https://www.google.com"
sleep 3
osascript -e 'tell application "Google Chrome" to activate'
osascript -e 'tell application "Google Chrome" to count windows'A count of 1 or more with a visible window means success.
Step 7 — If the window count is > 0 but still invisible
The window exists but the compositor is hiding it. Suspect Stage Manager or a Spaces/desktop assignment:
- Toggle Stage Manager off in Control Center, then retry Step 1.
- Use the menu bar: Window > Move & Resize > Center (or Zoom) to pull the window onto the main display.
- Check other desktops/Spaces with Mission Control (F3).
Validation
osascript -e 'tell application "Google Chrome" to count windows'returns ≥ 1.- The user confirms a visible window on the active display.
- After Step 5,
python3 scripts/window_placement.py inspectshows all rectangles within the current display bounds.
Failure handling
pgrep ... | wc -lnever reaches 0: a process is relaunching Chrome (Keep-Alive, MDM, or a login item). Report this instead of looping; the reset cannot apply while Chrome is running.resetreports 0 profiles changed: the profiles have no savedwindow_placementyet, so off-screen bounds are not the cause. Go straight to Step 6.- Step 6 window count is 0: Chrome may be blocked by a corrupt
Local Stateor a policy. Report the failure; do not delete profile data without explicit user consent. - Not macOS: stop. This skill relies on macOS-only tooling
(
osascript,system_profiler, the macOS Preferences path).
Root cause
Chrome saves per-profile window bounds in
~/Library/Application Support/Google/Chrome/<Profile>/Preferences under
browser.window_placement. When Chrome last ran on an external monitor that is
now disconnected, it restores each window at coordinates outside the current
display, so the window is real but off-screen. Resetting those bounds — or
forcing geometry at launch — brings it back.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

