Spymaster Handbook added a new use for Knowledge checks:
Recall Intrigues (Knowledge)
You can identify feats and the class features of various classes with successful Knowledge checks when you observe the feats or class features being used.
Check: You can attempt a skill check to identify a feat or class feature when you observe it in use, similar to how Spellcraft can be used to identify a spell. The feat or class feature must have some observable effect in order for you to attempt the Knowledge check. For example, you can’t see the internal determination of Iron Will, so this ability can’t identify that feat. In general, if a feat or class feature creates a noticeable effect (such as the extra attack from using Cleave) or has a variable modifier a character must choose to use (such as Arcane Strike, Combat Expertise, or Enlarge Spell), it can be identified. If it creates a static bonus (such as Dodge or Lightning Reflexes), there’s no telltale sign to give it away.
The Knowledge skill required to identify a feat or class feature varies depending on the type of feat or class feature to be identified and is outlined in the Recall Intrigues (Knowledge) table above, along with the DCs of such skill checks.
If you can observe an NPC using one of its abilities, and you are able to identify it, then you can learnin character what class he is, and can gauge his strength (at least you'll know that that he is strong enough to be able to use that ability).
It may not seem like much, but without this check, even if a player recognizes an ability, it remains an out-of-character knowledge.
It's a meta mechanic that you really shouldn't know because it has no real, in-world meaning.
Which, of course, means there are mechanics to give you this information that should be an abstraction in no uncertain terms.
The Occult skill unlock for Knowledge: Arcana is Phrenology. If you can fondle someone's head for a while and make a DC 25+HD skill check, you can determine their level and HD. Along with a bunch of other information.
This option is available to all psychic casters and anyone with the Psychic Sensitivity feat.
I would figure from a dms perspective if a character interacted with citizens in a small small thorpe say 70ish inhabitantes after a week or so he would be able to know who the level 1 npcs are who the level 2-4 npcs are and who the level 5-7 npcs are.
Hmm, if one of my players would spend a whole WEEK on registering low level NPCs' levels, I'd ask myself what went wrong. The PC is supposed to be on adventures, and the player is supposed to have fun on adventures. Yeah, there is downtime, but even this time should offer more interesting things to do.
Finally, as a GM I'd be tempted to let suspicions arise. There is a person in the village who tries to speak to everyone, with no real reason - isn't that fishy? The shopkeeper said he uses some magic to measure his life experience - maybe he wants our souls? Someone who works for daemons would actually do this registering first, the local witch said...
My table has always used [Int+BAB] to know more crunchy things about creatures, like to know that the guy wearing Full Plate remaining flexible and limber is a Fighter (Fighters get Armor Training). Number of HD was never a part of this, but if it ever needed to come up (do I think I could cast Sleep on this bartender?) I guess we'd still use it.