Give some stream of consciousness and then the answer. The frontal branch passes through the orbit superiorly, then reenters the frontal bone briefly before exiting above the orbit through the superior orbital fissure and the supraorbital notch to provide sensory innervation for the skin of the forehead and scalp. The lacrimal nerve passes through the orbit superiorly to innervate the lacrimal gland. The nasociliary branch gives off several sensory branches to the orbit and then continues out through the anterior ethmoidal foramen, where it enters the nasal cavity and provides innervation for much of the anterior nasal mucosa. It also gives off a branch which exits through the nasal bones to form the external nasal branch.

Based on this passage, where does the ophthalmic nerve exit the skull?
The relevant sentence in the passage is: The frontal branch passes through the orbit superiorly, then reenters the frontal bone briefly before exiting above the orbit through the superior orbital fissure and the supraorbital notch to provide sensory innervation for the skin of the forehead and scalp.
Therefore, the answer is the orbit through the superior orbital fissure and the supraorbital notch.