The Nitrogen Fix is a 1980 science fiction novel by Hal Clement. The plot revolves around a nomadic family in a future where all oxygen in the Earth’s atmosphere has combined with nitrogen, so the atmosphere is mostly nitrogen with traces of water, nitrogen oxides and carbon dioxide, and the seas are very dilute nitric acid.
The family is allied with an alien, an octopus-like being who can survive in the new atmosphere. Humans must live in shelters with oxygen-generating plants, or use suitable breathing equipment. Some of Earth’s original life forms have mutated to survive in the changed atmosphere. Since almost no metals can exist in the corrosive atmosphere, any technology is based on ceramics or glass.
Some humans are suspicious of the aliens, and even blame them for the change to the atmosphere, since they seem to be adapted for it. The family have an almost fatal encounter with a group of such people, who are holding another alien hostage. However, the two aliens are able to pool memories biochemically, so that they become the same personality in two bodies. Their combined knowledge and skills help the humans to escape.
At the end the aliens reveal that they are basically tourists or scientists, and they travel from one system to another over thousands of years. Atmospheres “mature” when the nitrogen absorbs all the oxygen, the cause being the inevitable evolution of bacteria that use gold to catalyze the reaction. It is hinted, but not stated outright, that human mining of gold triggered this reaction.