I'd just like to add some other rules that could help a lot.

1. Mosh pit doesn't mean circle pit. The pit's shape shifts a lot during the show. Another very usual pit is one in a semi circular shape, the center of the circle is at the front of the stage, this is where harder mosh appears. Know your pit.

2. Know the bands. I know that everyone goes to shows to see new bands but you should try to mosh mainly at songs you are already used to, this way you don't get unexpected accidents like trying to stage dive close to the end of the song or be surprised by a sudden change in the pit, it could be dangerous or embarrassing.
Another good reason is that each band attracts a specific type of crowd.

3. Bring some friends. It's much funnier and safe if you know the people around you! It's also common sense to have a stage diving crew to help out, take turns with your friends.

4. Be positive. Like the above nodes said, there is a right way to mosh! Don't use the pit to take out on others or for revenge.
Respect the people that don't mosh.
Be nice to your fellow moshers, mainly the girls. Yes, there are a lot of girls in the mosh pit please be careful and please don't try to feel them when they jump off the stage. Just like Sri (ex-Baby Gopal) said in a Shelter show: think of them as your mothers and sisters, don't touch.

I'd also like to add some extra mosh pit movements:

  • floor punching. That's right, get on your knees and punch the floor to the sound of the music, cry, scream, etc. I've seen this in walls too (wall punching ?????).
  • the tank. Get some friends (ten is a good number), everyone grabs each other's arms and start to move around the pit as one massive power.