In this article, for an optimal range of the smoothness parameter s that depends (quantitatively) on the geometric makeup of the underlying space, the authors identify purely measure theoretic conditions that fully characterize embedding and extension domains for the scale of Hajłasz–Triebel–Lizorkin spaces Mp,qs and Hajłasz–Besov spaces Np,qs in general spaces of homogeneous type. Although stated in the context of quasi-metric spaces, these characterizations improve related work even in the metric setting. In particular, as a corollary of the main results of this article, the authors obtain a new characterization for Sobolev embedding and extension domains in the context of general doubling metric measure spaces.