The shapes of branching trees have been linked to disease transmission patterns. In this paper we use the general Crump‒Mode‒Jagers branching process to model an outbreak of an infectious disease under mild assumptions. Introducing a new class of characteristic functions, we are able to derive a formula for the limit of the frequency of the occurrences of a given shape in a general tree. The computational challenges concerning the evaluation of this formula are in part overcome using the jumping chronological contour process. We apply the formula to derive the limit of the frequency of cherries, pitchforks, and double cherries in the constant-rate birth‒death model, and the frequency of cherries under a nonconstant death rate.