The doping response of the prototypical transparent oxides NiO ($p$-type), ZnO ($n$-type), and MgO (insulating) is caused by spontaneous formation of compensating centers, leading to Fermi-level pinning at critical Fermi energies. We study the doping principles in these oxides by first-principles calculations of carrier-producing or -compensating defects and of the natural band offsets, and identify the dopability trends with the ionization potentials and electron affinities of the oxides. We find that the room-temperature free-hole density of cation-deficient NiO is limited by a too large ionization energy of the Ni vacancy, but it can be strongly increased by extrinsic dopants with shallower acceptor levels.