A defibrillator is provided that includes a garment, shaped to be worn around a chest of a patient cardiac sensing electrodes, each of which is configured for placement in external or internal contact with the chest of the patient and defibrillation electrodes, each of which is coupled to the garment for external placement near the chest of the patient, and which comprise respective reservoirs containing electrically-conductive gel, and respective liners removably covering the gel. One or more exposure actuators are configured to remove the liners from the gel. Control circuitry is configured to detect cardiac arrhythmia using the cardiac sensing electrodes, ascertain that the detected cardiac arrhythmia is a type of cardiac arrhythmia that can be treated by applying defibrillation, drive the exposure actuators to remove the liners from the gel, and, thereafter, drive the defibrillation electrodes to apply at least one defibrillation shock to the chest of the patient.