1: \begin{abstract}
2: We study the character theory of metabelian and polycyclic groups. It is used to investigate Hilbert--Schmidt stability via the character-theoretic criterion of Hadwin and Shulman.
3: There is a close connection between stability and dynamics of automorphisms of compact abelian groups.
4: Relying on this, we deduce that finitely generated virtually nilpotent groups, free metabelian groups, lamplighter groups as well as upper triangular groups over certain rings of algebraic integers are Hilbert--Schmidt stable.
5: \end{abstract}
6: