Oh god no.
I agree with Olgar upthread; PC-style special abilities are fine for monsters, but actually tacking on class levels leads to massive stat block bloat. If you notice, for example, how spellcasting is handled, the spellcasting trait just gives the spells, not any class features or HD.
My recommendation would be to look at the lair powers for monsters and see how those adjust the CR, then compare with the PC abilities you want to add. Also keep in mind that you should always go for a conversion in spirit rather than according to the literal mechanics. For example, a kenku Rog6/Rgr1/Asn10 (see "Library of Last Resort" in the Age of Worms adventure path) can be statted out as a standard assassin NPC (5e MM, pg. 343) advanced to CR 17 (guidelines in the DMG, I'm guessing) with the kenku's Ambusher and Mimicry traits. It's up to you as to whether the Ambusher trait moves the needle on CR; I'd be inclined to say it doesn't.
Similarly, a Gnoll Rgr2 could probably just be replaced with the Gnoll Pack Lord; if you wanted to make it more "ranger-y," perhaps remove the Incite Rampage trait and give the gnoll the benefits of the archer fighting style (ie change the longbow attack to +6 to hit) and the hunter's mark power (+1d6 damage and advantage on Perception and Survival checks against a single target the gnoll can see). That's fast and easily identifies the creature as a "gnoll ranger."