The Intel Core i7-8700K wins in 6 out of 14 comparable specs, with 5 ties. Its biggest advantage is Threads (200% better).
Core i5-6600K wins in 3 specs (MSRP: 32% better).
Recommendation
Choose Core i7-8700K if you want the best overall performance — especially threads.
Choose Core i5-6600K if msrp matters more to you.