This is in some sense a follow up to the question asked here [Properties of the category of compact Hausdorff spaces](https://mathoverflow.net/questions/382348/properties-of-the-category-of-compact-hausdorff-spaces)


To clarify: The category $\text{Prof}$ of profinite sets sits inside the category $\text{CHaus}$ of compact Hausdorff spaces in a nice way. Every compact Hausdorff space $X$ can be covered by a profinite set (specifically the stone Czech compactification of the underlying set of $X$). $\text{Prof}$ can be characterized by a universal property without reference to the category of topological spaces: It is the free completion of the category $\text{Fin}$ of finite sets under cofiltered limits.


Since $\text{CHaus}$ is, unlike $\text{Top}$, a category that is quite nicely behaved (it is for example the category of algebras for the ultrafilter monad on sets), it seems natural to ask: Can it also be characterized as a category by a universal property similar to $\text{Prof}$?



Is there a universal property characterizing the category of compact Hausdorff spaces?
I definitely expect that there is much more than one good answer. But, here is one that one can get easily by just patching together several classical facts:


1. The category of compact Hausdorf topological space is the category of algebras for the ultrafilter monad.
2. the Ultrafilter monad is the codensity monad for the inclusion of finite set into sets. If I'm not mistaken, it follows that it is terminal for monads on sets such that $ S \to M(S)$ is an isomorphism for all finite sets $S$.
3. the category of monads on $Set$ is equivalent to the opposite of category of monadic right adjoint functors $C \to Set$, or equivalent to the category of monadic left adjoint functor $Set \to C$


So that we get:


**Theorem:** The category of compact Hausdorff spaces, together with its forgetful functor to the category of set is initial in the category of Monadic right adjoint functor $U: C \to Set$ such that the left adjoints $L: Set \to C$ is fully faithful when restricted to finite sets.


**Theorem:** The category of compact Hausdorff spaces, together with the Ultrafilter space functor $\beta: Set \to C$ is terminal in the category of monadic left adjoint functor that are fully faithful when restricted to finite sets.


There are many way to twist this, for example using that $U$ is $Hom(1,\\_)$, or writing the universal property of the codensity monad some other way (the way of writing I chose is maybe a bit atypical...) but it depends what kind of universal property you like


