When it is sizzling, toss in the chicken liver, sear for only a minute, then add the shallot and/or scallion and cook quickly, tossing, for another 1/2 minute.
Splash in the sherry, let cook for a few seconds, until syrupy, then carefully break the egg right into the pan.
Salt and pepper everything, and let cook over medium heat until the egg has just begun to set.
Spoon the little bit of pan juice over the egg, and slip onto a rack about 6 inches under the broiler to finish cooking, just until the egg is set.
Baste again, and eat from the gratin pan with some toasted bread to mop up the browned bits and juice.
Ham and sausage are also wonderful with shirred eggs, and you could do a vegetarian version with some onion and sweet pepper or some leftover ratatouille, if you have any.