My usual reply to "Nice skirt" is (at the top of my lungs) "Thanks, but I'm only interested in women".

It's usually enough to make the offender (always a man) blush and feel a bit of an a$$ around his other friends (as this type of person is the sort who would never make such a comment without an audience/peer group to back them up.)