H1 Visa stamping with a passport expiring soon

Can I go to Mexico as a third nation country for h1 visa stamping with a passport which is going to expire in 6 months and come back to the US?
As a rule Passport valid for at least six months beyond the date of the expected period of stay but six months club countries are exempted, included my country
My country is a member of six months club and per regulation you can enter to the US just a valid passport

Any recommendations or experience?

Ideally you should renew your passport before going for stamping otherwise the I94 that CBP will issue will be valid till your current passport expiry date only. If this happens you will need to apply for H1B extension or go to CBP at Mexico or Canada border with new passport and current H1B I797 so that CBP can issue a new I94 that will match the expiry of your current H1B I797.