Applying the generalization of the model for chain formation in break-junctions (Di Napoli et al 2012 J. Phys.: Condens. Matter 24 135501), we study the effect of light impurities on the energetics and elongation properties of Pt and Ir chains. Our model enables us to develop a tool ideal for detailed analysis of impurity-assisted chain formation, in which zigzag bonds play an important role. In particular we focus on H (s-like) and O (p-like) impurities and assume, for simplicity, that the presence of impurity atoms in experiments results in a ..M-X-M-X-... (M: metal, X: impurity) chain structure in between the metallic leads. Feeding our model with material-specific parameters from systematic full-potential first-principles calculations, we find that the presence of such impurities strongly affects the binding properties of the chains. We find that, while both types of impurities enhance the probability of chains being elongated, the s-like impurities lower the chain's stability. We also analyze the effect of magnetism and spin-orbit interaction on the growth properties of the chains.