TL;DR: "at school" and "in school" are basically the same. You won't get yourself into trouble by using them the same way. This is almost always true when the verb is "learn", except for one corner case that I'll discuss below.
The long answer is that "school" can have several different, but related, meanings, and sometimes it sounds better with one or the other preposition.
In the example sentences you gave, "school" is a metonym that refers to the act of attending classes at some institute of learning. So "things you'll never learn [at / in] school" are things you won't learn by attending classes at some institute of learning. Any time that's the intended meaning, it's correct to use either "at" or "in".
On the other hand, sometimes you say "at school" to mean the actual location where the learning takes place. In those cases you usually have to say "at school" and not "in school". If you literally mean that something is inside the school location, you'd usually say "in the school" or "in the school building".
The border between these two uses can be very fuzzy. For example:
"Where's Bob?"
"He's at school / He's in school."
If we say "He's at school", it implies Bob is at the school building (probably attending classes). If we say he's "in school", it means he's currently attending classes at an institute of learning. In the example I just gave, it doesn't matter, but then we have:
"What's Bob doing these days?"
"He's in school."
While not wrong, it sounds a bit odd to reply that he's "at school" in this example.
One more example, specific to "learn":
"He learned French in school" means he learned French from attending classes at an institute of learning.
"He learned French at school" can mean the same.
But:
"He learned those bad habits at school" means the location where he learned bad habits was the school. Here "school" is the physical meaning. If we say "He learned those bad habits in school", then "school" is metonymy; it means that he learned bad habits from the process of attending classes. It strongly implies that the classes taught him the bad habits, whereas "He learned those bad habits at school" doesn't. The simplest way to understand this distinction is probably: If a professor taught him bad habits, he learned them "in school". If other kids or the janitor or random people who walked onto the campus taught him bad habits, he learned them "at school". If a professor taught him French, he learned it "in school" or "at school". If his French girlfriend taught him French, he learned it "at school". This is the only case I can think of where it makes a difference whether you learned it "in school" or "at school".
There are many kind of pronouns like personal pronoun, demonstrative pronoun, relative pronoun etc. Pronouns regardless of their classification can occur after preposition. The thing that needs to take care of is the case of a pronoun that comes after a preposition.
Notes from Fowler's Modern English Usage -
After a preposition the objective (accusative) form of a pronoun, where it differs from the subjective (nominative) form, must always be used.
For example -
i) Believe in him.
ii) Between us.
iii) For them.
This is especially important when two pronouns are linked by and or or. For example -
Between you and me (not I)
A gift from my brother and me (not I)
asked if there was any chance of him (not he) and Gina reconciling.
Some more examples -
Who is a relative or interrogative pronoun. Who is the subjective form, whose is the possessive form, and whom is the objective form. Now if I want to use that pronoun after a preposition, the objective form whom should be used according to the rule stated by Fowler.
To whom does it matter? (not who or whose)
Everybody is a indefinite pronoun. There is no difference between subjective form and objective form. In both form it's everybody, but the possessive form is everybody's
It's clear to everybody.
The demonstrative pronoun those has no difference in subjective form and objective form.
It concerns to those who failed to obtain the minimum qualifying marks.
Hope this helps....
Best Answer
Your intuition is right. The customary preposition there is “at”:
This search on Google Books brings up 2,700 results.
The reason for “at” is to indicate a location without regard to its shape or structure. If you imagine the job as a location, there are metaphorical “ropes” there which you have to learn. At other locations, “the ropes” are different.
It’s natural to say in or of when referring to a subject or a skill:
A job naturally has a location, but science doesn’t, so “at” would sound wrong there.
This search on Google Books brings up 7,850 results.
You can say this:
but it suggests that by “new job” you mean the occupation in general, not the specific place where you work. For example, you might learn the ropes of real estate by learning the ropes at Century 21. It's not wrong to say that you’re learning the ropes of Century 21, though.