State officials intervened for the second time in five days Monday amid violence in city homeless shelters, again ordering the immediate bolstering of security at a facility where a resident was stabbed.

The state Office of Temporary and Disability Assistance said Mayor Bill de Blasio’s administration must beef up the law enforcement presence at a midtown Manhattan shelter where a man was slashed in the chest Saturday.

The agency also said the city must within 24 hours conduct a study of security protocols at the East 53rd Street facility, including search procedures, metal detectors, surveillance cameras and ratio of officers to residents.

Similar measures were ordered by the state Thursday at the Boulevard Homeless Shelter in East Harlem after a man was fatally stabbed in the neck and nearly decapitated.

“People who need shelter should be able to turn to these facilities without fearing for their lives,” agency commissioner Samuel D. Roberts said, calling the recent attacks “truly disturbing.”

De Blasio spokeswoman Ishanee Parikh said the administration launched an investigation into the Saturday stabbing as soon as it occurred and was adding peace officer staffing Monday night.

“The safety of our shelter residents, workers, and the surrounding community is of utmost importance,” she said, adding that the mayor’s office will “fully assist” the state in its probe “ensure they’re aware of steps we’re taking to improve safety.”

advertisement | advertise on newsday

De Blasio, who is due to return Tuesday morning from four days of stumping in Iowa for Hillary Clinton, said last week that the city will provide “whatever it takes to keep people safe” at shelters.

Gov. Andrew M. Cuomo in early January repeatedly derided city shelters as dangerous and dirty, saying at one point that he considers it a “sign of sanity” that homeless New Yorkers would rather sleep on cold city streets.

Also Monday, de Blasio’s office announced a “shelter repair score card” system to track its progress in addressing facility conditions.

Data showed that shelters housing families with children or adult families average about half a violation per apartment, which is comparable with the average in all city buildings including luxury residences, the mayor’s office said. Those facilities do not include “cluster” housing — or groups of individual apartments in larger buildings — which account for 70 percent of the total violations in the shelter system.

Meanwhile, homeless New Yorkers held a City Hall news conference Monday to request that the independent inspector general for the NYPD launch a probe into the “policing and treatment of homeless New Yorkers.”

Get the Newsday Now newsletter!

The best of Newsday every day in your inbox.

“Human rights are being violated,” said Floyd Parks, 61, of the Picture the Homeless advocacy group, who described being harassed by police officers who also threw away his belongings.

Nicole Turso, a spokeswoman for Inspector General Philip Eure, said the office is aware of the request, but she declined further comment.