Our town has a “homeowner” exemption that lets homeowners do such work to their own property and they are exempted from the rule that otherwise requires licensed contractors to perform that type of work (mech., plumbing, structural, electrical). However, homeowners are still required to get permits and have inspections performed to close those permits. You can imagine that capable homeowners often honor that rule in the breach unless changing something more than cosmetic (e.g. making a change that could not go unnoticed at sale time).