Does anyone have advice for someone who has a (nervous?) habit to rub/scrape their fingernails together - thereby tearing away parts of the nail and surrounding skin (which is a rabbinic prohibition on Shabbat)?
I believe that sometimes with nervous habits such as this one may be able to direct the energy into a more "parve" habit. Its possible that with focus tapping you fingers, perhaps quietly on your legs so as not to disturb others, may help someone not bother with their nails as much.
In a Jewish Tribune article, Daniella Ashkenazy writes:
Who walked off with the Israeli Ingenuity Award? Sarit Asharov, a Raanana manicurist who invested three years nailing down the reasons people bite their nails and published a book about how to stop for good. The secret? Like alcoholics and smokers – abstinence: never, never succumb to any contact between your teeth and your nails – not even one itty-bitty pinky finger or you’ll be rehooked.
Likewise, here too, I assume that the longer you manage to abstain from your bad habit, the weaker your cravings will tend to be.
If you want to read more, one option is to buy Asharov's book (in Hebrew) about stopping nail-biting. It's entitled:
"גם אתה יכול להפסיק לכסוס!: ללא מאמץ וללא תופעות לוואי"
It's 146 pages thick and 21 cm tall. It was published in 2014.
If compulsive fingernail picking gets bad enough, experts will diagnose it as a case of "onychotillomania". Onychotillomania is a type of "pathological grooming" or "body-focused repetitive behavior", similar to compulsive hair pulling, nail biting, or skin picking. See Wikipedia's "Body-focused repetitive behavior" article for links to articles about such behaviors and to read about what experts do in order to help sufferers.