Boil or steam the potatoes with their jackets on until very tender. To test for doneness, stick a pairing knife into one of the potatoes; if you can slip it out easily without picking up the potato, then it's done.
Drain the potatoes and, as soon as they are cool enough to handle, peel them and pass them through a food mill or potato ricer into a large bowl.
Working very gently with a wooden spoon or spatula, mix into the puréed potato a generous pinch of salt, the egg (optional) and enough flour to make a smooth, soft and only slightly sticky dough. Do not knead the dough or it will become gummy, just mix the ingredients together as gingerly as you can.
Form the dough into a ball and place it on a well floured surface.
Break off a handful of the dough and roll that with both hands until you have a ‘rope’ about the thickness of your thumb.
Cut this rope into 2.5 cm (1 inch) lengths. Take each bit of dough and flip it with your index finger against the inside of a fork (or if you have one, the special rigagnocchi, or ‘gnocchi paddle’).
Place your gnocchi on a lightly floured baking sheet as you make them.
Cook the gnocchi in a gently boiling well-salted water. They are done just as soon as they rise to the surface of the water.
Transfer to a bowl immediately and then dress them with the sauce of your choice.