It’s now eight straight victories and counting for the Royals when James Shields starts, after winning 3-1 over New York on Tuesday night at Yankee Stadium.

And this time, Shields even got the decision as a reward for out-pitching Yankees ace CC Sabathia. That eight-game run includes six no-decisions.

“Me and CC, we’ve faced each other numerous times,” Shields said. “We’ve had some really good battles. Anytime you’re facing CC, you’re going to have a tough battle.”

Want to know what makes it even sweeter?

Shields had lost his last six starts at Yankee Stadium — all while pitching for Tampa Bay — and was just 2-9 here with a 5.31 ERA in 13 previous career starts.

“I’ve had some bad games here,” he admitted, “but I’ve also put up some really good games here. It is what it is, but it’s good to come into Yankee Stadium and win.”

The Royals won for the fifth time in seven games and pulled back to within one game of .500, at 43-44, for the first time since June 18. They also moved to within five games of first-place Detroit.

“Great game,” center fielder Lorenzo Cain said. “Shields struggled a little bit early, but he bounced back and kept their hitters off balance. That’s all you can ask for. We just tried to make plays behind him.”

There were plenty of those.

Cain was a one-man highlight reel with a series of wide-ranging catches, including two on balls deep into the gap — one of which he turned into the final out in the first inning with the bases loaded.

“He made three unbelievable dives (for catches), and he ran two balls down in the gap,” Shields said. “He saved some runs. It seemed he ran a little more than normal. I told him I might pay for a massage or something.”

Cain won’t likely refuse it after announcing in mock outrage: “I’m tired, and my feet hurt.”

The Royals also did just enough offensively. They got homers in the sixth from David Lough and in the seventh from Billy Butler before Eric Hosmer delivered an RBI double in the eighth.

“It was great to get Shields a lead,” Butler said. “After the first inning, he was lights out. We still didn’t score a lot for him, but going up against CC — that’s a good win, man. CC was tough. He was typical CC.”