(idiomatic) Favorable regard; personal approval; kindly treatment.
Synonym:good graces
Antonyms:bad books, black books
If you want to stay in his good books, just don't be lazy or dishonest.
We managed to stay in their good books by keeping our noses clean.
1849, Currer Bell [pseudonym; Charlotte Brontë], “Fieldhead”, in Shirley. A Tale.[…], volume I, London: Smith, Elder and Co.,[…], →OCLC, pages 299–300: