If the entire cost can be traced to making an item of inventory it is a direct cost.
For instance, let’s say a company buys $125 in wool yarn and gives it to weavers. The weavers take the wool home and weave rugs. When they bring the finished rugs back to the store they are paid $500 for each rug. The company also pays the CEO as salary of $150,000 a year. The direct cost consists of direct materials of $125 plus direct labor of $500 for a total of $625. The CEOs salary is not a direct cost because he never actually touched the product while it was being made. His salary is an indirect cost.