A long time ago, the ability to see wards, immunities, resistances, and vulnerabilities with the "Examine" command was removed.
I wonder if it's possible that it could be reintroduced with a Spellcraft and lore DC
Spellcraft would allow you to see the creature's wards and the DC is determined by the highest level ward cast on it. Failing the DC means you don't get to see any of the wards on the target. So a creature with just mage armor cast on it is easier to examine for wads than one with "Undeath's eternal foe". Maybe illusion spells like invisibility and improved invisibility add DC based on the caster's spellcraft?
And maybe something like a low level "Detect magic" could make it an auto-success?
Lore allows you to see the creature's natural resistances and vulnerabilities, and the DC is determined by the creature type rarity and challenge rating. So it would be easier to examine a fire elemental than a fire elemental prince (same race, different challenge rating), and it would be easier to examine a skeleton than an eyeball (different races, one with much more rarity than the other)