I didn't see this done yet, so I decided to make the insane dwarves of the underground, the Derro. I hope it's alright.
4+int modifier per level, quadruple at 1st level. The Derro's class skills (and the key ability for each skill) are Bluff (Cha), Concentration (Con), Craft (Int), Intimidate (Cha), Hide (Dex), Listen (Wis), Move Silently (Dex), Profession (Wis), Sense Motive (Wis), and Spot (Wis).
: A Derro is proficient with simple weapons, light martial weapons, and all martial and exotic crossbows (which they treat as martial weapons). They are also proficient with light armor and with shields (but not tower shields).
Derro Body: At 1st level, a Derro loses all other racial bonus and gets monstrous humanoid traits (darkvision 60 feet, basically). Derro are Small sized monstrous humanoids. They have a base speed of 20 feet.
A Derro gains a natural armor bonus to its Armor Class equal to one half of its Constitution modifier (minimum +0). Insane Derro may use half their Charisma modifier instead, and sane Derro may use half their Wisdom modifier instead.
Ability Boost: A sane Derro gains a +2 racial bonus to his Wisdom score, while an insane Derro instead gains a +2 racial bonus to his Charisma score. At 2nd level, this bonus increases by 1 (to a total of +3), and the Derro gains a +1 racial bonus to his Constitution score. At 3rd level, both of these bonuses increase by 1 once more (to a total of +2 to Constitution and +4 to Wisdom or Charisma).
Conflicted Mind: A Derro's mind is one of madness. Some Derro can break free of its hold upon them, but most succumb to it entirely. The madness is so pervasive that insane Derro are considered the norm.
At 1st level, a Derro must choose whether to be sane or insane. A sane Derro gains bonuses to his Wisdom score, the Focused Mindscape ability, the ability to eventually use lesser restoration as a spell-like ability, and can use his Wisdom modifier in place of his Constitution modifier to determine his racial natural armor bonus to Armor Class. An insane Derro gains bonuses to his Charisma score, the Broken Mindscape ability, the ability to eventually use sound burst as a spell-like ability, and can use his Charisma modifier in place of his Constitution modifier to determine his racial natural armor bonus to Armor Class. See the relevant abilities for details.
Once chosen, a Derro cannot choose to become sane or insane again without help. A sane Derro who willingly subjects himself to an insanity spell or another effect that causes insanity permanently becomes an insane derro. An insane Derro who willingly subjects himself to a greater restoration spell, a wish or miracle used to remove the insanity, or another effect that removes insanity permanently becomes a sane Derro.
Derro Skills: Derro gain a racial bonus on all Hide, Move Silently, and Craft (poisonmaking) check equal to twice their Derro level.
Broken Mindscape (Ex): An insane Derro's mind is shattered almost beyond repair. Any attempts to contact or influence it are more difficult than normal and are fraught with peril. Sane Derro do not gain this ability.
At 1st level, an insane Derro may use his Charisma modifier in place of his Wisdom modifier to determine his bonus on Will saves.
At 2nd level, an insane Derro gains immunity to some of the effects that would alter his mind. Initially, this manifests as immunity to the confused condition. As he gains additional hit dice or levels, the Derro's resistance improves. A Derro with 6 HD or more is immune to charm and compulsion effects. A Derro with 12 HD or more is immune to fear. A Derro of 18 HD or more is immune to all mind-affecting effects.
Starting at 3rd level, any attempts to contact an insane Derro's mind come with great risk. Any creature attempting to communicate telepathically with the insane Derro or to read his thoughts must make a Will save (DC 10 + 1/2 the Derro's HD + the Derro's Charisma modifier) or suffer 1d6 points of Wisdom damage and be rendered confused for a like number of rounds. If the Derro has 8 or more HD, this improves to 1d12 points of Wisdom damage and rounds of confusion. If the Derro has 16 or more HD, half of the Wisdom damage is instead Wisdom drain, and if the creature attempting to contact the Derro's mind fails the initial Will save, it must make a second Will save or be rendered permanently confused. This confusion can be fixed in the same manner as an insane Derro's racial insanity. This aspect of this ability is a mind-affecting effect.
Any insane Derro may suppress or resume one or more aspects of this ability as a free action, even when it is not his turn. He may also simply choose not to apply some aspects of this ability towards specific creatures, effects, or events.
Focused Mindscape (Ex): A sane Derro's mind is frayed and tattered, but incredibly resilient. Any attempts to contact or influence it are prone to failure. Insane Derro do not gain this ability.
At 1st level, a sane Derro may use his Wisdom modifier in place of his Charisma modifier to determine his bonus on Bluff, Diplomacy, Intimidate, and Use Magic Device checks (these are still considered Charisma-based skills).
At 2nd level, a sane Derro gains resistance to some of the effects that would alter his mind. Initially, this manifests as immunity to the confused condition. As he gains additional hit dice or levels, the Derro's resistance improves. A Derro with 6 HD or more can ignore invisibility, glamers, and figments, automatically detecting those illusions for what they are and negating their effects on his senses. A Derro with 12 HD or more is automatically aware of any attempts to scry on him, and automatically notices all scrying sensors within line of sight. A Derro of 18 HD or more can see everything as it truly is, as per a true seeing effect.
Starting at 3rd level, any attempts to contact a sane Derro's mind will be rebuffed. A sane Derro is automatically aware of any attempts to communicate telepathically with him or read his mind, and can pinpoint the exact location of any creature that attempts to do so. If the Derro has 8 or more HD, the communicating creature must make a Will save (DC 10 + 1/2 the Derro's HD + the Derro's Wisdom modifier) or be dazed for 1 round and suffer 1d6 points of nonlethal damage per three HD of the Derro. If the Derro has 16 or more HD, the creature attempting to contact the Derro's mind is instead dazed for 1d4 rounds on a failed saving throw and if it fails the initial Will save, it must make a second Will save or be rendered comatose by the focused sanity of the Derro's mind. This comatose state can be fixed in the same manner as granting a sane Derro its racial insanity. This aspect of this ability is a mind-affecting effect.
Any sane Derro may suppress or resume one or more aspects of this ability as a free action, even when it is not his turn. He may also simply choose not to apply some aspects of this ability towards specific creatures, effects, or events.
Sneak Attack (Ex): At 1st level, a Derro gains the ability to make sneak attacks, as per the Rogue ability of the same name. Initially, this allows them to add +1d6 damage to any attacks that qualify. This improves by +1d6 at every odd Derro level thereafter.
Spell-like Abilities (Sp): Derro have a natural affinity for magic. Starting at 1st level, a Derro may use ghost sound once per day per HD he possess. Starting at 2nd level, he may also use darkness once per day per HD he possess. Starting at 3rd level, a sane Derro may use lesser restoration once per day per point of Wisdom bonus (minimum 1/day), while an insane Derro may instead use sound burst (Will DC 12 + Cha) once per day per point of Charisma bonus (minimum 1/day). The caster level for these spell-like abilities is equal to the Derro's total HD. The save DCs are equal to 10 + the spell's level + the Derro's Charisma modifier. A sane Derro may instead use his Wisdom modifier to determine the save DCs of these spell-like abilities.
Sunlight Vulnerability (Ex): Direct exposure to sunlight is harmful to Derro. Any Derro exposed to sunlight for at least 1 minute is fatigued. If he remains exposed for 1 hour, he is instead exhausted. The Derro automatically recovers from this after he spends at least as long underground or otherwise sheltered from the sun as he did exposed to the sun. A thick cloak and a face concealing hood (or similar protection from direct exposure) can protect a Derro from the sun while worn.
Efficient Poison Use (Ex): Starting at 2nd level, a Derro never risks poisoning himself when applying poison to a weapon. This ability functions as per the Assassin ability of the same name.
In addition, Derro have special techniques to improve the longevity of a poison upon a weapon. A Derro who poisons a weapon can choose to increase the poisons longevity at the cost of its potency. Such a poison has a save DC equal to one half its normal save DC plus the Derro's HD, or its normal save DC, whichever is less. However, that poison applies to the first attack each round made with the poisoned weapon within the next 24 hours, or until it is wiped clean or replaced with a new poison. Projectile weapons can be poisoned this way, in which case they bestow the poison to the first projectile that they launch each round.
Finally, the Derro techniques used to efficiently use poison also extend to efficiently making it. Once per day, a trained Derro can make a single dose of a special blend of Greenblood Oil at no cost with 1 hour's work, a DC 20 Craft (alchemy or poisonmaking) check, and a variety of inexpensive and readily available materials. Such a poison has a Fortitude save DC equal to 10 + one half the Derro's HD + the Derro's Constitution modifier, but only lasts for 24 hours before losing its potency. A 4 HD Derro also learns how to make a similar poison equivalent to a medium monstrous spider's venom, a 10 HD Derro can make a poison equivalent to giant wasp venom, a 14 HD Derro can make a poison equivalent to wyvern poison, and a 20 HD Derro can make a poison equivalent to black lotus extract.
Spell Resistance (Ex): A 3rd level Derro gains spell resistance equal to 11 + his total HD. He can raise or lower his spell resistance without an action, even when it is not his turn, and even when he is unconscious or unaware.
Derro! They're nuts! Or maybe they're sane, but still nuts in their sanity! Either way, it's a party 24/7 in their head, and their invitation was lost in the mail so they have to crash it. Or maybe avoid it. I dunno. Cookie?
Derro are these creepy little insane dwarven/human hybrids. Or maybe just degenerate dwarves. I dunno. Either way, they're all insane, except a few that aren't, but they're considered insane by the insane because insane is the way of life. Giant frogs need not apply.
The original is a sneaky little insane bastard. They keep the original's sneak attack and poison use, along with their preference for exotic crossbows (given through proficiency). The rest of their proficiencies are similar to a simplified version of the Rogue's proficiencies.
Derro get to pick between sanity and insanity, getting some different abilities for each. It's really two very similar races in one. They can switch between if needed, but it takes some higher level spells to do so.
The Derro's racial skill bonuses and poison use make them skilled assassins. They have special poison use and creation techniques that allow them to poison their enemies with impunity.