Effective sneak attacks with spells [closed]

Update: Turns out there was an FAQ in 2013 which states that spells like scorching ray only get sneak attack applied ONCE (or to one ray) instead of each ray getting the sneak attack. Due to this the build becomes basically worthless for what the goal was.End Update.

I am trying to build a caster who also does sneak attack damage with their spells. This is for a gestalt game but would like help on accomplishing it if it was normal.

The problems that I have encountered are:

  • There are very few spells which have multiple ray attack rolls and deal lethal damage such as Scorching Ray and Contagious Flame. I am trying to avoid spell/feat creation.
  • To deal sneak attack you have a limited setting in which it can be used
  • before they act in combat
  • flanking (but ranged touch attacks dont benefit from flanking)
  • sniping (which implies greater invisibility basically every combat)
  • arcane trickster prestige class
  • Sneak attack rules on spells a little vague, best examples come from arcane trickster.
  • AoE spells normally cant benefit (arcane trickster can allow this)
  • Single ray spells benefit once as expected
  • no attack roll but multiple rays like magic missile only get one sneak attack applied even if each hits a different target
  • Unclear how spells like Scorching Ray have it applied. Either each ray gets it or only one ray.
  • DoT spells like acid arrow, is it applied only on the first hit or is it dealt each round?

So while its entirely possible to do sneak attack damage with spells, the rather small selection of multiple ray attacks and the restrictive conditions required to benefit from sneak attack makes it very challenging to use reliably.

My plan was to take wizard or Arcanist on one side and rogue (or something) on the other. The arcane trickster while interesting, doesnt really help.