Metallic elements having negative enthalpies of mixing tend to form characteristic local atomic clusters. In this review, we use the structural information in the first nearest neighbour shell level, or first-shell atomic cluster, to derive the composition rules of two types of complex alloy phases, quasicrystals and bulk metallic glasses, both being composed of elements with negative enthalpies of mixing. We first show the composition phenomena in quasicrystal-forming systems, where major composition rules such as cluster line, electron concentration and atomic size criteria are derived. Then we analyse the composition rules of bulk metallic glasses using the very same approaches. Finally, we summarize their common composition rules into more general rules and basic theories.