Whenever Joe Girardi was asked about Aaron Judge and Gary Sanchez struggling in the postseason, the Yankees manager would immediately remind people they weren’t facing slop-throwing Quadruple-A pitchers.

“Teams that get here have good pitching,’’ Girardi said often and certainly about Dallas Keuchel and Justin Verlander, the Astros’ top two pitchers who dominated the Yankees in the first two games of the ALCS.

Well, after Masahiro Tanaka beat the Astros, 5-0, in Game 5 on Wednesday at Yankee Stadium gave the hosts a 3-2 lead in the best-of-seven series, it’s Girardi’s pitchers taming the muscular Astros.

It’s a lineup that led the majors with 896 runs scored, but has touched home plate just nine times in five games and is hitting a paltry .147 (22-for-150) with a pathetic .447 OPS.

“They have pitched really, really well,’’ Girardi said of his starters. “I think the plan going in has been successful. A plan is great, execution is the most important part and I think our pitchers have done a really good job executing against a really good hitting club.’’

Girardi said the plan was a combination of reports from different departments. Like a lot of teams the Yankees scout off video and have scouts follow potential postseason opponents since mid-September.

“It’s a marriage of all those things, the time (pitching coach) Larry (Rothschild) has put in, the advance scouts who have been out a month and the execution of our pitchers working with our catchers,’’ Girardi said.’’

Jay Darnell and Matt Daley, a former Yankees pitcher, started following the Astros in the middle of last month looking for tendencies from pitchers and hitters and their work has paid off through the first five games.

“Our scouting reports are really good. They do a good job of preparing us, what to throw and who is hot,’’ said CC Sabathia, who hurled six shutout innings in a Game 3 victory that started the Yankees escape from an 0-2 ditch. “You have to give them a lot of credit.’’

Kevin Hart and Tommy Wilson are following the Dodgers for the Yankees and Joe Caro and Cory Melvin are watching the Cubs.

Technology plays a major role in scouting and provides information that shouldn’t be ignored. Yet, many believe the information gleaned from having multiple eyeballs is invaluable.

“I think you always gain from advance scouting. They sit and watch clubs for a long time,’’ Girardi said. “You start evaluating in late August and early September who could we possibly see.’’

Often the reports filed aren’t useful because that team won’t face the Yankees.

“There are guys that went out for weeks and weeks at a time and maybe it came that we didn’t even see that team,’’ Girardi said. “Our guys do a tremendous job. They spend a lot of time out on the road and we applaud them for it. They are following teams for three and four weeks and it helps.’’

And it just didn’t start with Darnell and Daley gathering information on the Astros. Yankee pitchers limited the Indians, who finished third in the AL with 818 runs, to 18 in five ALDS games.