Wearing protective clothing like overalls when climbing
into an attic's or crawling underneath a house will protect your clothes
from getting damaged.
Overalls have been used by by plumbers as well as home inspectors whenever crawling underneath a house to do maintenance or a home inspection.
If you don't have a pair of overalls or want to purchase one and then another idea would be to use a long sleeve shirt with some long pants. I found over the years a jogging outfit will do fine. Most jogging outfits will slide over your clothing to provide the proper protection.