Many of the nutrients in potatoes are indeed just under the skin and will be lost by peeling, but if the potatoes have been exposed to light and become green, remove any green parts, as they are poisonous - see e.g. the section on potatoes at https://www.food.gov.uk/safety-hygiene/home-food-fact-checker