The present invention relates to a pharmaceutical composition comprising as active ingredient a carboxylic acid or a pharmaceutically acceptable salt thereof for use in improving barrier function of the skin, wherein the pharmaceutical composition is administered to an infant. The invention also relates to a method for treating and/or preventing a skin disease of a patient, the method comprising administering an effective amount of a carboxylic acid or a pharmaceutically acceptable salt thereof to a patient in need thereof.