What size grounding wire for a main lug?
It actually depends on whether the ground is going to be installed ahead of the main breaker or if it is installed after the main. Most of the contractors I know will install a #6 simply because it is less expensive to stock one size than two and it covers everything up to a 200A main. So I would go with a #6. 2014 NEC reference Tables 250.102(C)(1) and Table 250.122.

Use extreme caution when working around panelboards. I recommend DIYers make sure the panel is disconnected from all power sources before performing any work. 

Hope this helps.