Research led by scientists associated with the American Museum of Natural History suggests that the giant reptiles of the age of the dinosaurs were descendants of a very tiny ancestor, shedding light on how the characteristics of dinosaurs and flying pterosaurs evolved.
About 237 million years ago, during the Middle Triassic period, a 4-inch-tall (10-cm) insect-eating reptile lived in the primordial jungles of what is now Madagascar. Called Kongonaphon kely (tiny bug slayer), this animal sits near the root of Ornithodira, which is the part of the class Reptilia that includes the common ancestors of dinosaurs and pterosaurs.
Part of this analysis involved a study of tooth wear of Kongonaphon, which indicates that it ate insects. This shift in diet would cause its ancestors to miniaturize, but also increase its survival chances by filling an ecological niche not exploited by its carnivorous relatives. In addition, such small bodies would have a very large surface to volume ratio, meaning that they would get cold fast, Since the late Middle Triassic was a time of climate extremes, this suggests that they developed the fuzzy skin coverings found on many dinosaurs and pterosaurs, which later evolved into feathers.
https://newatlas.com/biology/giant-dinosaurs-evolved-tiny-insect-eaters/