The question asks for the rules as written. So far as I'm aware, no text follows up on how to use properly the 1st-level Sor/Wiz spell nerveskitter [trans] (Spell Compendium 146–7), the 4th-level Sor/Wiz spell celerity [trans] (Player's Handbook II 105), or the 5th-level Sor/Wiz spell contingency [evoc] (Player's Handbook 213). The game just didn't go in that direction: After a book shipped, only rarely did Wizards of the Coast revisit the material at any useful length. And, now, there's nothing new for 3.5 forthcoming. So here I'll be doing the best I can with the rules, my experiences, and my opinions. I hope that's enough.
In the surprise round aware combatants make initiative checks
The Surprise Round, in part, says, "Any combatants aware of the opponents can act in the surprise round, so they roll for initiative" (PH 137). This implies an exception to Initiative Checks that, in part, says, "At the start of a battle, each combatant makes an initiative check" (136). Hence unaware combatants don't even make Initiative checks until after the surprise round and before the first normal round of combat, and this order of operations prevents unaware combatants from casting the nerveskitter spell during the surprise round.
See, the description of the nerveskitter spell starts by saying, "You cast this spell when you and [n.b. not or] your party roll for initiative." Further, when the spell's description says, "If the subject does not make an initiative check within 1 round, this spell has no effect," it's accounting for the surprise round: during the surprise an aware caster round can cast the nerveskitter spell on an unaware party member so that the party member gains the spell's benefit when that party member finally makes it's initiative check: after the surprise round and before the first normal round.
Contingent nerveskitter probably works
A caster can cast the spell contingency, pick as its companion spell the nerveskitter spell, and pick as the contingency spell's activation condition When a creature with hostile intent approaches me. (A caster can pick pretty much anything as the contingency's spell's condition, but the contingency spell activates when the DM believes that condition met. Choose wisely and see here.)
When a creature that possesses hostile intent approaches the caster, the condition will be met for the contingency spell and the nerveskitter spell will be cast. However, unless that creature's approach also signals the start of an encounter and the DM has appropriate combatants make initiative checks, the nerveskitter spell will fail. Otherwise, though, it'll work as imagined: essentially gaining the caster an immediate action. At least, that's what this DM would have happen. A more conservative DM could rule that the nerveskitter spell is cast in response to the hostile creature's approach—before the DM calls for initiative checks—therefore the contingent nerveskitter spell will always fail. To this player, that seems pretty severe for a relatively tame contingency spell condition and spell, but it's the contingency spell: It's rarely not a source of strife.
(Note that this DM would ask for further clarification if presented with the contingency spell condition When a creature with hostile intent approaches me. That's a little too broad for the omniscient superliteral interpreter that processes contingency spell conditions in my campaigns.)
Nerveskitter into a contingent celerity maybe doesn't work…
Similarly, a caster could cast the spell contingency, pick as its companion spell the celerity spell, and pick as the contingency spell's activation condition When I cast the nerveskitter spell. Then, when the DM calls for initiative checks, the caster casts the nerveskitter spell therefore meeting the conditions of the contingency spell and the celerity spell is cast. And, after all that, it's possible that this celerity spell simply fails, too.
Here's why: The celerity spell's description says, "When you cast this spell, you can immediately take a standard action, as if you had readied an action," but the special initiative action ready mandates a trigger. Normally, it's easy to discern the trigger for the action granted by the celerity spell: somebody takes a poke at the caster or a bad guy casts a spell or whatever and—cue theremin—a celerity spell.
But, in this case, a character cast a celerity spell when the players are making initiative checks. The Dungeon Master's Guide on Adjudicating the Ready Action, in part, says, "Don’t allow players to use the ready action outside combat" (26), preventing the caster from picking as a trigger anything that happened before the DM asked players to make initiative checks. My limited imagination leaves me with only two things that could work as ready action triggers in this situation: 1) weirdly self-referential stuff that's likely to be rejected by the DM, and 2) another caster's similar nerveskitter-contingency-celerity combo. Otherwise, the conditions for casting the celerity spell have probably gone unmet because there's nothing for the granted action to trigger off of.
…Unless it does
On the other hand, a DM could read When you cast this spell, you can immediately take a standard action, as if you had readied an action as a comparison rather than as explicit instructions to follow other game rules. That's okay, but it's dangerous for the campaign. In this case, the caster takes the standard action granted by the celerity spell while the players make initiative checks for their characters (including the player of the character that cast the celerity spell and that's likely the subject of a nerveskitter spell). Starting at the celerity spell-granted action's conclusion, the caster is flat-footed until the beginning of her first turn and dazed until the end of her first turn. (The dazed condition doesn't affect initiative checks.) (Also, if two or more casters were doing this, this DM would totally have them all resolve their initiative checks to determine which one goes first!)
This reading, by the way, is extraordinarily powerful. Dungeons & Dragons 3.5 is an ambush game, and acting first yields very high returns. Being able to take an action at this point in the combat round—before anyone else who isn't also using the same combo—means that everyone will use this combo. No caster who could would dare not.