Don't just follow the walls, but make sure that your skirtings are installed plumb, especially in the corners, if needs be by chopping away plasterwork at the very bottoms of the walls (where plasterers invariably leave a "kick-out") or in extremis back planing the skirtings as required. Gaps at the top can always be caulked, but a skirting which lies backwards is always going to be a PIA to deal with.
Scribe the inside corners of scribed ends with a 5 to 10 degree back angle on the scribe so that out of square corners (in the masonry) can be accommodated easily (just assume that rooms are NEVER square, walls are NEVER plumb and you won't go wrong). Consider using low expansion foam instead of a grip adhesive to gix skirtings to walls. It works better in most cases. If you must use a grip adhesive, avoid the traditional type (e.g Gripfill, Pink Grip, etc) and go for a modified polymer type
If the floor is very uneven, leading to gaps at the bottom edge of the skirting, press the skirting down onto the floor where there are gaps by resting a plank between the top of the skirting and the floor and placing a heavy weight such as yourself, your partner, etc on the middle of the plank in order to bend the skirting downwards onto the floor whilst you fix it to the wall with nails, pins or screws). A 2nd fix nail gun makes this job a lot easier and can make it into a one person task.This technique can often take out 2 to 4mm of gap even on 8 x 1in softwood skirtings, but is less successful with hardwood skirts. If the gap is more than 2 to 3mm even after pressing down you may need to scribe the bottom edges of the skirting to the floor to get it to a 2 to 3mm visible gap (jigsaw, block plane , again 5 to 10 degrees of under cut)
Seal the skirting to the floor with coloured or clear silicone sealant after you've completed the painting. It looks neater and (at least in old houses) reduces draughts
Use mitre bond on outside mitred corners at floor level to get better looking joints.
Same goes for the vertical mitres around the door casings/linings, however If you have a router (with a biscuit slot cutter) or a biscuit jointer then the mitre joints around the doors are an ideal application for such a tool as it will result in a better aligned and stronger joint. Biscuits require a water based glue (such as PVA) but shouldn't be sanded for 1 to 2 days after installation to allow the moisture in the joint (from the glue) to dissipate.
You can get spring clamps for the flat mitres around door casings/linings (e.g. Collins mitre spring clamps) which ensure tight joints, but they aren't cheap.
Always sand your flat mitres around a door opening so that the mitre line doesn't telegraph through the paint finish.
Before starting check your mitre saw to ensure that the blade is perpendicular to the bed (i.e. is making a true plumb cut) and that a 45 degree mitre really is 45 degree, not 44 or 46 degrees. Adjust as required. If the back fence of the router isn't straight (i.e. the horseshoe casting is a but warped - actually very common) it will be necessary to fit an auxilliary timber fence plate, packed and screwed to the original as required, to correctbthe inaccuracy. An inaccurate mitre saw will produce gappy joints, so sorting yours out is a must for accurate work
I'm sure someone else will chime in with more stuff