Stand by for a nerd-gasm!

Cobie Smulders, who plays Robin "Sparkles" Scherbatsky on "How I Met Your Mother", is joining the cast of the much-anticipated "Agents of S.H.I.E.L.D." reprising her role as Agent Maria Hill from the mega-hit film "The Avengers".

"I wanted very much to have Cobie in the pilot, because as much as anyone else, she is S.H.I.E.L.D.," series creator Joss Whedon told "She's cool and commanding, and has the dry humor that plays so well with Clark's. Also, if she's in it I get to hang out with Cobie."

Smulders' role will be limited due to her commitment to "HIMYM", which is in its final season.