Abstract: As a fundamental step in visual shape analysis, finding a good shape representation has attracted a lot of interest. A skeleton, which not only retains the geometric characteristics of the shape but also has its complete topology, is regarded as a very efficient tool in visual shape analysis. Although a variety of skeleton computation methods have been proposed, the obtained skeletons still suffer from some limitations, i.e., being sensitive to noise or being inconsistent. In this study, we propose a method for computing the 2D skeleton based on a generalized electric field. Upon evenly placing unit positive charges on the shape contour, we find that the skeleton of the shape can be accurately extracted by a novel definition of electric potential and later pruned by the distribution of charge on the shape when the state of electrostatic equilibrium is reached. Extensive qualitative experiments are conducted on two public datasets, demonstrating that our method can produce a stable and concise skeleton and outperform several state-of-the-art methods.