The Yankees aren’t skidding into the All-Star break.

They’re barrel-over-Niagara-Falls nose-diving into it.

Aaron Judge made history with his 30th home run of the season Friday night, but another bullpen implosion, led by fan un-favorite Tyler Clippard, sent the Yankees to a 9-4 loss to the Brewers in front of 43,472 at the Stadium.

The Yankees (44-40), who led the AL East by four games on June 12, fell a season-high 4 1⁄2 games behind the Red Sox. They have gone 6-17 since that date and Boston has gained 8 1⁄2 games by going 15-9.

“We have to get it right, we have to get guys back on track,” Joe Girardi said of a bullpen that, coming in, had blown 16 saves, the same total from all of last year. “We have to get them back on track. It’s been a struggle.”

Nothing about the first half has been a struggle for Judge, who became the first Yankees rookie to hit 30 home runs in a season with a fifth-inning blast that produced a 4-2 lead against the Brewers, who won despite committing five errors in the first four innings.

advertisement | advertise on newsday

Judge broke the franchise rookie record for homers that he shared with DiMaggio, who hit 29 in 1936. And the Yankees have played only 84 games — barely more than half a season.

Judge, an All-Star who will compete in Monday night’s Home Run Derby, became one of two rookies in major-league history to reach 30 homers before the All-Star break, joining the A’s Mark McGwire (33 in 1987).

“It’s quite an honor. It’s been a fun first half so far,” said Judge, who will be the subject of an upcoming feature in Rolling Stone. “I’m blessed to be in this position with my teammates around me, always putting me in the right spot and helping me succeed . . . I wish all 30 were game-winners.”

Indeed, Judge was more focused on the loss, of which there have been plenty of late, even as his home run total has ballooned. “It’s tough answering questions like this after a loss,” he said. “It just makes it a little tough.”

Ji-Man Choi hit his second homer in as many starts. This one landed in the second deck in rightfield and put the Yankees ahead 3-2 in the fourth.

Yankees videos

But the bullpen — stop me if you’ve heard this before — wasn’t able to hold the lead Choi and Judge provided.

Clippard came on for Tyler Webb with runners on second and third and none out in the sixth, and the lead quickly disappeared. A wild pitch brought in one run before Jesus Aguilar’s sacrifice fly tied it at 4.

Clippard’s night went further downhill in the seventh when he loaded the bases with three walks — one of them intentional — and allowed a two-out grand slam to Aguilar, who had hit a two-run homer in the fourth. That gave him seven RBIs and sent a good portion of the crowd of 43,472, which sat through a 51-minute rain delay earlier in the night, heading for the exits.

Chasen Shreve replaced Clippard and allowed a double to Hernan Perez and an RBI single to Manny Pina that gave the Brewers a 9-4 lead. They wound up outhitting the Yankees 14-4.

“As a group, we’ve got to do better,” Clippard said. “We have to get it done collectively. Myself, everybody. We know that. And we’re gonna. It’s just frustrating right now.”

advertisement | advertise on newsday

Jordan Montgomery, who came in 6-4 with a 3.62 ERA, including 4-1, 2.64 in his previous eight starts, allowed two runs and seven hits in 4 1⁄3 innings. He pitched reasonably well before the delay, which occurred with one out in the fourth, but wasn’t as sharp when he returned a little more than an hour later.