Engineering. Star Trek has a Naval heritage versus an Air Force one. Metalwork, fabricating, and anything generally dirty falls under the Engineering ratings in the Navy.
There's something about not bringing a knife to a bamboo zip gun fight, but I digress.Kirk is also a good example of the fact that Command cadre can’t be knifemakers. Remember when he had to go down to the planet to fight the alien dinosaur commander? The dinosaur made a knife. Kirk ran around collecting reloading components to make a bamboo zip gun.
There's something about not bringing a knife to a bamboo zip gun fight, but I digress.