Sure, Costco prices are slightly cheaper on many of the items that they have in common, but Sam’s Club typically has 2 or 3 brands per item, rather than just one. See the other reasons I prefer Sam’s Wholesale Club over Costco.
Only purchase food items when they are on sale. And, if the sale is very good, make additional trips to the grocery store during that sale week. When it comes to purchasing meat, shop at each store based on the time when items are being marked down. The key is knowing when each store marks down its meat, bakery, and dairy items.