Here is a spell I developed for the newest run of GUCK, but since it isn't being put together, I thought I'd post it here.
----------------------
Reverse Gendered Clone
Necromancy
Level: Sor/Wiz 8
Components: V, S, M, F
Casting Time: 30 Minutes
Range: 0 ft.
Effect: One clone
Duration: Instantaneous
Saving Throw: None
Spell Resistance: No
This spell creates an inert duplicate of the opposite gender of one creature. If the original individual is slain, its soul immediately transfers to the reverse gendered clone, creating a replacement (provided the soul is free and willing to return; see Bringing Back the Dead; PHB pg 171). The original’s physical remains, should they still exist, become inert and cannot thereafter be restored to life. If the original creature has reached the end of its natural life span (that is, it has died of natural causes), any cloning attempt fails.
To create the duplicate, you must have a piece of flesh (not hair, nails, scales, or the like) with a volume of at least 1 cubic inch that was taken from the original creature’s living body and part of the anatomy of the gender of the clone to be made. The piece of flesh and the piece of anatomy from the desired gender need not be fresh, but it must be kept from rotting. Once the spell is cast, the duplicate must be grown in a laboratory for 3d4 months.
When the clone is completed, the original’s soul enters it immediately, if that creature is already dead. The clone is remarkably physically identical to the original, so that the people that knew the original as the other gender automatically identify the reverse gendered clone as the original. The reverse gendered clone possesses the same personality and memories as the original. In other respects, treat the clone as if it were the original character raised from the dead, including the loss of one level or 2 points of Constitution (if the original was a 1st-level character). If this Constitution adjustment would give the clone a Constitution score of 0, the spell fails. If the original creature has lost levels since the flesh sample was taken and died at a lower level than the clone would otherwise be, the clone is one level below the level at which the original died.
The spell only creates a reverse gendered clone of the original's body and mind, not its equipment.
The reverse gendered clone can be grown while the original still lives, or when the original soul is unavailable, but the resulting body is merely a soulless bit of inert flesh, which rots if not preserved.
Material Component: The piece of flesh, a part of the opposite gender’s anatomy and various laboratory supplies (cost 2,000 gp).
Focus: Special laboratory equipment (cost 1,000 gp).