This came from a conversation I had with a friend: is it possible for a PC necromancer to raise or create undead with class levels? The specific example that sparked this was the possibility of conjuring one or more skeletons with the Bonesinger template from Ghostwalk (+0 LA) and levels in Bard, and have them all use their bardic music to support you and your party.
Creatures Can't Add Levels Because of Necromancy
Gazoo the necromancer can't just cast the spell animate dead [necro] (PH 198-9) and make any ol' corpse into a ghoul and add 2 levels of fighter to it. That can't happen. There shouldn't be any way to create creatures and, during their creation, add new class levels to them because of necromancy.
When the spells animate dead and create undead [necro] (PH 215) et. al. are used, the corresponding creature or template in the Monster Manual is used. For example, despite a necromancer being able to create 12 Hit Dice of undead, he can't create a ghoul and add to that ghoul 10 levels of sorcerer.
The game doesn't allow such shenanigans. Were such a creature permitted (in addition to a host of other problems it'd introduce), when the ghoul Sor10 is destroyed and the remains subsequently targeted by the spell raise dead [conj] (PH 268), the creature brought back from the dead would be as he was before he died plus 10 levels of sorcerer--and, of course, down 1 level because of the effects of the spell raise dead. Maybe, anyway. I don't know. It's impossible to say. The rules just don't accommodate things that the rules don't accommodate, y'know?
However, Creatures Can Keep Their Levels Despite Necromancy
The following undead can be created and retain the abilities they had in life. Some creatures have additional requirements for their creation beyond what's listed.
Only the bone creature, bonesinger, corpse creature, and necropolitan templates are from non-Forgotten Realms sources. (At a guess, that's because Faerûn has a greater number of higher level creature so more options were developed to exploit that resource.) There are, undoubtedly, other templates available as this list ignores Dragon and Dungeon magazine and Web content. Note: The template lich (MM 166-8) (and, by extension, the template lichfiend (LM 156-8)) is more the product of becoming rather than creation, but creatures with the template lich also retain the abilities they had in life.
"Specifically, What about Bonesingers?"
Needless to say, if a PC necromancer knows where the bards are buried--especially if he knows where there's buried a dragon or something equally impressive who was at least a Brd1--he better get graverobbing now. Other necromancers'll swoop on those corpses fast.
"What's So Special about Skeletal Warriors?"
Uniquely, the skeletal warrior template can be bestowed upon a corpse without casting spells, employing artifacts, or performing rituals--anyone with the feat Craft Wondrous Item (PH 92-3), money, time, and XP can bestow the template upon a creature.
Templates Acquired via DM's Discretion