Statistical (Boltzmann) entropy of a (thermodynamic) system is defined as
(The logarithm of) the amount of microstates corresponding to the (thermodynamic) macrostate of the system.
So, in way of the standard example, a system consisting of two connected heat reservoirs in thermal equilibrium has higher thermodynamic entropy than any other distribution of the same total heat energy among the reservoirs.
On the other hand, thermodynamic (Clausius) entropy I have heard to describe
The amount of useful work that can be extracted by a system.
This, to my current intuition, seems to contradict (in fact, invert) the above scenario, as thermodynamic equilibrium is the sole macrostate where no useful work can be extracted from the system whereas any different (lower statistical entropy) distribution where one reservoir is hotter than the other allows for some work to be extracted.
Therefore, my intuition must be wrong. Please point out the mistake(s).
My background is pure mathematics and information theory, only very little physics.
(Another angle: Szilard's engine seems to match my intuition. A bit of mutual information between the world state and my model of it ("knowledge"), which is (statistical) negentropy, can be used to extract work.)