Speaking minutes after a list of schools affected by crumbling concrete was published by the Government, he said one County Durham school was on the 2010 Labour school rebuilding list but did not end up getting rebuilt under a Tory government.
He said it was an “inevitable result of cutting corners” and the sort of thing you “expect from cowboy builders”.
“The truth is this crisis is the inevitable result of 13 years of cutting corners botched jobs, and sticking plaster politics,” the Labour leader said.
“It’s the sort of thing you expect from cowboy builders saying that everyone else is wrong.
“Everyone else is to blame. Protesting they’ve done a good job. Even if the ceiling falls. The difference, Mr Speaker, is that in this case, the cowboys are running the country.”
“Isn't he ashamed that after 13 years of Tory Government children are cowering under steel supports stopping their classroom roof falling in?"
The Labour leader began PMQs asking the Prime Minister if he agreed with education secretary Gillian Keegan that the Government should be thanked for doing a good job on schools. He accused Mr Sunak of halving the budget for schools when he was chancellor despite the collapse of a school roof in 2018.
Mr Sunak responded by saying the government is doing everything it can, and says he will make “no apology” for acting in the face of “new information” in relation to Reinforced Autoclaved Aerated Concrete (RAAC) and schools.
He said the Government is doing "everything it can to fix this quickly and minimise the disruption to children's education".
He said the “vast majority” of schools are not affected by RAAC and launched an attack on the previous Labour government’s school rebuilding programme. He said the National Audit Office, the government spending watchdog, found it excluded 80 per cent of schools and the scheme was “needlessly wasting resources”.
He said: "This is exactly the kind of political opportunism that we've come to expect from Captain Hindsight over here. Before today he's never once raised this issue with me across this despatch box.
"It wasn't even worthy of a single mention in his so-called landmark speech on education this summer. And if we'd listened to him, our kids would have been off school and locked down for longer."
On school budgets, Mr Sunak added: "Far from cutting budgets, as he alleges, the amount spent last year was the highest in a decade.
"That spending review... maintained the school rebuilding programme, delivering 500 schools over a decade, a pace completely consistent with what had happened previously."
Mr Sunak and Mr Starmer were taking part in the first PMQs since the summer recess.
SNP Westminster leader Stephen Flynn questioned the Prime Minister’s record in the job, as he drew attention to the anniversary of the start of Liz Truss’s short premiership.
Mr Flynn told the Commons: “The public needs no reminding that today marks a year since the Prime Minister’s predecessor took office. Upon her speedy departure they will have thought that things were going to get better.
“But when we look at unemployment figures, they are higher; when we look at food prices, they are higher; when we look at mortgage rates, they are higher and economic growth is stagnant.”
Echoing Education Secretary Gillian Keegan’s expletive-laden interview gaffe earlier this week, Mr Flynn added: “So can I ask the Prime Minister when is he going to get off his backside and do something about it?”
Rishi Sunak responded: “What he failed to point out is that the amount of times I have sat across the despatch box from him and his colleagues and heard how somehow we were a laggard when it came to growth.
“What he didn’t do is take the opportunity to correct the record today now that the proper figures have been published which demonstrate in fact we had the fastest recovery out of any European economy after Covid.”