In this article, an improvement is proposed for bat algorithm and it is utilized for size optimization of skeletal structures consisting of truss and frame structures. Various optimization problems are implemented to demonstrate the ability of the enhanced bat algorithm. These numerical examples are along with different constraints and loading conditions such as stress, displacement and frequency constraints, static and time history dynamic loadings. Furthermore, these optimization problems are in two form of discrete and continuous. Results show the suitability and efficiency of the present algorithm for optimal design of skeletal structures.