Say one thing for Paul Skenes: He knows how to rebound after a rare subpar performance.

Skenes was at his best Wednesday night for the Pittsburgh Pirates, throwing eight scoreless innings in a 1-0 victory against the Arizona Diamondbacks at Chase Field.

Skenes (5-2) retired the first 14 batters and yielded just two hits, one of which didn’t leave the infield.

He struck out seven and walked none, marking the fourth consecutive game that he didn’t issue a base on balls. In the process, he lowered his ERA from 2.91 to 2.36.

“My fastball execution was good, and my splinker was good,” Skenes said on the SportsNet Pittsburgh postgame show. “I had all my pitches at different times. I was using what was working.”

Gregory Soto overcame a one-out walk in the ninth for his second save.

Skenes was coming off a five-inning start in which he gave up a season-high seven hits and five runs (three earned).

He also had nine strikeouts in that one, which led to his pitch count reaching 102, also a season high.

Manager Don Kelly, who returned to the dugout after serving a one-game suspension, saw determination in Skenes against the Diamondbacks.

“It’s a mentality that he wants it,” Kelly said. “He wants to be out there and be in that spot. He pitched like it tonight.”

Brandon Lowe’s first-inning home run against Michael Soroka (5-2) accounted for the only run of the game. The Pirates had chances to tack onto their modest lead but had three runners thrown out on the bases and went 0 for 8 with runners in scoring position.

Bryan Reynolds had two hits, giving him 1,000 for his career.

Reynolds is one of only five players in franchise history with 1,000 hits, 200 doubles and 140 home runs, joining Andrew McCutchen, Dave Parker, Willie Stargell and Roberto Clemente.

Skenes was a model of efficiency against the Diamondbacks, needing 68 pitches to get through six innings and 80 after seven. He had innings in which he threw just eight, seven and nine pitches.

“I don’t know what else to say,” Kelly said. “He was unbelievable.”

Skenes was content to get his defense involved from the jump. He had just four strikeouts through seven innings before striking out the side in the eighth.

It came at a cost, though, as Skenes increased his pitch count to 97. Kelly opted against sending Skenes out for the ninth.

“It looked like in the eighth his command wasn’t as good,” Kelly said. “His velo ticked down a hair. He was getting ahead so much early, but in that last inning it didn’t look like his command was as sharp, so it was a good spot to bring Soto in.”

The Diamondbacks had the winning run at the plate, but Soto got a fly ball and grounder to first to end the game.

Skenes was perfect until two outs in the fifth when Lourdes Gurriel Jr. hit a dribbler to the third-base side of the mound. Skenes fielded it with his bare hand and threw wildly to first, and Gurriel was credited with a single. Nolan Arenado followed with a no-doubt single to left, putting runners on first and second.

Skenes got the third out when Gabriel Moreno lined out to right field.

“He was getting ahead in the count, and he was able to throw his fastball for strikes early,” Kelly said. “He mixed in the splinker, and it was really good again. He used his sweeper effectively late and mixed in some changeups as well.”

After being shut out on two hits in the series opener, the Pirates erased any thought of a repeat performance in the first inning. Two batters in, Lowe smashed his ninth homer, a 435-foot shot that cleared the high wall in center field.

“We jumped on them early, and when you have the lead, it makes it easier to pitch,” Skenes said.

The Pirates wasted a chance to add to their 1-0 lead in the second, squandering Spencer Horwitz’s leadoff triple. With one out and runners on the corners, Oneil Cruz hit a ground ball to first. Horwitz broke for home and was caught in a rundown. Horwitz was tagged out, and the Pirates ran into the third out when Henry Davis was caught trying to advance to third during the rundown.

It was more of the same in the seventh.

Konnor Griffin hit a leadoff single to center, extending his hitting streak to eight games. He stole second with Davis batting. After Davis popped out, Soroka was replaced by Kevin Ginkel, whose balk sent Griffin to third.

The Diamondbacks brought their infield in, and Griffin broke for the plate on Cruz’s sharp hopper to second. Ketel Marte’s throw beat Griffin, and Moreno applied the tag for the second out.

“If he doesn’t put the ball right where he threw it, Konnor is safe,” Kelly said.

Third baseman Nick Gonzalez left prior to the eighth after being hit on the hand by a pitch. He was replaced by Jared Triolo.