There is already a mod that adds the option to edit any character in the CAS from their interaction menu.
http://www.modthesims.info/showthread.php?t=437510&c=1&ht=&page=8&pp=25#startcomment
It also Requires you to place d3dx9_31.dll in game/bin. You can get that file from the same place.
It does work on NPC's as well, but weight/muscle always seems to snap back to the original settings(changes in the face stay) and clothing changed through the mod doesn't change(but you can just use plan outfit). Choose the clothing you want them in before editing an NPC, because that resets thier weight/muscle.
Don't change any names or traits through the CAS, or you can't interact with them anymore(includes your characters). The traits can be changed with cheats.