Cosmic Mario

Cosmic Mario is a character that appears in Super Mario Galaxy. Its physical shape is identical to Mario, while its outer appearance is blue with stars, resembling space. It also has a high-pitched voice. If Mario enters a galaxy when a Cosmic Comet is orbiting a galaxy, Cosmic Mario appears at the beginning at the level and challenges the player to a race. The player must then race through numerous obstacles and reach the Power Star before Cosmic Mario does. If Cosmic Mario manages to reach the Power Star first, Mario will lose a life and must restart the race. Colliding with it during the race causes it to release Star Bits.

At the start of a race, if the player holds the up, then  when the timer hits 2, and then hits  just as the race starts, Mario or Luigi will get an extra boost at the beginning of the race, shown by a yellow color appearing on Mario/Luigi, shrinking gradually as a marker of the end of this effect. This is similar to the Rocket Start from the Mario Kart games.

A similar entity based on Cosmic Mario appears in Super Mario Galaxy 2 and Super Mario 3D Land in the form of the Cosmic Clones. Other similar entities are the Cosmic Spirit from Super Mario Galaxy 2 and Mummy-Me from Captain Toad: Treasure Tracker.

Cosmic Luigi
Cosmic Luigi also appears, replacing Cosmic Mario when playing as Luigi. It is very similar to Cosmic Mario, with the only major difference being that it takes advantage of shortcuts more often and uses a large amount of Long Jumps, making it faster and harder to beat than its counterpart.

In Super Mario Galaxy 2, despite not being in the game while playing as Luigi, Cosmic Clones behave very similarly, being slightly faster.

Trivia

 * Cosmic Mario shares its voice clips with the Cosmic Clones.
 * An unused variant of the Cosmic Mario Race in Space Junk Galaxy is found in the game files. When players start a race, they start at the coordinate 0,0,0, which is the air that they land on the starting planet. Cosmic Mario cannot win on this race, and players still have to use Star Chips to unlock a Launch Star, but Cosmic Mario does not need to use the Star Chips to use a Launch Star. Cosmic Mario does not use voice clips in this variant.
 * Cosmic Mario/Cosmic Luigi's theme uses a similar arrangement to Shadow Mario's theme of the same music, the underground theme from Super Mario Bros..
 * On the covers for the Super Mario Galaxy Original Soundtrack and Super Mario Galaxy 2 Original Soundtrack. Mario's silhouette is dark blue covered in stars resembling Cosmic Mario.
 * Prior to Cosmic Mario's debut, Metal Mario had an alternate color scheme where he can be selected into blue in Mario Golf for Nintendo 64.