The Shabat prohibition of “Borer” forbids separating different objects that are mixed together (i.e. a tossed salad), unless certain conditions are met. 1. The separating may be done if one removes the desirable object from the undesirable objects and not vice versa. 2. Separation should be for immediate purposes and not in preparation for a later occasion, (such as separating food in the morning to be eaten later for lunch. 3. The separation must be done by hand and not with an instrument. All these three conditions must be met to permit separating on Shabat.
However, according to a number of halachic authorities, including Rav Yehoshua Neubert (a”h) and Ha’Rav Ovadyah Yosef (a”h), this prohibition does not apply to the removal of a peel that is attached to a fruit or vegetable. In their view, “Borer” refers to separating different items that are mixed together.
In the case of a cucumber, the peel and the food are attached to one another. Removing the peel with a peeler is like cutting a piece off a fruit or vegetable, which is permitted on Shabat. This is quite different from the case discussed by the Talmud Yerushalmi of peeling an onion or garlic. The peel of onion and garlic is not attached to the food. Therefore removing the peel would constitute “Borer” and it would be subject to the conditions listed above.
It is therefore permissible on to peel an apple or cucumber with a peeler on Shabat, even well before the food is going to be served.