The Marlins' Jazz Chisholm Jr. reacts after striking out swinging...

The Marlins' Jazz Chisholm Jr. reacts after striking out swinging during the first inning of a game against the Orioles on Tuesday in Miami. Credit: AP/Wilfredo Lee

BOSTON — The Yankees, unable to find a spark within their own clubhouse the past six weeks, finally decided to import one Saturday by acquiring Jazz Chisholm Jr. from the Marlins for three minor-leaguers, a package headlined by No. 3 prospect Agustin Ramirez.

The versatile Chisholm, 26, won’t be a free agent until after the 2026 season, meaning that his arrival will have a longer-term impact on how the Yankees view a number of positions around the infield as well as centerfield, where he played 95 games for the Marlins this year.

As of late Saturday, a source said Chisholm — who was in Milwaukee with the Marlins — had a decent chance of being in uniform for Sunday night’s series finale at Fenway Park.

“He’s a dynamic player, definitely,’’ Aaron Judge said. “You can throw him up there at the leadoff spot or wherever, he’s going to definitely lengthen this lineup. He’s a weapon. You can put him in the outfield, you can put him anywhere in the infield. He’s got speed, he’s got power, and all of us in here are pretty excited to have him on board.”

Chisholm brings a much-needed dose of speed and athleticism to a lineup that’s been mostly stagnant beyond its two co-MVPs, Judge and Juan Soto.

Chisholm could help ignite them in any number of spots, specifically at leadoff, where the Yankees have shuffled through a number of failed experiments with terrible results. Their .226 batting average from atop the order ranked 27th in MLB and their .279 on-base percentage was the second worst.

Maybe Chisholm isn’t the perfect leadoff hitter, with a 24.9 strikeout percentage, but the Yankees aren’t demanding perfection. They’d be happy with a significant upgrade, and he should be that in any spot in which he bats. Chisholm was hitting .249 with 13 homers, 22 stolen bases and a .730 OPS in 101 games for the Marlins. It doesn’t hurt that he now will be taking aim at the short porch in the Bronx.

“We’re excited to get a talent like his,’’ Aaron Boone said. “We think his skill set will play at Yankee Stadium. He’s got power. He’s got tremendous speed. He’s got position versatility. He obviously plays with a lot of energy and a lot of pizzazz. It’s a young, athletic player that has a couple years of [team] control in there, too. So excited to get him, excited to see him fit in. I know he’s really excited to get here.”

Boone certainly can appreciate the jolt a late July trade often provides. “It definitely can be a shot of energy for guys,” he said. “But whatever happens or doesn’t happen, we’ll be through this time in a few days and then it’s you know what you’re going with and let’s go get it done.”

Clearly, the Yankees couldn’t stand pat, not in the midst of a 10-23 nosedive before their 10-inning, 11-8 victory over the Red Sox on Saturday night and the improvements their AL East rivals have made in recent days.

Too often, and especially against Alex Cora’s go-go Red Sox, the Yankees have looked plodding and lethargic, partly because of the numbing effect of losses piling up during a six-week malaise. The electric Chisholm figures to be a one-man antidote for that, and Boone can move him around the field depending on what he needs for that particular day.

Though Chisholm has primarily played centerfield this season, he’s also been an excellent defender at second base with the capability of handling shortstop, too. Considering that one of the Yankees’ biggest deficiencies has been at third, he could be auditioned there even though he has never played the position in the majors. There’s also the potential for Gleyber Torres, who’s been more productive at the plate lately, to move to third or get traded before Tuesday’s deadline.

With the Yankees almost certain to say goodbye to Torres in free agency after this season, Chisholm’s arrival provides insurance at second base. Also, with Alex Verdugo in his walk year and Soto’s return hardly guaranteed, Chisholm could stick in centerfield next season, with Judge moving to a corner spot along with Jasson Dominguez.

But the Yankees have far more front-burner concerns at the moment, and Chisholm’s arrival could be the first of a handful of upgrades. Brian Cashman still is working on bullpen help, but the Yankees also are targeting Monday for Giancarlo Stanton’s return from the injured list, and Dominguez — who began playing at Triple-A Scranton Friday night after recovering from an oblique injury — might not be far behind.

With reports circulating earlier this month that the Yankees had concerns about Chisholm’s flashy reputation not being a great fit in their clubhouse, they evidently got over those issues. Perhaps they just felt capable of handling his personality, just as they did with Verdugo and Marcus Stroman, players who came with similar perceptions.

Stroman described Chisholm as “someone who is going to give you everything he has out there. Awesome human being, awesome dude. I think everyone’s going to love him once he gets here. I think we’re all excited to have him.”

Said Boone, “I do feel like our clubhouse is always strong. We’ve got really good presence in there, obviously from our captain down to the other players and staff, making sure it’s a rock-solid room year-in and year-out.”

As for the prospects going to the Marlins, Ramirez is a 22-year-old catcher ranked No. 3 in the organization by Baseball America. He had a .269/.358/.862 slash line in 87 games split this season between Double-A Somerset and Triple-A Scranton. Second baseman Jared Serna, 22, was the Yankees’ 11th-ranked prospect at High-A Hudson Valley and infielder Abraham Ramirez, 19, was playing for the FCL Yankees.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 5 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME